Display method and electronic equipment

By determining and handling mobile events in user operations in advance, the problem of delay in electronic devices in response to user touch operations is solved, and the interface response speed and user experience are improved.

CN119473192APending Publication Date: 2025-02-18HONOR DEVICE CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202311004443.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-09
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

Electronic devices have a delay in processing and displaying user operations, and cannot respond quickly to user touch operations, affecting the user experience.

Method used

By obtaining the user's operation event, it is determined whether the time difference between the moving event and the next vertical synchronization signal is less than or equal to the threshold time. If it is less than or equal to the threshold time, the processing and display process will be triggered in advance.

Benefits of technology

Improves interface response speed, reduces processing delay, and enhances user interaction experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119473192A_ABST
    Figure CN119473192A_ABST
Patent Text Reader

Abstract

The invention discloses a display method and electronic equipment. The method comprises the steps of obtaining an initial event of first operation of a user; displaying a first picture in response to an initial event of the first operation; acquiring a first moving event of the first operation; in response to the first moving event, displaying a second picture under the condition that the first duration is less than or equal to the threshold duration; wherein the first duration is a time difference value between the first detection time of the first movement event and the first vertical synchronization signal, and the first vertical synchronization signal is a vertical synchronization signal which is after the first detection time and is closest to the first detection time. According to the embodiment of the invention, response time can be advanced, processing and display are accelerated, and user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic technology, and in particular to a display method and an electronic device. Background Art

[0002] During the process of user interaction with an electronic device, as the user's operation changes, the electronic device refreshes the display interface according to the user's operation. For example, the electronic device displays a game interface, and the user touches the screen to control the movement of the character in the game interface. As the user's touch operation changes, the electronic device refreshes the screen of the game interface accordingly. However, there is a certain delay in the process of screen processing and display response of the electronic device, and in some scenarios, it cannot respond quickly to the user's touch operation, which affects the user experience. Summary of the invention

[0003] The embodiments of the present application provide a display method and an electronic device for improving response time, speeding up processing and display, and improving user experience.

[0004] In a first aspect, an embodiment of the present application provides a display method, which is applied to an electronic device, comprising: obtaining a start event of a first operation of a user; displaying a first screen in response to the start event of the first operation; obtaining a first movement event of the first operation; and displaying a second screen in response to the first movement event when a first duration is less than or equal to a threshold duration; wherein the first duration is the time difference between a first detection time of the first movement event and a first vertical synchronization signal, and the first vertical synchronization signal is a vertical synchronization signal that is after the first detection time and closest to the first detection time.

[0005] The start event is the event of detecting the first operation for the first time; the move event is the event of not detecting the first operation for the first time; and the end event is the event of not detecting the first operation for the first time. The first detection information is between the first vertical synchronization signal and the fourth vertical synchronization signal, the first vertical synchronization signal is the next vertical synchronization signal in the first vertical synchronization signal cycle; the fourth vertical synchronization signal is the previous vertical synchronization signal in the first vertical synchronization signal cycle.

[0006] In the embodiment of the present application, the electronic device determines whether to process in advance based on the time difference between the detection time of the mobile event and the vertical synchronization signal that follows it. When the time difference is less than or equal to the threshold duration, the electronic device can be triggered to respond to the mobile event in advance and process and display the process. In this way, on the basis of periodic display, the electronic device processes the mobile event as early as possible, improves the timeliness of the mobile event, speeds up the response and display, increases the refresh rate, and improves the user experience.

[0007] In a possible implementation, the method further includes: when the first duration is greater than a threshold duration, obtaining a second movement event of the first operation; in response to the second movement event, determining whether the second duration is less than or equal to the threshold duration; wherein the second duration is the time difference between a second detection time of the second movement event and the second vertical synchronization signal, the second vertical synchronization signal is a vertical synchronization signal that is after the second detection time and closest to the second detection time, and the second detection time is after the first detection time.

[0008] The second detection information is between the second vertical synchronization signal and the fifth vertical synchronization signal, the second vertical synchronization signal is the next vertical synchronization signal in the second vertical synchronization signal cycle; the fifth vertical synchronization signal is the previous vertical synchronization signal in the second vertical synchronization signal cycle. The acquisition time interval between the first movement event and the second movement event is one acquisition cycle, the first movement event is in front, and the second movement event is in the back.

[0009] In the embodiment of the present application, if the first duration is greater than the threshold duration, the electronic device does not trigger processing and display, but waits for the motion event of the next acquisition cycle, and continues the above judgment and processing. In this way, it can be ensured that the cycle for processing the motion event is still the vertical synchronization signal cycle, and the motion event can be processed in advance to advance the response speed of the motion event, and the user display refresh cycle can be guaranteed to improve the user interaction experience.

[0010] In a possible implementation, the method further includes: detecting input events of user operations based on a collection cycle; at a first moment, the electronic device does not detect user operations, and determines that there are no input events of user operations; the acquisition of the start event of the user's first operation includes: at a second moment, the electronic device detects user operations, and when the last collection result is that no user operations were detected, the start event of the first operation is acquired; the first moment and the second moment are separated by a collection cycle, and the first moment is before the second moment. In this way, the electronic device can effectively acquire the start event of the user operation according to the collection cycle.

[0011] Among them, the first moment can refer to Figure 6 The T0 moment in the second moment can refer to Figure 6 The T2 moment in .

[0012] In a possible implementation, the obtaining of the first movement event of the first operation includes: at the Xth moment, the electronic device detects a user operation, and when the last acquisition result is the detection of the user operation, obtaining the first movement event of the first operation; the Xth moment is after the second moment. In this way, the movement event of the electronic device is collected after the start event, ensuring that the movement event can be triggered in advance, responded to and displayed, speeding up the movement event processing, and improving the user experience.

[0013] Among them, the Xth moment can refer to Figure 6 The relevant contents from time T3 to time T7 are not repeated here.

[0014] In a possible implementation, the method further includes: at the Kth moment, the electronic device detects a user operation; when the last acquisition result is the detected user operation, obtaining a movement event of the first operation; at the K+1th moment, the electronic device cannot detect a user operation; when the last acquisition result is the detected user operation, obtaining an end event of the first operation; the Kth moment and the K+1th moment are after the second moment, the Kth moment and the K+1th moment are separated by an acquisition cycle, and the K+1th moment is after the Kth moment.

[0015] Among them, the Kth moment can refer to Figure 6 The T7 moment in the video.

[0016] In a possible implementation, the method further includes: when the first duration is greater than a threshold duration, waiting for the detection of the next acquisition cycle; if at the Kth moment, the electronic device acquires a fourth movement event; at the K+1th moment, the electronic device cannot detect a user operation, determining that the fourth movement event is an end movement event, and displaying a third screen; wherein the fourth detection time of the fourth movement event is before the third vertical synchronization signal, and the third vertical synchronization signal is a vertical synchronization signal after the fourth detection time and closest to the fourth detection time. In this way, when the fourth movement event is an end movement event, the electronic device can immediately process and display the third screen.

[0017] In a possible implementation, when the end event of the first operation is obtained, the method further includes: displaying a fourth screen in response to the end event. In this way, the electronic device can immediately display the fourth screen in response to the end event, thereby ensuring the timeliness of the screen display.

[0018] In a possible implementation, the threshold duration is the acquisition cycle. In this way, when the threshold duration is the duration of the acquisition cycle, the electronic device can process and display all mobile events in advance to the maximum extent according to the vertical synchronization signal cycle, without missing any, and wait for the response of the vertical synchronization signal, thereby ensuring the reliability of the early trigger.

[0019] In a possible implementation, the method further includes: creating a first buffer, the first buffer including description information of the third motion event; after obtaining the first motion event of the first operation, the method further includes: obtaining description information of the first motion event, the description information including the detection time, coordinate information and event type of the first motion event; storing the description information of the first motion event in the first buffer. In this way, the electronic device can cache the information of the motion event in advance, and then trigger it in advance based on the vertical synchronization signal and the threshold duration, so as to ensure that the display frequency does not increase and trigger the response in advance, so as to reduce the increase of the processing process, save processing resources and save energy.

[0020] In a possible implementation, when the first duration is less than or equal to the threshold duration, the method further includes: determining a target motion event from the motion events in the first buffer; performing image rendering and synthesis based on the target motion event to obtain a second processed image, wherein the second screen includes the second processed image. In this way, when the electronic device caches the early trigger condition, the motion events stored in the cache are merged and processed to ensure the reliability of the processing.

[0021] In a possible implementation, the electronic device includes an input framework module, an input event receiving module and a display, and the creation of the first buffer includes: when a user operation is detected, if the buffer has not been created, creating the first buffer through the input event receiving module; sending event information to the input framework module through the input event receiving module; the acquisition of the description information of the first mobile event and storing the description information of the first mobile event in the first buffer includes: determining the description information of the first mobile event based on the event information through the input framework module, and storing the description information of the first mobile event in the first buffer; sending an event storage notification to the input event receiving module through the input framework module; the displaying of the second picture when the first duration is less than or equal to the threshold duration includes: judging that the first duration is less than or equal to the threshold duration through the input event receiving module, and displaying the second picture through the display. In this way, the electronic device creates a buffer and processes the release of the buffer according to the vertical synchronization signal period for the mobile event, which can ensure that the mobile event processing process is triggered in advance, can respond in advance, and improve the user interaction experience.

[0022] In a second aspect, an embodiment of the present application provides an electronic device, comprising one or more processors and one or more memories; the one or more processors are coupled to the one or more memories, the one or more memories are used to store computer program code, the computer program code comprising computer instructions, and when the one or more processors execute the computer instructions, the electronic device executes: obtaining a start event of a first operation of a user; displaying a first screen in response to the start event of the first operation; obtaining a first movement event of the first operation; and displaying a second screen in response to the first movement event when the first duration is less than or equal to a threshold duration; wherein the first duration is the time difference between a first detection time of the first movement event and a first vertical synchronization signal, and the first vertical synchronization signal is a vertical synchronization signal that is after the first detection time and closest to the first detection time.

[0023] The start event is the event of detecting the first operation for the first time; the move event is the event of not detecting the first operation for the first time; and the end event is the event of not detecting the first operation for the first time. The first detection information is between the first vertical synchronization signal and the third vertical synchronization signal, the first vertical synchronization signal is the next vertical synchronization signal in the first vertical synchronization signal cycle; the third vertical synchronization signal is the previous vertical synchronization signal in the first vertical synchronization signal cycle.

[0024] In the embodiment of the present application, the electronic device determines whether to process in advance based on the time difference between the detection time of the mobile event and the vertical synchronization signal that follows it. When the time difference is less than or equal to the threshold duration, the electronic device can be triggered to respond to the mobile event in advance and process and display the process. In this way, on the basis of periodic display, the electronic device processes the mobile event as early as possible, improves the timeliness of the mobile event, speeds up the response and display, increases the refresh rate, and improves the user experience.

[0025] In a possible implementation, the electronic device further performs: when the first duration is greater than a threshold duration, obtaining a second movement event of the first operation; in response to the second movement event, determining whether the second duration is less than or equal to the threshold duration; wherein the second duration is the time difference between a second detection time of the second movement event and the second vertical synchronization signal, the second vertical synchronization signal is a vertical synchronization signal that is after the second detection time and closest to the second detection time, and the second detection time is after the first detection time.

[0026] The second detection information is between the second vertical synchronization signal and the fourth vertical synchronization signal, the second vertical synchronization signal is the next vertical synchronization signal in the second vertical synchronization signal cycle; the fourth vertical synchronization signal is the previous vertical synchronization signal in the second vertical synchronization signal cycle. The acquisition time interval between the first movement event and the second movement event is one acquisition cycle, the first movement event is in front, and the second movement event is behind.

[0027] In the embodiment of the present application, if the first duration is greater than the threshold duration, the electronic device does not trigger processing and display, but waits for the motion event of the next acquisition cycle, and continues the above judgment and processing. In this way, it can be ensured that the cycle for processing the motion event is still the vertical synchronization signal cycle, and the motion event can be processed in advance to advance the response speed of the motion event, and the user display refresh cycle can be guaranteed to improve the user interaction experience.

[0028] In a possible implementation, the electronic device further performs: detecting input events of user operations based on a collection cycle; at a first moment, the electronic device does not detect user operations, and determines that there are no input events of user operations; the acquisition of the start event of the user's first operation is specifically performed: at a second moment, the electronic device detects user operations, and when the last collection result is that no user operations were detected, the start event of the first operation is acquired; the first moment and the second moment are separated by a collection cycle, and the first moment is before the second moment. In this way, the electronic device can effectively acquire the start event of the user operation according to the collection cycle.

[0029] Among them, the first moment can refer to Figure 6 The T0 moment in the second moment can refer to Figure 6 The T2 moment in .

[0030] In a possible implementation, the obtaining of the first movement event of the first operation is specifically performed as follows: at time X, the electronic device detects a user operation, and when the last acquisition result is the detection of the user operation, the first movement event of the first operation is obtained; the Xth time is after the second time. In this way, the movement event of the electronic device is collected after the start event, ensuring that the movement event can be triggered in advance, responded to and displayed, speeding up the movement event processing, and improving the user experience.

[0031] Among them, the Xth moment can refer to Figure 6 The relevant contents from time T3 to time T7 are not repeated here.

[0032] In a possible implementation, the electronic device further performs: at the Kth moment, the electronic device detects a user operation; when the last acquisition result is the detected user operation, the moving event of the first operation is obtained; at the K+1th moment, the electronic device cannot detect a user operation; when the last acquisition result is the detected user operation, the end event of the first operation is obtained; the Kth moment and the K+1th moment are after the second moment, the Kth moment and the K+1th moment are separated by an acquisition cycle, and the K+1th moment is after the Kth moment.

[0033] Among them, the Kth moment can refer to Figure 6 The T7 moment in the video.

[0034] In a possible implementation, the electronic device further performs: when the first duration is greater than the threshold duration, waiting for the detection of the next acquisition cycle; if at the Kth moment, the electronic device obtains the fourth movement event; at the K+1th moment, the electronic device cannot detect the user operation, determining that the fourth movement event is the end movement event, and displaying the third screen; wherein the fourth detection time of the fourth movement event is before the third vertical synchronization signal, and the third vertical synchronization signal is the vertical synchronization signal after the fourth detection time and closest to the fourth detection time. In this way, when the fourth movement event is the end movement event, the electronic device can immediately process and display the third screen.

[0035] In a possible implementation, when the end event of the first operation is obtained, the electronic device further executes: in response to the end event, displaying a fourth screen. In this way, the electronic device can immediately respond to the end event and display the fourth screen, ensuring the timeliness of the screen display.

[0036] In a possible implementation, the threshold duration is the acquisition cycle. In this way, when the threshold duration is the duration of the acquisition cycle, the electronic device can process and display all mobile events in advance to the maximum extent according to the vertical synchronization signal cycle, without missing any, and wait for the response of the vertical synchronization signal, thereby ensuring the reliability of the early trigger.

[0037] In a possible implementation, the electronic device further executes: creating a first buffer, the first buffer including description information of the third motion event; after obtaining the first motion event of the first operation, the electronic device further executes: obtaining description information of the first motion event, the description information including the detection time, coordinate information and event type of the first motion event; storing the description information of the first motion event in the first buffer. In this way, the electronic device can cache the information of the motion event in advance, and then trigger it in advance based on the vertical synchronization signal and the threshold duration, so as to ensure that the display frequency does not increase and trigger the response in advance, so as to reduce the increase of the processing process, save processing resources and save energy.

[0038] In a possible implementation, when the first duration is less than or equal to the threshold duration, the electronic device further performs: determining a target motion event from the motion events in the first buffer; performing image rendering and synthesis based on the target motion event to obtain a second processed image, and the second screen includes the second processed image. In this way, when the electronic device caches the early trigger condition, the motion events stored in the cache are merged and processed to ensure the reliability of the processing.

[0039] In a possible implementation, the electronic device includes an input framework module, an input event receiving module and a display: the creation of the first buffer is specifically performed as follows: when a user operation is detected, if the buffer has not been created, the first buffer is created by the input event receiving module; event information is sent to the input framework module by the input event receiving module; the acquisition of the description information of the first mobile event and the storage of the description information of the first mobile event in the first buffer is specifically performed as follows: the input framework module determines the description information of the first mobile event based on the event information, and stores the description information of the first mobile event in the first buffer; the input framework module sends an event storage notification to the input event receiving module; when the first duration is less than or equal to the threshold duration, the display of the second picture is specifically performed as follows: the input event receiving module determines that the first duration is less than or equal to the threshold duration, and the display displays the second picture. In this way, the electronic device creates a buffer for the mobile event according to the vertical synchronization signal period and processes the release of the buffer, which can ensure that the mobile event processing process is triggered in advance, can respond in advance, and improve the user interaction experience.

[0040] In a third aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on an electronic device, enables the electronic device to execute a display method as described in the first aspect or any possible implementation of the first aspect.

[0041] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, comprising instructions, which, when executed on an electronic device, enable the electronic device to execute a display method as described in the first aspect or any possible implementation of the first aspect.

[0042] In a fifth aspect, an embodiment of the present application provides a chip system, which is applied to an electronic device, and the chip system includes one or more processors, which are used to call computer instructions so that the electronic device executes the display method described in the first aspect or any possible implementation method of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 It is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;

[0044] Figure 2A to Figure 2B is a set of user interface schematic diagrams proposed in the embodiments of the present application;

[0045] Figure 3A to Figure 3E is another set of user interface schematic diagrams proposed in the embodiments of the present application;

[0046] Figure 4 A schematic diagram of the software structure of an electronic device provided in an embodiment of the present application;

[0047] Figure 5 It is a flowchart of a method for drawing a user interface proposed in an embodiment of the present application;

[0048] Figure 6 It is a flowchart of another method for drawing an interface provided in an embodiment of the present application;

[0049] Figure 7A to Figure 7C This is a flow chart of a method for drawing an interface provided in an embodiment of the present application;

[0050] Figure 8 It is a flowchart of an image processing method for cache events provided by an embodiment of the present application;

[0051] Fig. 9A and Fig. 9B It is a flowchart of another method for drawing an interface provided in an embodiment of the present application;

[0052] Fig. 10A and Fig. 10B This is a flowchart of another method for drawing an interface provided in an embodiment of the present application. DETAILED DESCRIPTION

[0053] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to be used as limitations to the present application. As used in the specification and appended claims of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include plural expressions, unless there is a clear indication to the contrary in the context. It should also be understood that the term "and / or" used in the present application refers to and includes any or all possible combinations of one or more listed items.

[0054] The embodiments of the present application disclose a display method and an electronic device for improving the interface response speed.

[0055] The electronic device in the embodiments of the present application can be a mobile phone, a tablet computer, a desktop, a laptop computer, a handheld computer, a smart bracelet, a super mobile personal computer, a netbook, a personal phone, a personal data assistant, an augmented reality (AR) / virtual reality (VR) and other touch screen devices. The present application does not limit the specific form of the electronic device.

[0056] The following is an introduction to the device involved in the embodiments of the present application.

[0057] Figure 1 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application.

[0058] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, a sensor module 180, a display screen 194, etc. The sensor module 180 may include a touch sensor 180K, etc.

[0059] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0060] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0061] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0062] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0063] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0064] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device through the power management module 141.

[0065] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

[0066] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0067] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0068] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0069] The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180K is used to detect a touch operation acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194.

[0070] In the embodiment of the present application, the electronic device 100 can detect the user's touch operation through the touch sensor 180K, and the touch operation can include the user's hand drop operation from not touching the screen to touching the screen, and the hand lift operation from touching the screen to leaving the display screen 194. The display screen 194 can display a user interface.

[0071] Through the interaction between the user and the electronic device interface, the electronic device can refresh the display image on the screen. The embodiment of the present application does not limit the display interface and specific content of the electronic device.

[0072] Figure 2A to Figure 2B It is a set of user interface schematic diagrams exemplarily disclosed in the embodiments of the present application. Figure 2A to Figure 2B It is a schematic diagram of a game interface shown in an embodiment of the present application.

[0073] Figure 2A The user interface diagram of the electronic device is shown as an example. The user turns on the electronic device so that the display screen of the electronic device displays the desktop of the electronic device, that is, the user interface 200. Figure 2A As shown, the user interface 200 may include at least one application icon (e.g., weather, calendar, mail, settings, application store, notes, photo album, game 201, phone, short message, browser, camera, etc.). The positions of the application icons and the corresponding application names may be adjusted according to the user's preferences, which is not limited in this application.

[0074] It should be noted that Figure 2A The interface diagram of the electronic device shown is an exemplary display of an embodiment of the present application. The interface diagram of the electronic device may also be in other styles, and the present application does not limit this.

[0075] exist Figure 2A In the example, the user can click on the application icon of the game 201 in the user interface 200. In response to the user clicking on the application icon of the game 201, the electronic device runs the game application and displays Figure 2B .

[0076] like Figure 2BAs shown, the user interface 210 is a game interface. The user interface 210 may include various game controls, such as a direction control for the left finger touch and a function control for the right finger touch. In the above process, as the user operates, the characters in the game interface move and the actions change.

[0077] Regarding the screen display process, the electronic device needs to collect user operations in real time and display the screen according to the user operations to ensure the smoothness of the game screen and a high-quality user experience.

[0078] Figure 3A to Figure 3E This is another set of user interface schematic diagrams exemplarily disclosed in the embodiments of the present application. Figure 3A to Figure 3E This is a schematic diagram of the interface for users to grab red envelopes shown in an embodiment of the present application.

[0079] Figure 3A The user interface diagram of the electronic device is shown as an example. The user turns on the electronic device so that the display screen of the electronic device displays the desktop of the electronic device, that is, the user interface 300. Figure 3A As shown, the user interface 300 may include at least one application icon (e.g., weather, calendar, mail, settings, app store, notes, photo album, social software 301, phone, short message, browser, and camera, etc.). The position of the application icon and the corresponding application name may be adjusted according to the user's preference, and this application does not limit this. It should be noted that Figure 3A The interface diagram of the electronic device shown can be referred to Figure 2A The relevant description is not repeated here.

[0080] like Figure 3A As shown, the user clicks on the application icon of the social software 301 . In response to the user operation of clicking on the application icon of the social software 301 , the electronic device runs the social software and displays the user interface 310 .

[0081] like Figure 3B As shown, the user interface 310 may include a chat option list. The option list includes the XX group 311 option. The user may click on the XX group 311 option, and in response to the above user operation, the electronic device may display the "XX group" conversation interface (user interface 320).

[0082] like Figure 3C As shown, group member Lisa sends a red envelope, and a red envelope mark 321 is displayed in the user interface 320. The red envelope is in an unclaimed state in the red envelope mark 321. The user can click on the red envelope mark 321 to grab the red envelope. In response to the above operation, the electronic device displays a red envelope interface (user interface 330).

[0083] like Figure 3D As shown, the electronic device can display a red envelope cover 331, and the red envelope cover 331 can include an "open" control for opening the red envelope. The user can click the "open" control of the red envelope cover 331, and in response to the above operation, the electronic device can display a red envelope receiving interface (user interface 340).

[0084] like Figure 3E As shown, the user interface 340 may include information such as the specific amount of the red envelope received by the user.

[0085] In the process of users grabbing red envelopes, the electronic device can receive the user's operation and display the red envelope collection result. The process from sending to grabbing the red envelope generally takes a short time. If the number of red envelopes is limited and there are many people grabbing the red envelopes, the electronic device needs to respond to the user's red envelope grabbing operation in time to increase the probability of the user grabbing the red envelope.

[0086] In the above two implementations, if the electronic device cannot quickly respond to the user's operation of the touch direction control or function control, the user will feel that the game interface does not follow the hand. If the electronic device cannot quickly respond to the user's operation of grabbing red envelopes, it will be difficult for the user to grab red envelopes. It can be seen that the response speed of the electronic device to the user's operation directly affects the user's interactive experience. This application does not limit the specific operation method of the user, which can be the above-mentioned touch operation, such as click operation, sliding operation, or air gesture operation.

[0087] Figure 4 A schematic diagram of the software structure of an electronic device provided in an embodiment of the present application.

[0088] like Figure 4 As shown, the software framework of the electronic device involved in the present application may include an application layer, an application framework layer (framework, FWK), a system library, a kernel layer (kernel) and a hardware layer.

[0089] The application layer may include a series of application packages, such as social software, Bluetooth, games, weather, calendar and other applications (also referred to as applications, some of which are not shown). In the embodiment of the present application, the first application may be any application in the application layer, and the user may open or close the first application, or perform operations in the first application.

[0090] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0091] like Figure 4As shown, the application framework layer may include an input event receiving module, an input framework module, a view system, an image drawing module, a phone manager, a window manager, a content provider, a notification manager, and the like.

[0092] The input event receiving module can manage the buffer. For example, it can obtain the operation event from the touch sensor (through the touch driver). The electronic device can create a buffer based on the event and send the operation event information to the input framework module.

[0093] The input framework module can receive the operation event information from the input event receiving module. The input framework module can determine the description parameters of the operation event. After receiving the operation event information, the input framework module can notify the application through the view system to request a response to the operation event for processing and display.

[0094] The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying pictures. The view system can be used to input information transmission between the framework module and the application, and between the application and the choreographer.

[0095] The image drawing module can draw images, specifically, it can call the 3D graphics processing library, 2D image engine and other modules of the system library to perform drawing processing to obtain the drawn image. The drawn image can be used for rendering and synthesis processing.

[0096] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including connecting, hanging up, etc.).

[0097] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.

[0098] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0099] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.

[0100] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.

[0101] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.

[0102] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.

[0103] The system library can include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL) and choreographer.

[0104] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.

[0105] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0106] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis and layer processing, etc.

[0107] A 2D graphics engine is a drawing engine for 2D drawings.

[0108] The choreographer can receive the animation drawing instructions from the view system, and call the surface manager, 3D graphics processing library, 2D graphics engine and other modules to perform animation drawing to obtain the drawn image.

[0109] Choreographer and its rendering and synthesis process: The choreographer can coordinate and manage the timing of animation and rendering operations of the interface, and can be responsible for the rendering, synthesis and display of the interface. Specifically, the choreographer can be used to request a vertical synchronization signal (vsync), and start rendering and synthesis operations in response to the requested vertical synchronization signal. The vertical synchronization signal is provided by the operating system, and is used to coordinate and synchronize the choreographer operation and the surfaceFlinger (surface synthesizer) operation. The generation of the choreographer and the triggering conditions for the execution of the drawing operation: After each application is launched by the user, this application needs to display a visual interface or view, and at least one choreographer belonging to the application will be generated. Among them, the number of choreographers can be the same as the choreographer of the thread used by the application.

[0110] When the application needs to refresh the interface or view, the choreographer will request a vertical synchronization signal from SurfaceFlinger to seek a suitable time for drawing operations. After receiving the vertical synchronization signal sent by SurfaceFlinger, the choreographer starts to perform drawing operations. Among them, SurfaceFlinger is a service provided by the underlying operating system, which is used to receive requests from choreographers of different applications and distribute vertical synchronization signals to the application in response to the request. Among them, the generation of vertical synchronization signals can be generated by software simulation or by hardware of electronic equipment, which is not specifically limited.

[0111] The frequency of the vertical synchronization signal of the electronic device is associated with the screen refresh rate of the electronic device. For example, the vertical synchronization signal and the screen refresh rate are both 90 Hz. The embodiment of the present application does not limit the frequency of the vertical synchronization signal.

[0112] The kernel layer is the foundation of the Android operating system. The final functions of the Android operating system are completed through the kernel layer. The kernel layer at least includes display drivers, etc. The display driver can obtain the image frames that have been drawn from the buffer and control the display to display them in sequence. The touch driver can obtain the operation events of the touch sensor and upload the relevant information of the operation events to the input event receiving module.

[0113] The hardware layer may include touch sensors, displays, graphics processing units (GPUs), CPUs, and memory, etc. Among them, the touch sensors can detect the start (start event) and end (end event) of the user's touch operation, as well as the start and end positions of the touch operation. The display can display the image frames after the motion effect processing. The graphics processor can perform the rendering and synthesis process of the image. The central processing unit (CPU) can draw the image.

[0114] It should be noted that the application provides Figure 4 The software structure diagram of the electronic device shown is only an example and does not limit the specific module division in different layers of the Android operating system. For details, please refer to the introduction of the Android operating system software structure in conventional technology. In addition, the display method provided by this application can also be implemented based on other operating systems, and this application will not give examples one by one.

[0115] Figure 5 1 is a flow chart of a method for drawing an interface provided exemplarily in an embodiment of the present application. Figure 5 As shown, the following specifically describes the operation detection and interface refresh process of the electronic device for a user's operation in steps:

[0116] The electronic device detects the input events of the user operation according to the acquisition cycle. For example, the detection time can correspond to T0, T2, T3, T4, T5, T6, ..., T7 and T9, etc. (wherein, the adjacent detection time interval is one acquisition cycle). The electronic device can refresh the display interface according to the refresh cycle, and the refresh time can correspond to vsync1, vsync2, vsync3, ..., vsyncM, etc. (wherein, the adjacent refresh time interval is one refresh cycle). The user's first operation starts at time T1 and ends at time T8. Among them, the first operation can be a click operation, a sliding operation, or other types of operations, which is not limited in this application.

[0117] In the embodiment of the present application, the input events of the user operation include a start event, a move event and an end event.

[0118] 1. Collect the start event of the first operation, process and display it immediately:

[0119] The electronic device can detect the output events of the user operation according to the collection period. Before the first operation, the user did not start the operation for the electronic device. At time T0, the electronic device did not detect the input event of the user operation, that is, there was no event. At time T1, the user began to touch the screen of the electronic device. At time T2, which is one collection cycle after time T0, the electronic device collects the start event of the first operation. The start event can be understood as an event from the user operation that was not detected to the user operation that was detected. Among them, there is an acquisition cycle between time T0 and time T2. At time T1, the user starts to touch the screen of the electronic device, and the revelation time of the first operation can be between the collection cycles of T0 and T2. When the electronic device detects the start event, the electronic device immediately triggers the processing and display process for the start event, that is, immediately responds to the start event to perform drawing, rendering and display processing.

[0120] 2. Collect the movement event of the first operation (not the last movement event), process and display it according to the refresh cycle:

[0121] Before the first operation ends, the electronic device can obtain the movement event of the first operation by periodically collecting the input event of the user operation. The movement event is the user operation event collected during the process of detecting the first operation. Figure 5 As shown, at time T3, time T4, time T5, time T6, ..., time T7, the electronic device periodically collects and collects mobile event 1, mobile event 2, mobile event 3, mobile event 4, ..., mobile event N respectively.

[0122] In the embodiment of the present application, the movement event can be divided into the last movement event and the non-last movement event. Among them, the last movement event is the input event of the first operation detected for the last time, the last movement event is followed by the end event of the nearest neighbor; the non-last movement event is followed by the nearest neighbor movement event. Among them, the T3 moment, the T4 moment, the T5 moment, the T6 moment, ..., the TN-1 moment are all non-last movement events; the TN last movement event.

[0123] Since the frequency of collecting operation events of electronic devices is high, while the frequency of display refresh is low, therefore, for a plurality of consecutive collected movement events of an operation (except the last collected movement event, i.e. Figure 5 The movement event N) in can be processed according to the refresh cycle vsync signal (vertical synchronization signal) of the application.

[0124] For the movement event 1 after the start event, the electronic device waits until the application display refresh cycle vsync2 arrives before processing. For the movement event 2 and the movement event 3, the electronic device processes them when the display refresh cycle vsync3 arrives.

[0125] 3. Collect the end move event of the first operation, process and display it immediately:

[0126] When the electronic device obtains the movement event N, if it is determined that the input event of the next collection cycle after the movement event N is the end event, the movement event N can be determined as the end movement event, and the display processing can be drawn immediately without waiting for the display refresh cycle. Among them, the end movement event is the last movement event of the first operation, and the end event is collected after the end movement event.

[0127] 4. Collect the end event of the first operation, process and display it immediately:

[0128] The user ends the operation at time T8, and the electronic device periodically collects operation events. At time T9, the electronic device cannot detect the user's operation, so it can be determined that a hand-raising event has been obtained. The electronic device can immediately trigger the drawing process for the hand-raising event. During this process, there is no need to wait for the vsyncM signal to trigger image processing and display.

[0129] In the above process, except for the end movement event, all non-end movement events need to be triggered by periodic vsync signals to trigger drawing. However, if the movement event is far from the next vsync, the waiting time will be too long, the response and processing speed of the electronic device will be too slow, and the interactive experience of the user operation will be poor.

[0130] Above Figure 5 In the implementation method, the electronic device can collect mobile events and cache the relevant information of the mobile events because the sensor collects user operations at a high frequency, while the display of the electronic device refreshes at a low frequency and collects input events at a high frequency. The electronic device processes multiple cached mobile events according to the signal period of the vertical synchronization signal of the application. Each time the electronic device processes, it usually only selects one of the mobile events for processing and display refresh. In the above process, the processing of mobile events generally needs to wait for the vertical synchronization signal of the application to be triggered. During the process of waiting for the vertical synchronization signal of the application, the processing response to the mobile event is slow, and the processing and interface refresh are slow, resulting in a poor user experience.

[0131] In view of the above problems, the embodiments of the present application provide a display method and an electronic device. The electronic device determines whether the time difference between the moving event and the vertical synchronization signal of the next application is less than or equal to the threshold duration. If the time difference is less than or equal to the threshold duration, the electronic device can trigger the rendering synthesis and display process in advance.

[0132] Figure 6 FIG. 1 is a flow chart of another method for drawing an interface disclosed in an embodiment of the present application. Figure 6 As shown, for a user's operation, the electronic device's operation detection and interface refresh process. The following is a detailed description of the steps:

[0133] 1. Collect the start event of the first operation, process and display it immediately.

[0134] 2. Collect the movement event of the first operation (not the last movement event), and determine whether to process and display it based on the event time and refresh cycle: if the time difference between the event time and the refresh cycle is less than or equal to the threshold duration, trigger immediately; otherwise wait for the refresh cycle to process and display.

[0135] 3. Collect the end move event of the first operation, process and display it immediately.

[0136] 4. Collect the end event of the first operation, process and display it immediately.

[0137] in, Figure 6 Steps 1, 3, and 4 can be found in Figure 5 Related description in .

[0138] In step 2, it is determined whether to process the motion event in advance: when the motion event 1 is received at time T3, the electronic device determines that the time difference between T3 and vsync2 is less than or equal to the threshold duration, so it is determined to trigger processing and display immediately (process the events in the current buffer immediately at one time), thereby comparing with Figure 5 The method shown in the figure can trigger the processing of the mobile event in advance. When the mobile event 2 is received at time T4, the electronic device determines that the time difference between T4 and vsync3 is greater than the threshold duration, so it is determined not to trigger the processing and display. When the mobile event 3 is received at time T5, it is determined that the time difference between T5 and vsync3 is less than or equal to the threshold duration, so it is determined to immediately trigger the processing and display (immediately process the events in the current buffer at one time), thereby comparing with Figure 5 The method shown in the figure can advance the time of vsync3-T5 to trigger the processing of the mobile event. The processing methods of the other events mentioned above can refer to Figure 5 The relevant description is not repeated here.

[0139] In the above implementation, when a motion event is acquired, if the duration between the detection time of the motion event and the next vsync is less than or equal to the threshold duration, the electronic device can trigger the processing and display process in advance; otherwise, it needs to wait for the motion event of the next acquisition cycle and trigger the processing and display process according to the next vsync time. Figure 6 As shown, at time T3, the electronic device triggers the processing and display of mobile event 1 in advance; when vsync2 arrives, mobile event 1 has been processed and is no longer processed or displayed. At time T5, the electronic device triggers the processing and display of mobile event 2 and mobile event 3 in advance. When vsync3 arrives, mobile event 2 and mobile event 3 have been processed and are no longer processed or displayed. In the above process, it is determined that the mobile event can be processed and displayed in advance, and on the basis of periodic refresh of the display, the response is responded to in advance to the greatest extent possible, while ensuring the refresh frequency, speeding up the response processing, reducing processing delays, reducing freezes, and improving user interaction experience. Regarding the above Figure 2A and Figure 2B The above processing can improve the process with the user, speed up the response, and improve the user's interactive experience. Figure 3A to Figure 3EIn the red envelope grabbing processing interface, when the user clicks "open red envelope", due to the extremely short collection period, the electronic device can also obtain the start time, movement event and end event of this operation. In the process of grabbing red envelopes, the earlier the red envelope event is responded to, the greater the probability of grabbing a red envelope. In the above process, the movement event is triggered in advance. If the response result of a certain movement event is to grab a red envelope, responding in advance can increase the probability of grabbing a red envelope, thereby improving the user's experience of grabbing red envelopes.

[0140] Combination Figure 6 method, Figure 7A to Figure 7C FIG. 1 is a flow chart of another method for drawing an interface disclosed in an embodiment of the present application. Figure 7A to Figure 7C As shown, the method for drawing the interface may include but is not limited to the following steps:

[0141] Fig. 7A The figure shows that when a user starts a first operation, the electronic device periodically collects user operations, detects the first operation for the first time, obtains a first event, and detects the first operation for the second time, obtains a second event. And the processing process for the first event and the second event:

[0142] S701 to S710 are the processing process of the electronic device detecting the execution of the first operation for the first time (detecting the start event, immediately executing the processing and displaying):

[0143] S701: The touch sensor detects a first operation.

[0144] In the above Figure 6 In the example, at time T1, the user touches the display, and at time T2, the electronic device can detect the first operation through the touch sensor. It should be noted that at time T0 of the previous acquisition cycle before time T2, the electronic device did not detect the first operation.

[0145] The user's first action can refer to Figure 2B User actions in Figure 3D The first operation may be a touch operation, such as a sliding operation or a clicking operation. Alternatively, the first operation may also be an air gesture operation, etc., which is not limited in this application.

[0146] In addition, the touch sensor can detect user operations according to a specific acquisition cycle.

[0147] S702: The touch sensor sends a first event message to the input event receiving module.

[0148] When the touch sensor detects a first operation, a first event message may be sent to the input event receiving module. Correspondingly, the input event receiving module may receive the first event message from the touch sensor. The first event message may include an operation identifier. The operation identifier may indicate that an operation is detected or that no operation is detected. For example, if a user operation is detected, the operation identifier is "1"; if no user operation is detected, the operation identifier is "0". The operation identifier in the first event message may be used to indicate that an operation is detected.

[0149] At this time, the first event may be a start event of the first operation (eg, a touch_down event).

[0150] S703: The input event receiving module creates a first buffer.

[0151] When the input event receiving module obtains the first event message, it can determine that the first operation is detected, and start to create a first buffer if the buffer (batch) is not created. Exemplarily, the input event receiving module can apply for a polling buffer and determine the storage address of the memory corresponding to the first buffer, that is, the first storage address. The buffer can be used to record the information of the movement event.

[0152] In the embodiment of the present application, the video memory may include batch and buffer, both of which can be used to cache data. Among them, batch can be used to cache relevant information of movement events; buffer can be used to cache images synthesized by rendering data for display.

[0153] When the input event receiving module determines that a user operation is detected in the first event message received, it can determine whether to create a buffer. If a buffer has been created, it is not created; if a buffer has not been created, the buffer creation process is performed. Currently, the buffer has not been created, and the input event receiving module can determine that a buffer needs to be created.

[0154] Combination Figure 6 In the method shown in the embodiment of the present application, it is not necessary to process every movement event, so a buffer is created to store relevant information of the movement event, and the vsync signal of the electronic device is periodically triggered to process and display the movement events in the buffer at one time.

[0155] Optionally, the input event message may include a device identifier, and the input event receiving module may determine which device the first operation comes from based on the device identifier in the first event message. For example, the first event may be acquired by a touch sensor, and it may be determined that the first event is an event of a user touching a display.

[0156] S704: The input event receiving module sends first event information to the input framework module.

[0157] After the input event receiving module obtains the first event message, it can send the first event information to the input framework module. The first event information can include time information and coordinate information of the first event.

[0158] S705: The input framework module determines that the first event is a starting event, and determines description parameters of the first event.

[0159] The description parameters of the event may include one or more of the event type, time information, and coordinate information. The time information is the time when the electronic device collects the first event, and the coordinate information is the touch position when the first event is collected. In the embodiment of the present application, the event types of the input event may include three types: start event, move event, and end event. The input framework module determines that the last collection cycle of the first event did not obtain an operation event (such as Figure 6 In the example, there is no event at time T0, and the first event is determined to be the starting event of the first operation.

[0160] S706: The input framework module sends a first interface processing request to the application through the view system.

[0161] The input framework module may send a first interface processing request to the application through the view system. Correspondingly, the application may receive the first interface processing request from the input framework module through the view system. The first interface processing request may be used to request a response to a start event (first event) for immediate display refresh. Optionally, the first interface processing request may include an identifier of the first event.

[0162] Optionally, the first interface processing request may include an event type. Among them, the event type includes: a start event, an end event and a move event, wherein the move event can be divided into an end move event and a non-end move event. In the embodiment of the present application, for the start event and the end event, the electronic device does not need to cache, and directly processes and displays. For the move event, if it is not the end move event, it is necessary to wait for the vsync signal to merge the move events in the buffer for processing and display. If it is the end move event, it immediately triggers the merge of the move events in the buffer for processing and display. In S706, since the first event is a start event, the first interface processing request may include a start event type.

[0163] Optionally, the first interface processing request may include a processing type. The processing type may include three input event processing methods: immediate processing, processing cache according to vsync signal, and immediate processing cache. Among them, when the current event is a start event, an end event, and, the processing type is determined to be immediate processing; when the current event is a non-end movement event, the processing type is determined to be processing cache according to vsync signal; when the current event is an end movement event, the processing type is determined to be immediate processing cache. At this time, when the first event is a start event, the input framework module can determine that the first interface processing request includes a processing type of immediate processing.

[0164] S707: The application sends a first interface processing instruction to the choreographer through the view system.

[0165] When the application can determine to immediately process the first event based on the first interface processing request, the application can send the first interface processing instruction to the choreographer through the view system. Correspondingly, the choreographer can receive the first interface processing instruction from the application through the view system. The first interface processing instruction can be used to instruct the electronic device to perform interface processing and display for the first event, that is, the interface processing instruction can be used to instruct the choreographer to immediately perform rendering, synthesis and display.

[0166] The application program may periodically obtain a vsync signal, which is used to trigger a display refresh of the first application program, that is, it can be understood that the signal period of the vsync signal is a refresh period of the display interface of the first application program.

[0167] After receiving the first interface processing request, the application can determine the sending time of the first interface processing instruction. If the first interface processing request includes the event type of the first event, the sending time is based on the event type. If the first interface processing request includes the processing type of the first event, the sending time is based on the processing type. Among them, the sending time can include: immediate sending and vsync signal sending.

[0168] Optionally, when the first interface processing request may include an event type, the application determines the timing of sending the interface processing instruction for different event types. When the event type is a start event, an end event, or an end movement event, the interface processing instruction may be sent immediately to the choreographer. When the event type is a non-end movement event, the vsync signal may be waited for, and when the vsync signal arrives, the interface processing instruction may be sent to the choreographer. Wherein, when the event type is a movement event, the interface processing instruction may include cache processing information, the cache processing information may be used to request a movement event in a first buffer of the processing buffer, and the cache processing information may include a first storage address.

[0169] Optionally, when the first interface processing request may include a processing type, the application determines the timing of sending the interface processing instruction for different processing types. When the processing type is immediate processing, the interface processing instruction may be sent to the choreographer immediately. When the processing type is to process the cache according to the vsync signal, the vsync signal may be waited for, and when the vsync signal arrives, the interface processing instruction may be sent to the choreographer. When the event type is to process the cache immediately, the interface processing instruction may be sent to the choreographer immediately without waiting for the app_vsync signal. When the processing type is to process the cache, the interface processing instruction may include current cache processing information, the cache processing information is used to request processing of cache events in the first cache, and the cache processing information may include a first storage address.

[0170] In the above two implementations, since the first event is a starting event, the application can immediately send a first interface processing instruction to the choreographer through the view system in response to the first interface processing request.

[0171] In the above process, the electronic device needs to send interface processing instructions at different times for different interface processing requests. The different contents of the interface processing instructions mean different processing and display methods for the choreographer. The second event, the third event, the fourth event, etc. will be described in detail below.

[0172] S708: The choreographer performs image rendering and synthesis to obtain a first processed image.

[0173] After receiving the processing instruction based on the first interface, the choreographer can start to perform image rendering and synthesis, mainly for the display interface of the current application. During the rendering and synthesis process, the choreographer can call modules such as a three-dimensional graphics processing library, a two-dimensional graphics engine, and a media library to perform image rendering and synthesis processing to obtain a first processed image. Afterwards, the first processed image can be cached in a display buffer.

[0174] The first processed image may include Y frame images, where Y is a positive integer.

[0175] Optionally, when the application receives an interface processing request, it determines to immediately execute a process of interface processing and display.

[0176] S709: The choreographer sends a first image display instruction to the display driver.

[0177] After the choreographer obtains the first processed image, he can send a first image display instruction to the display driver. Correspondingly, the display driver can receive the first image display instruction from the choreographer. The first image display instruction is used to instruct the display driver to display the first processed image.

[0178] S710: The display driver displays the first processed image.

[0179] After the display driver obtains the first image display instruction, it can display the first processed image in the display buffer on the display screen.

[0180] S711 to S720 are the processing procedures performed when the electronic device detects a movement event of the first operation:

[0181] S711: The touch sensor detects a first operation.

[0182] The touch sensor of the electronic device performs periodic data collection and processing, and detecting a touch operation for the second time may represent that the operation has not yet ended.

[0183] Among them, the specific description of S711 can refer to the description of S701 and will not be repeated here.

[0184] S712: The touch sensor sends a second event message to the input event receiving module.

[0185] When the touch sensor detects the first operation, the second event message may be sent to the input event receiving module. Correspondingly, the input event receiving module may receive the second event message from the touch sensor. The description of S712 may refer to the relevant description of S702, which is not repeated here.

[0186] The second event message may include an operation identifier, and the operation identifier may indicate that a user operation is detected. For details, please refer to S702.

[0187] After receiving the second event message from the touch sensor, the input event receiving module can determine that a buffer has been created and determine not to create a buffer. The judgment process can refer to the relevant description of S703 and will not be repeated here.

[0188] S713: The input event receiving module sends second event information to the input framework module.

[0189] When the input event receiving module receives the second event, the second event information can be sent to the input framework module. Correspondingly, the input framework module can receive the second event information from the input event receiving module. The second event information includes the storage address of the first buffer mentioned above. The second event information also includes the time information, coordinate information, etc. of the second event.

[0190] S714: The input framework module determines that the second event is a moving event, determines description parameters of the second event, and stores the description parameters of the second event in the first buffer.

[0191] When the input framework module receives the second event, the event type of the second event can be determined as a moving event according to the last event type (starting event). Afterwards, the electronic device can determine the description parameters of the second event. The specific content of the description parameters can refer to the relevant description of S705 and will not be repeated.

[0192] After the input framework module determines the description parameters of the second event, the description parameters of the second event may be stored according to the storage address of the first buffer.

[0193] S715: The input framework module sends a second event storage notification to the input event receiving module.

[0194] After the input framework module stores the description parameters of the second event in the first buffer, a second event storage notification may be sent to the input event receiving module. Correspondingly, the input event receiving module may receive the second event storage notification from the input framework module. The second event storage notification may be used to notify the completion of the second event storage.

[0195] S716: The input event receiving module determines whether to process and display in advance based on the first time difference between the time information of the second event and the first vertical synchronization signal, and the threshold duration.

[0196] If it is determined that the processing and display are to be performed in advance, S717 is executed; if it is determined that the processing is not to be performed in advance, the output event receiving module can send an interface processing instruction to the application through the view system, and the application triggers the processing and display according to the refresh cycle.

[0197] After the input event receiving module executes S715, it can be based on whether the first time difference between the acquisition time of the second event and the periodic signal is less than or equal to the threshold duration. In the case where the first time difference is less than or equal to the threshold duration, it may be necessary to process in advance and execute S717; in the case where the first time difference is greater than the threshold duration, it may be determined to send an interface processing instruction to the application, and the application determines whether to trigger a response according to the periodic vsync signal.

[0198] The threshold duration may be equal to a collection cycle for collecting user operations.

[0199] S717: The input event receiving module sends a second interface processing instruction to the choreographer through the view system.

[0200] In S716, if the input event receiving module determines that it needs to be processed and displayed in advance, S717 can be executed, and the input event receiving module can send a second interface processing instruction to the choreographer through the view system. Correspondingly, the choreographer can receive the second interface processing instruction from the input event receiving module through the view system. At this time, there is no need to execute the process such as S706 to S707, and the triggering process does not need to be processed by the application program, thereby ensuring the reliability and efficiency of the method execution.

[0201] S718: The choreographer performs image rendering and synthesis to obtain a second processed image.

[0202] After the choreographer obtains the second interface processing instruction, he can immediately perform image rendering and synthesis to obtain a second processed image. S718 may refer to the relevant description of S708.

[0203] To illustrate the choreographer's handling of the second event, Figure 8 FIG. 1 is a flow chart of an image processing method for caching events provided in an embodiment of the present application. Figure 8 As shown, the image processing method of the cache event may include but is not limited to the following steps:

[0204] After the choreographer receives the interface processing instruction, he can start executing the processing steps S801 to S808:

[0205] S801: The choreographer calls back the input event.

[0206] The choreographer may call back the input event, that is, obtain the currently received event information, and the electronic device may store an input event sequence in its memory, and the choreographer may read the input event sequence. For example, the second event.

[0207] Assuming that the second interface processing instruction includes an identifier of a second event, the choreographer may read the second event in the input event sequence based on the event identifier.

[0208] S802: The choreographer sends an input event consumption request to the view system.

[0209] The choreographer can send an input event consumption request to the view system. Correspondingly, the view system can receive the input event consumption request from the choreographer. The input event consumption request is used to request the view system to process the input event.

[0210] S803: The view system sends a first consumption event to the input event receiving module.

[0211] The view system may send the first consumption event to the input event receiving module. Correspondingly, the input event receiving module may receive the first consumption event from the view system.

[0212] S804: The input event receiving module sends a first consumption request to the input framework module.

[0213] After receiving the first consumption event, the input event receiving module may send a first consumption request to the input framework module. Correspondingly, the input framework module may receive the first consumption request from the input event receiving module. The first consumption request may include the storage address of the first buffer.

[0214] S805: The input framework module consumes the first buffer and releases the buffer.

[0215] After receiving the first consumption request, the input framework module may consume the first buffer and release the first buffer.

[0216] S806: The input event receiving module sends an event scheduling request to the view system.

[0217] The input event receiving module can send an event dispatching request to the view system. Correspondingly, the view system can receive the event dispatching request from the input event receiving module.

[0218] S807: The view system consumes the second event.

[0219] After receiving the event dispatch request, the view system can respond to the second event and perform drawing preprocessing, for example, displaying the canvas for layout and measurement, determining the window sliding distance, etc. The specific processing process of consuming the second event is not limited.

[0220] In the above process, when the encoder completes S718, it is determined to release the first buffer.

[0221] S719: The choreographer sends a second image display instruction to the display driver.

[0222] S720: The display driver displays the second processed image.

[0223] Among them, the description of S719 to S720 can refer to the relevant content of S709 to S710, without limitation.

[0224] The above Fig. 7A The first event in can be referred to Figure 6 The starting event in the second event can refer to Figure 6 The mobile event 1 in is not described in detail.

[0225] Through the judgment process of S716, the electronic device can determine whether the first vertical synchronization signal is very close. If the time is close, the processing and display process can be triggered in advance, which speeds up the rendering, synthesis and display process of the mobile event response and improves the user touch response speed. In the above process, the electronic device determines whether to refresh in this acquisition cycle on the basis of periodic refresh, and understands and processes the cached mobile event without waiting in the case of refreshing in this acquisition cycle, advances the display response processing, speeds up the response speed, and improves the user's interactive experience.

[0226] Figure 7B It is a process in which the electronic device detects the first operation for the third time and the fourth time, and processes and displays the third event and the fourth event.

[0227] S721: The touch sensor detects a first operation.

[0228] Among them, S721 can refer to the relevant descriptions of S701 and S711 and will not be repeated here.

[0229] S722: The touch sensor sends a third event message to the input event receiving module.

[0230] Among them, the third event can refer to Figure 6 The movement event 2 in the example. For S722, reference may be made to the related descriptions of S702 and S712, which will not be described in detail.

[0231] S723: The input event receiving module creates a second buffer.

[0232] Among them, S723 can refer to the relevant description of S703 and will not be repeated here.

[0233] S724: The input event receiving module sends the third event information to the input framework module.

[0234] Among them, S724 can refer to the relevant description of S713.

[0235] The third event information may include the second storage address of the second buffer, time information and coordinate information of the third event.

[0236] S725: The input framework module determines that the third event is a moving event, determines description parameters of the third event, and stores the description parameters of the third event in the second buffer.

[0237] Among them, S725 can refer to the relevant description of S714 and will not be repeated here.

[0238] S726: The input framework module sends a third event storage notification to the input event receiving module.

[0239] Among them, S726 can refer to the relevant description of S715 and will not be repeated here.

[0240] S727: The input event receiving module determines whether to process and display in advance based on the time information of the third event, the second time difference between the second vertical synchronization signal, and the threshold duration.

[0241] Among them, the judgment process of S727 can refer to the relevant content of S716 and will not be repeated here.

[0242] At this time, if it is determined that the second time difference between the time information of the third event and the second vertical synchronization signal is greater than the threshold duration and it is determined that no advance processing is required, S728 is executed. The output event receiving module can send an interface processing instruction to the application through the view system, and the application triggers processing and display according to the refresh cycle.

[0243] Among them, S727 can refer to the relevant descriptions of S716 and S706, which will not be repeated here.

[0244] S728: The input event receiving module sends a third interface processing request to the application through the view system.

[0245] If it is determined that advance processing is not required in S727, the input event receiving module may send a third interface processing request to the application through the view system. Correspondingly, the application may receive the third interface processing request from the input event receiving module through the view system.

[0246] The application can periodically trigger the processing of motion events in the buffer according to vsync. Currently, the application has not yet triggered a response to the motion event.

[0247] S729: The touch sensor detects a first operation.

[0248] S730: The touch sensor sends a fourth event message to the input event receiving module.

[0249] Among them, the fourth event can refer to Figure 6 Mobile event 3 in.

[0250] S731: The input event receiving module sends fourth event information to the input framework module.

[0251] S732: The input framework module determines that the fourth event is a moving event, determines description parameters of the fourth event, and stores the description parameters of the fourth event in the second buffer.

[0252] S733: The input framework module sends a fourth event storage notification to the input event receiving module.

[0253] The processing of S729 to S733 mentioned above can refer to the relevant description of the processing of S711 to S715 and S721 to S726, which will not be repeated here.

[0254] S734: The input event receiving module determines whether to process and display in advance based on the time information of the fourth event and the third time difference between the third vertical synchronization signal and the threshold duration.

[0255] If it is determined that the processing is done in advance, S725 is executed; the output event receiving module can send an interface processing instruction to the application through the view system, and the application triggers processing and display according to the refresh cycle.

[0256] When the input event receiving module receives the fourth event storage notification, it can determine that the third time difference between the time information of the fourth event and the third vertical synchronization signal is less than or equal to the threshold duration, and determine to process in advance. S734 can refer to the relevant description of S716 and S727.

[0257] At this time, it is determined that early processing and display are required, and S735 is executed.

[0258] S735: The input framework module sends a fourth interface processing instruction to the application through the view system.

[0259] In the above S734, it is determined that S735 needs to be executed, so the input framework module can send the fourth interface processing instruction to the application through the view system. Correspondingly, the application can receive the fourth interface processing instruction from the input framework module through the view system. In the case of obtaining the vertical synchronization signal, the application sends the third interface processing instruction to the choreographer through the view system.

[0260] Among them, S735 can refer to the relevant description of S717 and will not be repeated here.

[0261] S736: Rendering and synthesizing the choreographer image to obtain a third processed image.

[0262] S737: The choreographer sends a third image display instruction to the display driver.

[0263] S738: The display driver displays the third processed image.

[0264] Among them, the processing process of S736~S738 can refer to the relevant description of S708~S710 and S718~S720, and will not be repeated here.

[0265] Figure 7CIt is the process in which the electronic device detects the first operation for the N+1th time (the last time the operation is detected, i.e., the end movement event) and fails to detect the first operation (the first time it fails to detect after the operation), and processes and displays the N+1th event and the N+2th event.

[0266] S739: The touch sensor detects a first operation.

[0267] S740: The touch sensor sends the N+1th event message to the input event receiving module.

[0268] Among them, the N+1th event corresponds to Figure 6 The number of moving events N in .

[0269] S741: The input event receiving module sends the N+1th event information to the input framework module.

[0270] S742: The input framework module determines that the N+1th event is a moving event, determines description parameters of the N+1th event, and stores the description parameters of the N+1th event in the Kth buffer.

[0271] S743: The input framework module sends the N+1th event storage notification to the input event receiving module.

[0272] Among them, the processing process of S739~S743 can refer to the relevant description of S711~S715 and S729~S733, and will not be repeated here.

[0273] S744: The touch sensor cannot detect the first operation.

[0274] In the above Figure 6 In the example, the user operation ends at time T8, and at time T9, the electronic device can no longer detect the first operation through the touch sensor. It should be noted that in the previous acquisition at time T7, the electronic device can detect the first operation.

[0275] S745: The touch sensor sends the N+2th event message to the input event receiving module.

[0276] Among them, the N+2 event corresponds to Figure 6 The end event in .

[0277] S746: The input event receiving module sends the N+2th event information to the input framework module.

[0278] Among them, S745~S746 can refer to the relevant description of S702 and S704, and will not be repeated here.

[0279] S747: The input framework module determines that the N+2th event is an end event, determines the description parameters of the N+2th event, and determines that the N+1th event is an end movement event.

[0280] In S747, the process of determining the N+2th event as the end event and determining the description parameters of the N+2th event can still refer to the relevant description of S705. In addition, when the input framework module determines that the N+2th event is the end event, the N+1th event can be determined as the end movement event.

[0281] S748: The input framework module sends the K+1th interface processing request to the application through the view system.

[0282] For details of S748, reference may be made to the relevant contents of S728. The K+1th interface processing request may include identification information that the N+1th event is the last movement event. The K+1th interface processing request is used to request that the movement event in the current Kth buffer be processed immediately.

[0283] S749: When the N+1th event is the end move event of the first operation, the application sends the K+1th interface processing instruction to the choreographer through the view system.

[0284] Among them, S749 can refer to the relevant content of S707 for details.

[0285] Optionally, the execution process of S748 to S749 may be: when the input framework module determines that the N+1 event is the end movement event, the input framework module may send the K+1 interface processing instruction to the choreographer through the view system. Correspondingly, the choreographer may receive the K+1 interface processing instruction from the input framework module through the view system.

[0286] S750: The choreographer performs image rendering and synthesis to obtain the K+1th processed image.

[0287] S751: The choreographer sends a K+1th image display instruction to the display driver.

[0288] S752: The display driver displays the K+1th processed image.

[0289] Among them, S750~S752 can refer to the relevant descriptions of S708~S710, S718~S720, and S736~S738, and will not be repeated here.

[0290] S753: The input framework module sends the K+2th interface processing request to the application through the view system.

[0291] The K+2th interface processing request is used to request processing and display of the end event.

[0292] S754: When the N+2th event is an end event, the application sends the K+2th interface processing instruction to the choreographer through the view system.

[0293] S755: The choreographer performs image rendering and synthesis to obtain the K+2th processed image.

[0294] The K+1th interface processing request is used to request the movement event in the current Kth buffer to be processed immediately.

[0295] S756: The choreographer sends a K+2th image display instruction to the display driver.

[0296] S757: The display driver displays the K+2th processed image.

[0297] Among them, the processes of S755 to S757 can refer to the relevant descriptions of S708 to S710, S718 to S720, and S736 to S738, and will not be repeated here.

[0298] In the above implementation, when the input event receiving module obtains the mobile event storage notification, it determines whether it needs to be processed in advance according to the time difference between the event time and the vsync time. When it needs to be triggered in advance, the choreographer processes it immediately without waiting for the arrival of vsync, thereby ensuring that the mobile event responds faster. Figure 2A and Figure 2B games. and Figure 3A to Figure 3E In the process of grabbing red envelopes, the above processing method can speed up the processing process, refresh and process the electronic device interface in advance, make the game experience better, or increase the probability of grabbing red envelopes, and optimize the user experience.

[0299] It should be noted that, in the embodiment of the present application, the determination of whether the processing and display are performed in advance can be performed by Figure 7A to Figure 7C The input event receiving module in is processed, and of course it can also be executed by the input framework module, application or view system.

[0300] Fig. 9A and Fig. 9B FIG. 1 is a flow chart of another method for drawing an interface disclosed in an embodiment of the present application. Fig. 9A and Fig. 9B As shown, the method for drawing the interface may include but is not limited to the following steps:

[0301] Fig. 9A When the user starts the first operation and the electronic device periodically collects the user operation, the first operation is detected for the first time and the first event is obtained, and the first operation is detected for the second time and the second event is obtained. And the processing process of the first event and the second event is as follows:

[0302] S901 to S910 are the processing process of the electronic device detecting the execution of the first operation for the first time (detecting the start event, immediately executing the processing and displaying):

[0303] S901: The touch sensor detects a first operation.

[0304] S902: The touch sensor sends a first event message to the input event receiving module.

[0305] S903: The input event receiving module creates a first buffer.

[0306] S904: The input event receiving module sends first event information to the input framework module.

[0307] S905: The input framework module determines that the first event is a starting event, and determines description parameters of the first event.

[0308] S906: The input framework module sends a first interface processing request to the application through the view system.

[0309] S907: The application sends a first interface processing instruction to the choreographer through the view system.

[0310] S908: The choreographer performs image rendering and synthesis to obtain a first processed image.

[0311] S909: The choreographer sends a first image display instruction to the display driver.

[0312] S910: The display driver displays the first processed image.

[0313] Among them, the specific description of S901 to S910 can refer to the relevant description of S701 to S710, which is not repeated here.

[0314] S911 to S920 are the processing procedures performed when the electronic device detects a movement event of the first operation:

[0315] S911: The touch sensor detects a first operation.

[0316] S912: The touch sensor sends a second event message to the input event receiving module.

[0317] S913: The input event receiving module sends second event information to the input framework module.

[0318] S914: The input framework module determines that the second event is a moving event, determines description parameters of the second event, and stores the description parameters of the second event in the first buffer.

[0319] S915: The input framework module sends a second event storage notification to the input event receiving module.

[0320] S916: The input framework module determines whether to process and display in advance based on the first time difference between the time information of the second event and the first vertical synchronization signal, and the threshold duration.

[0321] At this time, the input framework module executes the process of determining whether to process and display in advance. The determination logic is the same as that of S716 above and will not be repeated.

[0322] S917: The input framework module sends a second interface processing instruction to the choreographer through the view system.

[0323] S918: The choreographer performs image rendering and synthesis to obtain a second processed image.

[0324] S919: The choreographer sends a second image display instruction to the display driver.

[0325] S920: The display driver displays the second processed image.

[0326] Among them, the specific description of S911~S920 can refer to the relevant description of S711~S720, which is not repeated here.

[0327] Fig. 9B It is a process in which the electronic device detects the first operation for the third time and the fourth time, and processes and displays the third event and the fourth event.

[0328] S921: The touch sensor detects a first operation.

[0329] S922: The touch sensor sends a third event message to the input event receiving module.

[0330] S923: The input event receiving module creates a second buffer.

[0331] S924: The input event receiving module sends the third event information to the input framework module.

[0332] S925: The input framework module determines that the third event is a moving event, determines description parameters of the third event, and stores the description parameters of the third event in the second buffer.

[0333] S926: The input framework module sends a third event storage notification to the input event receiving module.

[0334] S927: The input framework module determines whether to process and display in advance based on the time information of the third event, the second time difference between the second vertical synchronization signal, and the threshold duration.

[0335] S928: The input framework module sends a third interface processing request to the application through the view system.

[0336] S929: The touch sensor detects a first operation.

[0337] S930: The touch sensor sends a fourth event message to the input event receiving module.

[0338] S931: The input event receiving module sends fourth event information to the input framework module.

[0339] S932: The input framework module determines that the fourth event is a moving event, determines description parameters of the fourth event, and stores the description parameters of the fourth event in the second buffer.

[0340] S933: The input framework module sends a fourth event storage notification to the input event receiving module.

[0341] S934: The input framework module determines whether to process and display in advance based on the time information of the fourth event and the third time difference between the third vertical synchronization signal and the threshold duration.

[0342] S935: The input framework module sends a fourth interface processing instruction to the choreographer through the view system.

[0343] S936: Rendering and synthesizing the choreographer image to obtain a third processed image.

[0344] S937: The choreographer sends a third image display instruction to the display driver.

[0345] S938: The display driver displays the third processed image.

[0346] Among them, the details of S921~S938 can refer to the relevant contents of S721~S738.

[0347] The first operation is detected for the N+1th time (the last time the operation is detected, i.e., the end movement event) and the first operation is not detected (the first time after the operation is not detected), and the N+1th event and the N+2th event are processed and displayed. After S938, the electronic device can also execute S939 to S956 (not shown in the figure), for details, please refer to Figure 7C The contents of steps S739 to S757 are not repeated here.

[0348] exist Fig. 9A and Fig. 9B In the embodiment of the present invention, the input framework module determines whether to process and display in advance based on the time information of the input event and the time difference between the vertical synchronization signal and the threshold duration. If it is determined that early processing and display are required, the input framework module can send a fourth interface processing instruction to the choreographer through the view system.

[0349] Fig. 10A and Fig. 10B FIG. 1 is a flow chart of another method for drawing an interface disclosed in an embodiment of the present application. Fig. 10A and Fig. 10B As shown, the method for drawing the interface may include but is not limited to the following steps:

[0350] Fig. 10A When the user starts the first operation and the electronic device periodically collects the user operation, the first operation is detected for the first time and the first event is obtained, and the first operation is detected for the second time and the second event is obtained. And the processing process of the first event and the second event is as follows:

[0351] S1001 to S1010 are the processing procedures of the electronic device detecting the execution of the first operation for the first time (detecting the start event, immediately executing the processing and displaying):

[0352] S1001: The touch sensor detects a first operation.

[0353] S1002: The touch sensor sends a first event message to an input event receiving module.

[0354] S1003: The input event receiving module creates a first buffer.

[0355] S1004: The input event receiving module sends first event information to the input framework module.

[0356] S1005: The input framework module determines that the first event is a starting event, and determines description parameters of the first event.

[0357] S1006: The input framework module sends a first interface processing request to the application through the view system.

[0358] S1007: The application sends a first interface processing instruction to the choreographer through the view system.

[0359] S1008: The choreographer performs image rendering and synthesis to obtain a first processed image.

[0360] S1009: The choreographer sends a first image display instruction to the display driver.

[0361] S1010: The display driver displays the first processed image.

[0362] Among them, the specific description of S1001~S1010 can refer to the relevant description of S701~S710, which is not repeated here.

[0363] S1011 to S1020 are the processing procedures performed when the electronic device detects a movement event of the first operation:

[0364] S1011: The touch sensor detects a first operation.

[0365] S1012: The touch sensor sends a second event message to the input event receiving module.

[0366] S1013: The input event receiving module sends second event information to the input framework module.

[0367] S1014: The input framework module determines that the second event is a moving event, determines description parameters of the second event, and stores the description parameters of the second event in the first buffer.

[0368] S1015: The input framework module sends a second event storage notification to the input event receiving module.

[0369] Among them, S1011~S1015 can refer to the relevant description of S711~S715 and will not be repeated here.

[0370] S1016: The input framework module sends a second interface processing request to the application through the view system.

[0371] The input framework module can send a second interface processing request to the application through the view system. Correspondingly, the application can receive the second interface processing request from the input framework module through the view system. The second interface processing request can be used to request processing of the second event.

[0372] S1017: The application determines whether to process and display in advance based on the first time difference between the time information of the second event and the first vertical synchronization signal, and the threshold duration.

[0373] If the application determines that the type of the second event is a moving event, the process of S1017 can be started. If the application determines that it needs to be processed and displayed in advance, S1018 is executed. The specific judgment process can refer to the relevant description of S716 and will not be repeated.

[0374] S1018: The application sends a second interface processing instruction to the choreographer through the view system.

[0375] The application program may send the second interface processing instruction to the choreographer through the view system. Correspondingly, the choreographer may receive the second interface processing instruction from the application program through the view system.

[0376] S1019: The choreographer performs image rendering and synthesis to obtain a second processed image.

[0377] S1020: The choreographer sends a second image display instruction to the display driver.

[0378] S1021: The display driver displays the second processed image.

[0379] Among them, S1019~S1021 can refer to the relevant description of S718~S720 and will not be repeated here.

[0380] Fig. 10B It is a process in which the electronic device detects the first operation for the third time and the fourth time, and processes and displays the third event and the fourth event.

[0381] S1022: The touch sensor detects a first operation.

[0382] S1023: The touch sensor sends a third event message to the input event receiving module.

[0383] S1024: The input event receiving module creates a second buffer.

[0384] S1025: The input event receiving module sends the third event information to the input framework module.

[0385] S1026: The input framework module determines that the third event is a moving event, determines description parameters of the third event, and stores the description parameters of the third event in the second buffer.

[0386] S1027: The input framework module sends a third event storage notification to the input event receiving module.

[0387] Among them, S1022~S1027 can refer to the relevant description of S721~S726 and will not be repeated here.

[0388] S1028: The input framework module sends a third interface processing request to the application through the view system.

[0389] The input framework module can send a third interface processing request to the application through the view system. Correspondingly, the application can receive the third interface processing request from the input framework module through the view system. The third interface processing request is used to instruct processing of the third event.

[0390] S1029: The application determines whether to process and display in advance based on the time information of the third event, the second time difference between the second vertical synchronization signal, and the threshold duration.

[0391] When the application determines that the type of the third event is a moving event, the process of S1029 can be started. The application determines that it does not need to be processed and displayed in advance, and waits for the next vertical synchronization signal. The specific judgment process can refer to the relevant description of S716, which is not repeated here.

[0392] S1030: The touch sensor detects a first operation.

[0393] S1031: The touch sensor sends a fourth event message to the input event receiving module.

[0394] S1032: The input event receiving module sends fourth event information to the input framework module.

[0395] S1033: The input framework module determines that the fourth event is a moving event, determines description parameters of the fourth event, and stores the description parameters of the fourth event in the second buffer.

[0396] S1034: The input framework module sends a fourth event storage notification to the input event receiving module.

[0397] Among them, S1030~S1034 can refer to the relevant description of S729~S733 and will not be repeated here.

[0398] S1035: The input framework module sends a fourth interface processing request to the application through the view system.

[0399] The input framework module can send a fourth interface processing request to the application through the view system. Correspondingly, the application can receive the fourth interface processing request from the input framework module through the view system. The fourth interface processing request is used to instruct processing of the fourth event.

[0400] S1036: The application determines whether to process and display in advance based on the third time difference between the time information of the fourth event and the third vertical synchronization signal, and the threshold duration.

[0401] If the application determines that the type of the third event is a moving event, the process of S1036 can be started. If the application determines that it needs to be processed and displayed in advance, S1037 is executed. The specific judgment process can refer to the relevant description of S716, which is not repeated here.

[0402] S1037: The application sends a fourth interface processing instruction to the choreographer through the view system.

[0403] The application program may send the fourth interface processing instruction to the choreographer through the view system. Correspondingly, the choreographer may receive the fourth interface processing instruction from the application program through the view system.

[0404] S1038: Rendering and synthesizing the choreographer image to obtain a third processed image.

[0405] S1039: The choreographer sends a third image display instruction to the display driver.

[0406] S1040: The display driver displays the third processed image.

[0407] Among them, the details of S1038~S1040 can refer to the relevant contents of S718~S720.

[0408] The first operation is detected for the N+1th time (the last time the operation is detected, i.e., the end movement event) and the first operation is not detected (the first time after the operation is not detected), and the N+1th event and the N+2th event are processed and displayed. After S1040 is executed, the electronic device can also execute S1041 to S1058 (not shown in the figure), which can be specifically referred to Figure 7C The contents of steps S739 to S757 are not repeated here.

[0409] exist Fig. 10A and Fig. 10B In the embodiment, the application program determines whether to process and display in advance based on the time information of the input event and the time difference between the vertical synchronization signal and the threshold duration. If it is determined that early processing and display are required, the application program may issue an interface processing instruction.

[0410] As used in the above embodiments, the term "when..." may be interpreted to mean "if..." or "after..." or "in response to determining..." or "in response to detecting...", depending on the context. Similarly, the phrases "upon determining..." or "if (the stated condition or event) is detected" may be interpreted to mean "if determining..." or "in response to determining..." or "upon detecting (the stated condition or event)" or "in response to detecting (the stated condition or event)", depending on the context.

[0411] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media integration. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk), etc.

[0412] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.

Claims

1. A display method, characterized in that: The method is applied to an electronic device, and the method comprises: Get the start event of the user's first operation; In response to a start event of the first operation, display a first screen; Obtaining a first movement event of the first operation; In response to the first movement event, when the first duration is less than or equal to a threshold duration, displaying a second picture; The first duration is the time difference between the first detection time of the first movement event and the first vertical synchronization signal, and the first vertical synchronization signal is a vertical synchronization signal that is after the first detection time and closest to the first detection time.

2. The method according to claim 1, characterized in that The method further comprises: When the first duration is greater than a threshold duration, obtaining a second movement event of the first operation; In response to the second movement event, determining whether a second duration is less than or equal to the threshold duration; The second duration is the time difference between the second detection time of the second movement event and the second vertical synchronization signal, the second vertical synchronization signal is a vertical synchronization signal that is after the second detection time and closest to the second detection time, and the second detection time is after the first detection time.

3. The method according to claim 1 or 2, characterized in that: The method further comprises: Detect input events of user operations based on the collection cycle; At a first moment, the electronic device detects no user operation and determines that there is no input event of user operation; The obtaining of the starting event of the first operation of the user includes: At a second moment, the electronic device detects a user operation, and when the last acquisition result is that no user operation is detected, acquires the start event of the first operation; The first moment is separated from the second moment by a collection period, and the first moment is before the second moment.

4. The method according to claim 3, characterized in that The obtaining of the first movement event of the first operation includes: At the Xth moment, the electronic device detects a user operation, and when the last acquisition result is the user operation being detected, a first movement event of the first operation is acquired; The Xth moment is after the second moment.

5. The method according to claim 3, characterized in that: The method further comprises: At the Kth moment, the electronic device detects a user operation; when the last acquisition result is the user operation being detected, a movement event of the first operation is acquired; At the K+1th moment, the electronic device cannot detect the user operation; when the last acquisition result is the user operation being detected, an end event of the first operation is acquired; The Kth moment and the K+1th moment are after the second moment, there is a collection cycle between the Kth moment and the K+1th moment, and the K+1th moment is after the Kth moment.

6. The method according to claim 5, characterized in that The method further comprises: When the first duration is greater than the threshold duration, waiting for detection of the next collection cycle; If at the Kth moment, the electronic device acquires a fourth movement event; At the K+1th moment, the electronic device detects no user operation, determines that the fourth movement event is a final movement event, and displays the third picture; The fourth detection time of the fourth movement event is before the third vertical synchronization signal, and the third vertical synchronization signal is a vertical synchronization signal that is after the fourth detection time and closest to the fourth detection time.

7. The method according to claim 5, characterized in that In the case of acquiring the end event of the first operation, the method further includes: In response to the end event, a fourth screen is displayed.

8. The method according to any one of claims 3 to 7, characterized in that: The threshold duration is the collection period.

9. The method according to claim 1, characterized in that: The method further comprises: Creating a first buffer, wherein the first buffer includes description information of a third movement event; After obtaining the first movement event of the first operation, the method further includes: Acquire description information of the first motion event, where the description information includes detection time, coordinate information, and event type of the first motion event; The description information of the first movement event is stored in the first buffer.

10. The method according to claim 9, characterized in that When the first duration is less than or equal to the threshold duration, the method further includes: determining a target motion event from the motion events in the first buffer; Image rendering and synthesis are performed based on the target movement event to obtain a second processed image, and the second picture includes the second processed image.

11. The method according to claim 9, characterized in that The electronic device comprises an input framework module, an input event receiving module and a display, and the step of creating a first buffer comprises: In the case of detecting a user operation, if the buffer has not been created yet, creating a first buffer through the input event receiving module; Sending event information to the input framework module through the input event receiving module; The acquiring the description information of the first movement event and storing the description information of the first movement event in the first buffer includes: Determining, by the input framework module, description information of a first movement event based on the event information, and storing the description information of the first movement event in the first buffer; Sending an event storage notification to the input event receiving module through the input framework module; The displaying of the second picture when the first duration is less than or equal to the threshold duration includes: The input event receiving module determines that the first duration is less than or equal to the threshold duration, and displays the second picture through the display.

12. An electronic device, characterized in that: include: One or more processors and one or more memories; the one or more processors are coupled to the one or more memories, the one or more memories are used to store computer program codes, the computer program codes include computer instructions, and when the one or more processors execute the computer instructions, the electronic device executes the method as described in any one of claims 1 to 11.

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

Citation Information

Cited By

  • Display method and electronic device

    EP4715586A1

  • Display method and electronic device

    WO2025030834A1