Event distribution method and device and electronic equipment

By real-time detection of the duration of the application processing event and dynamically adjusting the number of events to be distributed, the lag and jitter problems caused by excessive load of electronic devices at high refresh rates are solved, and the application load is reduced from the software level and system fluency is improved.

CN119938237APending Publication Date: 2025-05-06HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311455837.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-03
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

When users choose to have a fixed high refresh rate, the entire machine load of the electronic device is high, which causes the application to be unable to handle distributed events in time, and problems such as lag and jitter occur, especially on devices with low computing power levels.

Method used

The time the application handles distribution events in real time is detected, and the number of events to be distributed is dynamically adjusted. When the duration of the application processing event is detected to be greater than the threshold, the number of events to be distributed is reduced to reduce application load and improve system fluency.

Benefits of technology

It effectively reduces the application load, improves the fluency of the system, avoids the reduction of the number of distribution events under sufficient load, and thus avoids affecting the user's visual experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119938237A_ABST
    Figure CN119938237A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an event distribution method and device and electronic equipment, and the method comprises the steps that in the process of distributing a plurality of first events to a first application in sequence, the duration of processing the ith first event by the first application is detected, the plurality of first events are generated in response to a first operation executed by a user on the first electronic equipment, and the ith first event is generated in response to a second operation executed by the user on the first electronic equipment; i is a positive integer greater than or equal to 1; and when it is detected that the duration of processing the ith first event by the first application is greater than the first duration, resampling the to-be-distributed first events to reduce the number of the to-be-distributed first events. Through the method, the device and the electronic equipment, the duration of processing the distributed events by the application can be detected in real time, then the number of the to-be-distributed events is dynamically adjusted according to the processing duration, and when it is determined that the application is stuck according to the processing duration, the number of the to-be-distributed events is reduced, so that the application load can be reduced from the software level, and the user experience is improved. And the fluency of the system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present application relate to the field of event distribution, and more specifically, to a method, device, and electronic device for event distribution. Background Art

[0002] The fluency of the operating system directly affects the user's experience of the operating system, and the stability of event distribution of electronic devices can directly affect the fluency of the operating system, especially when the user chooses a fixed high refresh rate. The electronic device needs greater computing power to achieve the required operation and hand-following effects. This can easily lead to the application being unable to process the distributed events in a timely manner when the entire electronic device is loaded with a high load, resulting in the application being stuck, jittering, etc., which is particularly prominent on devices with lower computing power levels. Summary of the invention

[0003] The present application provides a method, device and electronic device for event distribution. Through this method, device and electronic device, it is possible to detect in real time the duration of an application processing a distributed event, and then dynamically adjust the number of events to be distributed according to the processing duration. When it is determined that an application freezes according to the processing duration, the number of events to be distributed is reduced, thereby reducing the application load at the software level and improving the fluency of the system.

[0004] In a first aspect, a method for event distribution is provided, the method comprising: in the process of distributing multiple first events to a first application in sequence, detecting the duration of the first application processing the i-th first event, the multiple first events being generated in response to a first operation performed by a user on a first electronic device, wherein i is a positive integer greater than or equal to 1; when it is detected that the duration of the first application processing the i-th first event is greater than the first duration, resampling the first events to be distributed to reduce the number of first events to be distributed.

[0005] In some embodiments, the duration of the first application processing the i-th first event starts with the moment when the i-th first event is distributed to the first application and ends with the moment when the i-th first event processing completion notification sent by the first application is received.

[0006] In some embodiments, the first event comprises a slide event.

[0007] In some embodiments, the first operation performed by the user on the first electronic device includes any one of the following operations: a sliding operation performed by the user on the screen of the first electronic device; or a sliding operation performed by the user on a second electronic device connected to the first electronic device.

[0008] In some embodiments, i=1, 2, 3, ...

[0009] It should be understood that there is no strict order between the distribution process of the first event to be distributed and the resampling process of the first event to be distributed, and these two processes can be carried out simultaneously, that is, the first event to be distributed can be distributed while being resampled. This also makes it possible to dynamically adjust the sampling strategy in real time according to the duration of the application currently processing the first event.

[0010] In an embodiment of the present application, during the event distribution process, the duration of the application processing the distributed events can be detected in real time, and the number of events to be distributed can be dynamically adjusted according to the processing duration. When it is determined that the application is stuck according to the processing duration, the number of events to be distributed is reduced, thereby reducing the application load at the software level and improving the fluency of the system.

[0011] In combination with the first aspect, in a possible implementation, the method also includes: when it is detected that the duration of the first application processing the i+nth first event is less than or equal to the first duration, stopping resampling the first event to be distributed, where n is a positive integer greater than or equal to 1.

[0012] In an embodiment of the present application, during the event distribution process, the duration of the application processing the distributed events can be detected in real time, and the number of events to be distributed can be dynamically adjusted according to the processing duration. When it is detected that the duration of the application's current event processing has not timed out, it indicates that the current load of the application is sufficient to support the event processing process. In this case, the number of events to be distributed is stopped from being adjusted, and the original events to be distributed are continued to be distributed to the application. This can avoid reducing the number of events to be distributed when the load is sufficient, thereby avoiding affecting the user's visual experience.

[0013] In combination with the first aspect, in a possible implementation method, resampling the first event to be distributed includes: resampling the first event to be distributed according to a first rule, the first rule including: re-determining b first events to be distributed for every a first events to be distributed, where a>b, a and b are both positive integers, a≥2, b≥1.

[0014] In some embodiments, the first rule may be fixed or variable. For example, the first rule may change as the duration of the first event currently being processed by the first application changes.

[0015] In an embodiment of the present application, taking the sliding event as the first event as an example, the number of events to be distributed can be reduced by re-determining b first events to be distributed for every a first events to be distributed. The events to be distributed after the reduction in number can still be evenly distributed on the sliding track and be representative, thereby enhancing the user's visual experience during the sliding process.

[0016] In combination with the first aspect, in a possible implementation, the method further includes: determining the values ​​of a and b based on a ratio of a second duration to the first duration, wherein the second duration is the duration for the first application to process the i-th first event.

[0017] In an embodiment of the present application, since the duration of the application's current processing of the first event can directly reflect the application's current processing capability, the resampling rule determined based on the duration of the application's current processing of the first event is more in line with the device's current capability. During the event distribution process, the duration of the application's processing of the distributed event can be detected in real time, and the number of events to be distributed can be dynamically adjusted based on the processing duration, thereby ensuring the user's visual experience during the sliding process to the greatest extent possible.

[0018] In combination with the first aspect, in a possible implementation method, resampling the first event to be distributed includes: re-determining M first events to be distributed by resampling Ni first events to be distributed, wherein M<(Ni), and M and N are both positive integers greater than or equal to 1; the method also includes: determining an optimizable distance based on the jth first event to be distributed among the M first events to be distributed, wherein j=1,2,3,…,M, and j is a positive integer greater than or equal to 1; synthesizing a first image based on the optimizable distance, the first image being displayed after a second image, and the second image refers to an interface image corresponding to the jth first event to be distributed.

[0019] In an embodiment of the present application, the optimizable distance can be calculated based on the resampled sliding events, and between two sliding events after resampling, the optimizable distance is used to synthesize a moving image with the previous frame image. This method can optimize the sliding effect without obtaining information such as the sliding direction and sliding distance, thereby improving the user's visual experience, and is particularly suitable for specific scenarios, such as list sliding scenarios where the sliding display effect is visually obvious.

[0020] In a second aspect, a device for event distribution is provided, the device comprising: a detection module, for detecting a duration for a first application to process an i-th first event during a process of distributing multiple first events to the first application in sequence, the multiple first events being generated in response to a first operation performed by a user on a first electronic device, wherein i is a positive integer greater than or equal to 1; and a processing module, for resampling the first event to be distributed when it is detected that the duration for the first application to process the i-th first event is greater than the first duration, so as to reduce the number of first events to be distributed.

[0021] In some embodiments, the duration of the first application processing the i-th first event starts with the moment when the i-th first event is distributed to the first application and ends with the moment when the i-th first event processing completion notification sent by the first application is received.

[0022] In some embodiments, the first event comprises a slide event.

[0023] In some embodiments, the first operation performed by the user on the first electronic device includes any one of the following operations: a sliding operation performed by the user on the screen of the first electronic device; or a sliding operation performed by the user on a second electronic device connected to the first electronic device.

[0024] In some embodiments, i=1, 2, 3, ...

[0025] It should be understood that there is no strict order between the distribution process of the first event to be distributed and the resampling process of the first event to be distributed, and these two processes can be carried out simultaneously, that is, the first event to be distributed can be distributed while being resampled. This also makes it possible to dynamically adjust the sampling strategy in real time according to the duration of the application currently processing the first event.

[0026] In an embodiment of the present application, during the event distribution process, the duration of the application processing the distributed events can be detected in real time, and the number of events to be distributed can be dynamically adjusted according to the processing duration. When it is determined that the application is stuck according to the processing duration, the number of events to be distributed is reduced, thereby reducing the application load at the software level and improving the fluency of the system.

[0027] In combination with the second aspect, in a possible implementation, the processing module is also used to: when it is detected that the duration of the first application processing the i+nth first event is less than or equal to the first duration, stop resampling the first event to be distributed, where n is a positive integer greater than or equal to 1.

[0028] In an embodiment of the present application, during the event distribution process, the duration of the application processing the distributed events can be detected in real time, and the number of events to be distributed can be dynamically adjusted according to the processing duration. When it is detected that the duration of the application's current event processing has not timed out, it indicates that the current load of the application is sufficient to support the event processing process. In this case, the number of events to be distributed is stopped from being adjusted, and the original events to be distributed are continued to be distributed to the application. This can avoid reducing the number of events to be distributed when the load is sufficient, thereby avoiding affecting the user's visual experience.

[0029] In combination with the second aspect, in a possible implementation method, the processing module is specifically used to: resample the first events to be distributed according to a first rule, and the first rule includes: re-determining b first events to be distributed for every a first events to be distributed, where a>b, a and b are both positive integers, a≥2, b≥1.

[0030] In some embodiments, the first rule may be fixed or variable. For example, the first rule may change as the duration of the first event currently being processed by the first application changes.

[0031] In an embodiment of the present application, taking the sliding event as the first event as an example, the number of events to be distributed can be reduced by re-determining b first events to be distributed for every a first events to be distributed. The events to be distributed after the reduction in number can still be evenly distributed on the sliding track and be representative, thereby enhancing the user's visual experience during the sliding process.

[0032] In combination with the second aspect, in a possible implementation, the device also includes: a determination module, used to determine the values ​​of a and b based on the ratio of a second duration to the first duration, wherein the second duration is the duration for the first application to process the i-th first event.

[0033] In an embodiment of the present application, since the duration of the application's current processing of the first event can directly reflect the application's current processing capability, the resampling rule determined based on the duration of the application's current processing of the first event is more in line with the device's current capability. During the event distribution process, the duration of the application's processing of the distributed event can be detected in real time, and the number of events to be distributed can be dynamically adjusted based on the processing duration, thereby ensuring the user's visual experience during the sliding process to the greatest extent possible.

[0034] In combination with the second aspect, in a possible implementation, the processing module is specifically used to: resample the Ni first events to be distributed, and re-determine the M first events to be distributed, wherein M<(Ni), M and N are both positive integers greater than or equal to 1; the determination module is also used to: determine the optimizable distance according to the jth first event to be distributed among the M first events to be distributed, wherein j=1,2,3,…,M, j is a positive integer greater than or equal to 1; the device also includes a synthesis module, which is used to synthesize a first image according to the optimizable distance, and the first image is displayed after the second image, and the second image refers to the interface image corresponding to the jth first event to be distributed. In the embodiment of the present application, the optimizable distance can be calculated according to the resampled sliding events, and between the two sliding events after resampling, the optimizable distance is used to synthesize a moving image with the previous frame image. The method can optimize the sliding effect without obtaining information such as the sliding direction and sliding distance, and enhance the user's visual experience. It is particularly suitable for specific scenarios, such as list sliding scenarios where the sliding display effect is visually perceived.

[0035] In a third aspect, an electronic device is provided, comprising a memory and a processor, wherein the memory is used to store computer program code, and the processor is used to execute the computer program code stored in the memory to implement the method in the above-mentioned first aspect or any possible implementation manner of the first aspect.

[0036] In a fourth aspect, a computer-readable storage medium is provided, in which a computer program or instruction is stored. When the computer program or instruction is executed, the method in the above-mentioned first aspect or any possible implementation manner of the first aspect is implemented.

[0037] In a fifth aspect, a chip is provided, in which instructions are stored. When the instructions are executed on a device, the chip executes the method in the above-mentioned first aspect or any possible implementation manner of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0039] Figure 2 It is a software structure block diagram of an electronic device provided in an embodiment of the present application;

[0040] Figure 3 is a software structure block diagram of another electronic device provided in an embodiment of the present application;

[0041] Figure 4 It is a schematic flow chart of a method for inserting frames during interface display;

[0042] Figure 5 is a schematic flow chart of a method for chirality optimization;

[0043] Figure 6 is a schematic flow chart of a method for optimizing the hand-following distance;

[0044] Figure 7 is a schematic flow chart of an event distribution method provided in an embodiment of the present application;

[0045] Figure 8 is a schematic flow chart of a method for detecting the duration of a first event currently being processed by an application, provided in an embodiment of the present application;

[0046] Fig. 9 is a schematic flow chart of another event distribution method provided in an embodiment of the present application;

[0047] Fig.10 is a schematic diagram of a method for resampling a first event to be distributed provided by an embodiment of the present application;

[0048] Fig.11 is a schematic diagram of another method for resampling a first event to be distributed provided by an embodiment of the present application;

[0049] Fig.12 This is a distribution comparison diagram of sliding events distributed corresponding to a sliding operation performed on a screen of an electronic device provided by an embodiment of the present application;

[0050] Fig.13 A distribution comparison diagram of sliding events distributed corresponding to another sliding operation performed on a screen of an electronic device provided by an embodiment of the present application is shown;

[0051] Fig.14 is a schematic diagram of another method for resampling a first event to be distributed provided by an embodiment of the present application;

[0052] Fig.15 It is a schematic diagram of an interface presented by an electronic device provided in an embodiment of the present application after adopting the solution of the present application. DETAILED DESCRIPTION

[0053] The technical solution in the present application will be described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments.

[0054] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "plurality" or "multiple" refers to two or more than two.

[0055] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this embodiment, unless otherwise specified, "plurality" means two or more.

[0056] The terms used in the following embodiments are only for the purpose of describing specific embodiments, and are not intended to be used as limitations on the present application. As used in the specification and the appended claims of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include expressions such as "one or more", unless there is a clear contrary indication in the context. It should also be understood that in the following embodiments of the present application, "at least one", "one or more" refer to one, two or more. The term "and / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist; for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.

[0057] References to "one embodiment" or "some embodiments" etc. described in this specification mean that a particular feature, structure or characteristic described in conjunction with the embodiment is included in one or more embodiments of the present application. Thus, the phrases "one embodiment", "some embodiments", "another embodiment", "some other embodiments", etc. appearing in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.

[0058] The method provided in the embodiments of the present application can be applied to electronic devices with a time display function or a time recognition function, for example, it can be applied to mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPC), netbooks, personal digital assistants (PDA), smart home devices and other electronic devices. The embodiments of the present application do not impose any restrictions on the specific types of electronic devices.

[0059] For example, Figure 11 shows a schematic diagram of the structure of the electronic device 100. 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, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0060] 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.

[0061] 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.

[0062] 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.

[0063] 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.

[0064] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0065] The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.

[0066] 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.

[0067] 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.

[0068] 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.

[0069] 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.

[0070] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0071] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0072] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0073] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0074] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

[0075] 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.

[0076] 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.

[0077] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0078] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.

[0079] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0080] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0081] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0082] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0083] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0084] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, at least one App required for a function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0085] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0086] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.

[0087] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.

[0088] The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.

[0089] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to microphone 170C to input the sound signal into microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the sound source, realize directional recording function, etc.

[0090] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0091] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.

[0092] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0093] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.

[0094] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 100 uses an embedded SIM (eSIM) card, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.

[0095] It should be understood that the phone card in the embodiments of the present application includes but is not limited to a SIM card, an eSIM card, a universal subscriber identity module (USIM), a universal integrated circuit card (UICC), and the like.

[0096] The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device 100.

[0097] Figure 21 is a software structure diagram of the electronic device 100 of the embodiment of the present application. The layered architecture divides the software into several layers, each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, namely, the application layer, the application framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer. The application layer can include a series of application packages.

[0098] like Figure 2 As shown, the application package may include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications.

[0099] 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.

[0100] like Figure 2 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.

[0101] 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.

[0102] 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.

[0103] The view system includes visual controls, such as controls for displaying text, controls for displaying images, 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 images.

[0104] 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.).

[0105] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0106] 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.

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

[0108] 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.

[0109] 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.

[0110] The system library may include multiple functional modules, such as surface manager, media libraries, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

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

[0112] 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.

[0113] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

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

[0115] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.

[0116] It should be understood that the technical solutions in the embodiments of the present application can be used in Android, IOS, Hongmeng and other systems.

[0117] The technical solution of the embodiment of the present application can be applied to the event distribution process of the electronic device. For example, it can be applied to the touch function usage scenario of the electronic device, and can also be applied to the browsing scenario of sliding or dragging through the interface of the electronic device.

[0118] Among them, the electronic device can be a television, a desktop computer, a laptop computer, or a portable electronic device such as a mobile phone, a folding screen, a tablet computer, a camera, a video camera, a video recorder, or a smart home device such as a refrigerator, a washing machine, a sweeper, etc. It can also be an electronic device in a 5G network or an electronic device in a public land mobile communication network (PLMN) that will evolve in the future.

[0119] In order to more clearly understand the technical solution of this application, Figure 2 Based on the embodiments shown in the figure, before introducing the embodiments provided by the present application, Figure 3 Taking the sliding event of a user on the screen of an electronic device as an example, the processing and response process of the electronic device to the sliding event is introduced in detail.

[0120] like Figure 3 As shown, the layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the operating system is divided into four layers, from top to bottom, namely, the application layer, the application framework layer, the hardware abstraction layer, and the kernel layer. The application layer may include a series of application packages.

[0121] like Figure 3 As shown, the application package may include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications.

[0122] The application framework layer may include a user interface (UI) framework subsystem and a service layer, wherein the UI framework subsystem includes a control system and a view subsystem, and the service layer includes a sensor gesture management system and an input subsystem, wherein the input subsystem includes an input manager service (IMS).

[0123] The electronic device may handle and respond to the sliding event in the following manner:

[0124] A sliding operation of a user touching the screen can be specifically parsed as a combination of a press event, a slide event, and a lift event, wherein the number of slide events is relatively large. When a user triggers a single slide operation on the screen of an electronic device, the electronic device collects multiple slide events (which can be understood as collecting multiple slide points) through the device driver in the kernel layer, and sends the collected multiple slide events to the input subsystem in the application framework layer through the hardware abstraction layer. The input subsystem distributes the multiple slide events to the application, and then the view subsystem of the application framework layer triggers SurfaceFlinger to draw and synthesize corresponding image frames based on the distributed multiple slide events, which are finally displayed on the screen of the electronic device. Among them, the device driver can be, for example, a driver related to the touch screen of the electronic device, a driver related to the mouse connected to the electronic device, a driver related to the touchpad connected to the electronic device, or a driver related to the keyboard connected to the electronic device, etc. SurfaceFlinger is a special process that is mainly responsible for synthesizing all Surfaces to Framebuffer, and the display module reads the Framebuffer for display.

[0125] In some embodiments, the control system can be used for control animation and control interaction; the view subsystem can be used for view measurement, view layout, view drawing and view event management; the sensor gesture management system can be used for somatosensory gesture recognition, somatosensory gesture management and gesture recognition engine; the input subsystem can be used for event perception, event reading, input device management, event processing, event conversion, policy center (event interception, event filtering), window perception and management, event distribution, AI engine response, AI event conversion, AI event dispatching, etc.

[0126] Since the fluency of the operating system directly affects the user experience of the operating system, improving the fluency of the operating system has always been a constant goal for developers. The stability of event distribution of electronic devices can directly affect the fluency of the operating system, especially when users choose a fixed high refresh rate, the electronic device needs more computing power to achieve the required operation and hand tracking effect. This can easily lead to the application being unable to process the distributed events in a timely manner when the entire electronic device is under a high load, resulting in the application being stuck, jittering, etc., for example, the final manifestation is poor hand tracking effect of touch operations or the application being unresponsive to touch operations. This phenomenon is particularly prominent on devices with low computing power levels.

[0127] For example, Figure 4 FIG. 4 is a schematic flow chart of a method 400 for inserting frames during interface display. Figure 4 As shown, the method 400 includes:

[0128] S401: When the sliding interface is thrown by the user, the terminal device collects input information including the throwing direction, the sliding start time of the sliding interface, the sliding initial speed of the sliding interface, the sliding frame rate of the sliding interface, the interface size of the sliding interface, the screen display area size of the terminal device and multiple image frame information.

[0129] S402: The terminal device calculates the maximum number of insertable frames according to the collected input information, and determines the frame insertion strategy according to the maximum number of insertable frames.

[0130] S403: The terminal device draws and renders the collected multiple image frames.

[0131] S404: The terminal device splices and synthesizes multiple display areas of multiple image frames to obtain one or more insertion frames.

[0132] In this method, the terminal device determines the maximum number of insertable frames based on the input information such as the sliding speed and sliding frame rate collected during the user's sliding process, and then generates and inserts the synthetic frame. This method is an optimization made at the UI framework subsystem layer, not an improvement made for the event distribution process. When the user chooses a fixed high refresh rate, the application is under greater pressure to handle the distribution events, and the terminal device also requires greater computing power to achieve the required operation and hand-following effect. In other words, this method has high requirements on the computing power of the terminal device and is not suitable for terminal devices with lower computing power levels. In addition, in this method, it is necessary to collect information such as the sliding direction, sliding speed, sliding frame rate, and image frames during the sliding process, and the image frames need to be spliced ​​and synthesized, which will increase the power consumption of the terminal device.

[0133] For example, Figure 5 FIG. 5 is a schematic flow chart of a method 500 for chirality optimization. Figure 5 As shown, the method 500 includes:

[0134] S501: Determine the chirality requirement type of the current application or scenario of the mobile terminal.

[0135] S502: According to the determined chirality requirement type of the current mobile terminal application or scenario, determine the chirality requirement enhancement of the current mobile terminal application or scenario according to a preset chirality enhancement judgment principle.

[0136] S503: According to the determined need for improving the chirality of the current mobile terminal application or scenario, optimize the mobile terminal application or scenario according to a preset optimization strategy.

[0137] Specifically, for applications or scenarios with high hand-tracking experience requirements, the hand-tracking response speed of the I2C frequency of the application or scenario is increased to a first frequency; for applications or scenarios with low hand-tracking experience requirements, the I2C frequency of the application or scenario is reduced to a second frequency, thereby being compatible with the differentiated requirements of different applications or scenarios (such as games and non-games).

[0138] In this method, according to the determined need for improved chirality of the application or scenario of the current mobile terminal, the mobile terminal application or scenario is optimized according to a preset optimization strategy. The execution of this method depends on the preset chirality application or scenario, and the scope of application of the method is relatively small. Moreover, in this method, the preset optimization strategy is to adjust the frequency of I2C, which is an optimization made in the bottom layer of the device. The optimization occurs before the application framework layer receives the event reported by the bottom layer. This method depends on the hardware capabilities of the device and is also not suitable for devices with low computing power.

[0139] For example, Figure 6 FIG. 6 is a schematic flow chart of a method 600 for optimizing the hand-following distance. Figure 6 As shown, the method 600 includes:

[0140] S601: Determine an optimizable hand-following distance in the current refresh cycle.

[0141] S602: Determine the distance to be moved of the image in the current refresh cycle according to the optimizable hand-following distance and the distance moved by the finger in the current refresh cycle.

[0142] S603: Process and display the image according to the distance to be moved of the image.

[0143] In this method, the hand-following effect depends on the accuracy of the prediction of the optimizable hand-following distance, and the quality and stability of the hand-following effect cannot be ensured. In addition, this method processes the image when the animated image is drawn, and is an optimization made in the view subsystem in the UI framework subsystem layer, not an improvement made for the event distribution process. When the user chooses a fixed high refresh rate, the application is under greater pressure to handle the distribution events. When the user chooses a fixed high refresh rate, the terminal device also needs greater computing power to achieve the required operation and hand-following effect. In other words, this method has high requirements on the computing power of the terminal device and is not suitable for terminal devices with lower computing power levels.

[0144] In summary, the current event distribution method is an improvement made in the drawing process after the event distribution is completed, or an improvement made before the event is reported at the bottom layer (kernel layer). Neither of them is an improvement made to the event distribution process. The current event distribution method cannot effectively improve the stability of event distribution. When the user chooses a fixed high refresh rate, the application is under greater pressure to handle the distribution events, and the terminal device requires greater computing power to achieve the required operation and hand-following effect. In other words, the current event distribution method has high requirements on the computing power of the terminal device and is not suitable for terminal devices with lower computing power levels.

[0145] In view of this, an embodiment of the present application provides a method for event distribution. The method is based on the input subsystem of the operating system and improves the event distribution process. The method can detect the duration of the application processing the current distribution event and dynamically adjust the number of events to be distributed based on the duration of the application processing the current distribution event. The method does not depend on the hardware of the device and can effectively reduce the computing power overhead of the electronic device. It can also be applied to electronic devices with lower computing power levels.

[0146] For example, Figure 7 FIG. 7 is a schematic flow chart of a method 700 for event distribution provided in an embodiment of the present application. Figure 7 As shown, the method 700 includes:

[0147] S701: Detecting the duration of the application currently processing the first event.

[0148] In some embodiments, by Figure 3 An input manager service (IMS) in the input subsystem shown in detects the duration of the application processing the first event.

[0149] The duration of the application processing the first event starts from the time when the IMS distributes the first event to the application and ends at the time when the IMS receives the notification of completion of the first event processing sent by the application.

[0150] It should be understood that: taking a sliding event as an example, a sliding operation of a user touching the screen of an electronic device can be specifically parsed as a combination of a pressing operation, a sliding operation, and a lifting operation, wherein multiple sliding events will be generated in the sliding operation. After the IMS receives the multiple sliding events reported by the bottom layer, the multiple sliding events are distributed to the application in sequence. In the distribution process of the sliding events, the multiple sliding events can be divided into three queues, namely, a "queue to be distributed", a "queue to be detected", and a "distributed queue". Among them, the IMS distributes the received multiple sliding events in sequence. Taking the first sliding event among the multiple sliding events as an example, after the IMS receives the first sliding event, the first sliding event is located in the queue to be distributed. When the IMS distributes the first sliding event to the application, the first sliding event is moved into the queue to be detected and removed from the queue to be distributed. When the IMS receives the notification sent by the application that the processing of the first sliding event is completed, the first sliding event is moved into the distributed queue and removed from the queue to be detected.

[0151] Optionally, the first event can be a sliding event on the screen of the electronic device, or a sliding event on a touch pad connected to the electronic device, or a dragging event on the screen of the electronic device through a gesture or a mouse, or a dragging event on a touch pad connected to the electronic device through a gesture or a mouse, or a sliding event or a dragging event on another electronic device interconnected with the electronic device, or other operations that can generate multiple distribution events of the same type, which is not limited in the present application.

[0152] S702: When it is detected that the duration of the first event currently processed by the application is greater than the first duration, resample the first event currently to be distributed to reduce the number of the first events to be distributed.

[0153] This step may also be described as: when it is detected that the duration for which the application currently processes the first event exceeds the first duration, reducing the number of first events to be distributed according to the first rule.

[0154] This step may also be described as: when it is detected that the duration of the current processing of the first event by the application exceeds the first duration, resampling the first event to be distributed currently according to the first rule.

[0155] In some embodiments, the first rule may be to determine b new first events for every a original first events, where a>b, and the values ​​of a and b may be determined based on the ratio of the duration of the application currently processing the first event to the first duration. For example, when the ratio of the duration of the application currently processing the first event to the first duration is 2, a may be 2 and b may be 1.

[0156] Resampling the current first event to be distributed refers to re-determining the first event to be distributed based on the current first event to be distributed, which can also be understood as updating the first event to be distributed in the queue to be distributed.

[0157] Specifically, when it is detected that the duration of the application currently processing the first event is greater than the first duration, the IMS re-determines the sampling point corresponding to the first event based on multiple sampling points corresponding to the existing first event, thereby reducing the number of first events to be distributed.

[0158] In some embodiments, the value of the first duration may be any value between 500 ms and 2500 ms, for example, 500 ms, 1500 ms or 2000 ms.

[0159] The method of reducing the number of first events to be distributed (ie, the first rule) will be described in detail in subsequent embodiments and will not be described in detail here.

[0160] S703: When it is detected that the duration of the current processing of the first event by the application is less than the first duration, stop resampling the first event to be distributed.

[0161] The number of first events currently to be distributed.

[0162] In some examples, if the duration of the application currently processing the first event is twice the first duration, the resampling method for determining the current first event to be distributed can be: re-determine one current first event to be distributed based on every two first events to be distributed; on this basis, the IMS then continues to distribute the first event to be distributed determined by resampling to the application, and detects the duration of the application processing the first event to be distributed determined by resampling, and when it is detected that the duration of the application processing the first event to be distributed determined by resampling is less than the first duration, stops resampling the current first event to be distributed; and continues to distribute the next first event to the application according to the first event to be distributed before resampling.

[0163] In some other examples, if the duration of the application currently processing the first event is twice the first duration, and the number of first events to be distributed is 10, then the resampling method for determining the current first event to be distributed can be: re-determine one current first event to be distributed according to every two first events to be distributed. At this time, the number of first events to be distributed is 9, and the number of first events in the queue to be distributed changes from 10 to 9, and the first first event in the queue to be distributed is the first event determined by resampling; on this basis, the IMS then continues to distribute the first first event in the queue to be distributed (that is, the re-determined event to be distributed) to the application, and detects the duration of the application processing the first first event. When it is detected that the duration of the application processing the first first event is 1.5 times the first duration, the resampling of the current first event to be distributed is performed. The sampling method is adjusted as follows: 2 current first events to be distributed are re-determined based on every 3 first events to be distributed, and the next first event to be distributed to the application is determined based on the adjusted resampling method. At this time, the number of first events to be distributed is 7, and the number of first events in the queue to be distributed changes from 8 to 7. The first first event in the queue to be distributed is the first event determined by resampling. On this basis, the IMS continues to distribute the first first event in the queue to be distributed to the application, and detects the duration of the application processing the first first event. At this time, the number of first events in the queue to be distributed changes from 7 to 6. When it is detected that the duration of the application processing the first first event is less than the first duration, resampling of the first event to be distributed is stopped, and the IMS distributes the first first event of the 6 first events in the queue to be distributed to the application.

[0164] It can be understood that: as the ratio of the duration of the application currently processing the first event to the first duration changes, the resampling method of the first event to be distributed may also change accordingly. The resampling method described in the embodiment of the present application is only an exemplary explanation and is not a limitation on the resampling method. Other forms of resampling methods can also be applied to the scheme of the present application. For example: in one example, when it is detected that the duration of the application currently processing the first event is greater than the first duration, the first event to be distributed is resampled at a lower sampling frequency. Thereafter, as long as the duration of the application currently processing the first event is still greater than the first duration, the resampling method remains unchanged. When it is detected that the duration of the application currently processing the first event is no longer greater than the first duration, the resampling of the first event to be distributed is stopped.

[0165] It should be understood that the resampling process of the events to be distributed and the distribution process of the events to be distributed can be performed simultaneously.

[0166] In an embodiment of the present application, the duration of the application processing the distributed events can be detected in real time based on the input subsystem in the service layer. The input subsystem is closely connected to the application and can dynamically adjust the number of events to be distributed according to the duration. When it is determined that the application is stuck based on the duration of the application processing the distributed events, the number of events to be distributed is reduced, thereby reducing the application load at the software level and improving the smoothness of the system. Moreover, when it is detected that the duration of the application processing the distributed events has returned to normal, the operation of reducing the number of events to be distributed is stopped.

[0167] To understand more clearly Figure 7 In the embodiment shown in S701, the following is combined with Figure 8 , taking the first event as a sliding event as an example, a method 800 for detecting the duration of the application currently processing the first event is introduced. Figure 8 As shown, the method 800 includes:

[0168] S801: based on a sliding operation of a user, sampling N sliding events, wherein a sampling frequency of the N sliding events is a first frequency.

[0169] Specifically, the kernel layer samples N sliding events based on the sliding operation of the user, and reports the N sliding events to the IMS of the application framework layer.

[0170] In some embodiments, the N sliding events are N coordinate points on the user's sliding trajectory.

[0171] S802: The IMS receives N sliding events, which are located in a queue to be distributed.

[0172] S803: The IMS distributes the i-th sliding event to the application, where i=1, 2, 3, ..., N. At this time, the i-th sliding event is moved from the queue to be distributed to the queue to be detected.

[0173] This step can also be understood as: the IMS distributes the N sliding events to the application in sequence.

[0174] After distributing the i-th sliding event to the application, the IMS starts timing the second time period, and the second time period is the time period for the application to process the i-th sliding event.

[0175] S804: After receiving the i-th sliding event, the application processes the i-th sliding event.

[0176] S805: After the application completes processing the i-th sliding event, the application sends a notification to the IMS indicating that the i-th sliding event has been processed. After receiving the notification indicating that the i-th sliding event has been processed, the IMS ends the timing of the second duration.

[0177] S806: The IMS moves the i-th sliding event from the queue to be detected to the queue to be distributed.

[0178] It can also be understood that the second duration is a timing duration with the first moment corresponding to S803 as the timing start point and the second moment corresponding to S805 as the timing end point.

[0179] In an embodiment of the present application, a method for detecting the duration of an application processing a distribution event is provided, which can detect in real time the duration of an application processing a current distribution event, and provide a basis for subsequently flexibly adjusting the number of events to be distributed according to the application processing duration.

[0180] Below, in Figure 8 Based on the embodiment shown, Fig. 9 FIG. 9 is a schematic flow chart of another event distribution method 900 provided in an embodiment of the present application. Fig. 9 As shown, the method 900 includes:

[0181] S901: The IMS determines a second duration, where the second duration is the duration for the application to process the i-th sliding event.

[0182] The method for IMS to determine the second duration is as follows: Figure 8 The illustrated embodiment has been described in detail and will not be described again here for the sake of brevity.

[0183] S902: When the IMS detects that the second duration is greater than the first duration, the IMS determines a second frequency according to a ratio of the first duration to the second duration.

[0184] In some examples, the second frequency may reflect the first rule, that is, b new sliding events are determined for every a original sliding events, where a>b.

[0185] S903: The IMS resamples the Ni sliding events to be distributed based on the second frequency, and updates the current queue to be distributed. The updated queue to be distributed includes M sliding events to be distributed, wherein M<(Ni), and the second frequency is lower than the first frequency.

[0186] In some examples, the sliding event is N coordinate points on the user's sliding track. Among Ni sliding events, the relative distance between adjacent sliding events is d1. After resampling the Ni sliding events, the relative distance between adjacent resampled sliding events in the M sliding events is d2, where d1 <d2。

[0187] S904: The IMS distributes M sliding events to be distributed in sequence based on the updated queue to be distributed.

[0188] The methods described in S801 to S806 and S901 to S903 are also applicable to the process of the IMS distributing M sliding events to be distributed in sequence, so as to realize the dynamic adjustment of the number of events to be distributed by the IMS during the event distribution process.

[0189] It should be understood that there is no strict order in which S903 and S904 are executed. After completing the resampling of a sliding event, the IMS distributes the resampled sliding event. At the same time, the IMS can continue to resample the next sliding event. That is, S903 and S904 can be performed simultaneously.

[0190] For example, Fig.10 A schematic diagram of a method for resampling first events to be distributed (ie, reducing the number of first events to be distributed) provided in an embodiment of the present application is shown.

[0191] like Fig.10 As shown, among the multiple first events reported by the kernel layer to the IMS (i.e., the multiple first events received by the IMS), the first events located in the queue to be distributed are: Mov(x0,y0), Mov(x1,y1), Mov(x2,y2), Mov(x3,y3), Mov(x4,y4), Mov(x5,y5), ...; when the IMS detects that the duration of the application currently processing the first event "Mov(x0,y0)" is greater than the first duration, the IMS can resample the first events to be distributed (Mov(x1,y1), Mov(x2,y2), Mov(x3,y3), Mov(x4,y4), Mov(x5,y5), ...), for example, the IMS determines the resampling. The frequency is: a new first event is determined for every three original first events, then a new first event Mov(m0,n0) can be determined according to the original first events Mov(x1,y1), Mov(x2,y2), and Mov(x3,y3), and a new first event Mov(m1,n1) can be determined according to the original first events Mov(x3,y3), Mov(x4,y4), and Mov(x5,y5), and so on, to form new first events to be distributed, and IMS continues to distribute these new first events to be distributed; it can also be that after determining a resampled first event, IMS continues to distribute the resampled first event, and the resampling operation and the first event distribution operation can be performed simultaneously.

[0192] In one example, a new first event is determined for every three original first events. The new first event may be determined by taking the average of the three original first events or by multiplying each three original first events by their own weight values ​​and taking the sum of the values ​​as a new first event.

[0193] For example:

[0194] Mov(m0,n0)=(Mov(x1,y1)+Mov(x2,y2)+Mov(x3,y3)) / 3;

[0195] Mov(m1,n1)=(Mov(x3,y3)+Mov(x4,y4)+Mov(x5,y5)) / 3.

[0196] Another example:

[0197] Mov(m0,n0)=Mov(x1,y1)×a1%+Mov(x2,y2)×a2%+Mov(x3,y3)×a3%, where a1+a2+a3=100%;

[0198] Mov(m1,n1)=Mov(x3,y3)×a4%+Mov(x4,y4)×a5%+Mov(x5,y5)×a6%, where a4+a5+a6=100%.

[0199] For example, Fig.11 A schematic diagram of another method for resampling first events to be distributed (ie, reducing the number of first events to be distributed) provided in an embodiment of the present application is shown.

[0200] like Fig.11 As shown, among the multiple first events reported by the kernel layer to the IMS (that is, the multiple first events received by the IMS), the first events in the queue to be distributed are: Mov(x0,y0), Mov(x1,y1), Mov(x2,y2), Mov(x3,y3), Mov(x4,y4), Mov(x5,y5), ...; when the IMS detects that the duration of the application currently processing the first event "Mov(x0,y0)" is greater than the first duration, the IMS can process the first events to be distributed (Mov(x1,y1), Mov(x2,y2), Mov(x3,y3), Mov(x4,y4), Mov(x5,y5), ... …) resampling, for example, IMS determines the resampling frequency as follows: A-2 new first events are determined for every A original first events, then a new first event Mov(m0,n0) can be determined based on the original first events Mov(x1,y1), Mov(x2,y2), and Mov(x3,y3), a new first event Mov(m1,n1) can be determined based on the original first events Mov(x2,y2), Mov(x3,y3), and Mov(x4,y4), a new first event Mov(m2,n2) can be determined based on the original first events Mov(x3,y3), Mov(x4,y4), and Mov(x5,y5), and so on.

[0201] In one example,

[0202] Mov(m0,n0)=(Mov(x1,y1)+Mov(x2,y2)+Mov(x3,y3)) / 3;

[0203] Mov(m1,n1)=(Mov(x2,y2)+Mov(x3,y3)+Mov(x4,y4)) / 3

[0204] Mov(m2,n2)=(Mov(x3,y3)+Mov(x4,y4)+Mov(x5,y5)) / 3.

[0205] In another example,

[0206] Mov(m0,n0)=Mov(x1,y1)×a11%+Mov(x2,y2)×a21%+Mov(x3,y3)×a31%,where a11+a21+a31=100%;

[0207] Mov(m1,n1)=Mov(x2,y2)×a22%+Mov(x3,y3)×a32%+Mov(x4,y4)×a41%,where a22+a32+a41=100%;

[0208] Mov(m2,n2)=Mov(x3,y3)×a33%+Mov(x4,y4)×a42%+Mov(x5,y5)×a51%, where a33+a42+a51=100%.

[0209] Among them, a21>a22; a31>a32>a33; a41>a42, that is, when the same first event is reused, its weight value will be lower than the weight value when it was used last time. The more times it is reused, the more the weight value decreases.

[0210] It should be understood that: Fig.10 and Fig.11 The illustrated embodiment is merely a schematic illustration of a method for resampling the first events to be distributed. The method may also be to determine b new first events for every a original first events, where a>b. The present application does not limit the specific determination method.

[0211] For example, Fig.12 A distribution comparison diagram of sliding events distributed corresponding to a flick operation performed on a screen of an electronic device provided by an embodiment of the present application is shown.

[0212] Fig.12 (a) in FIG. 1 is a schematic diagram showing the distribution of sliding events corresponding to the throw and slide operation in the prior art. Fig.12As shown in (a), the 13 distributed sliding events corresponding to the throwing and sliding operation are evenly distributed at intervals of D1 on the throwing and sliding trajectory. That is to say, the sampling frequency of the 13 distributed sliding events corresponding to the throwing and sliding operation is fixed, which can be recorded as frequency 1. Assuming that the processing time of the application to process the fourth sliding event is greater than the first time, the existing solution will not adjust the sampling frequency of the sliding events to be distributed due to the freezing of the application.

[0213] Fig.12 (b) in FIG. 1 shows a schematic diagram of the distribution of sliding events corresponding to the throwing and sliding operation after the solution of the present application is adopted, such as Fig.12 As shown in (b) of FIG. 1 , when the processing time of the application processing the sliding event is not greater than the first time length, the distribution of the distributed sliding events on the sliding trajectory is different from Fig.12 The distribution is the same as that shown in (a) in FIG. 1 . Assume that when the application processes the fourth sliding event, if it is detected that its processing time is longer than the first time, the IMS reduces the sliding events to be distributed at this time (i.e., Fig.12 The sampling frequency of the sliding events to be distributed at this time (i.e., the 5th to 13th sliding events shown in (a) in FIG. Fig.12 The 5th to 13th sliding events shown in (a) are resampled, and the resampling frequency is recorded as frequency 2, which is less than frequency 1. Fig.12 After the 5th to 13th sliding events shown in (a) are resampled, we get Fig.12 (b) shows the 5th to 8th sliding events.

[0214] For example, Fig.13 A distribution comparison diagram of sliding events distributed corresponding to another sliding operation performed on the screen of an electronic device provided by an embodiment of the present application is shown.

[0215] About Fig.13 The description of (a) and Fig.12 The description of (a) is the same as that of (a), and will not be repeated here for the sake of brevity.

[0216] Fig.13 (b) in FIG. 1 shows a schematic diagram of the distribution of sliding events corresponding to the throwing and sliding operation after the solution of the present application is adopted, such as Fig.13 As shown in (b) of FIG. 1 , when the processing time of the application processing the sliding event is not greater than the first time length, the distribution of the distributed sliding events on the sliding trajectory is different from Fig.13 The distribution is the same as that shown in (a) in FIG. 1 . Assume that when the application processes the fourth sliding event, if it is detected that its processing time is longer than the first time, the IMS reduces the sliding events to be distributed at this time (i.e., Fig.13The sampling frequency of the 5th to 13th sliding events shown in (a) in FIG. 1 is to resample the sliding events to be distributed at this time, that is, from Fig.13 The fifth sliding event shown in (a) in FIG. 1 starts resampling, and the resampling frequency is recorded as frequency 2. Frequency 2 is less than frequency 1. If the application is distributed as follows Fig.13 After the seventh sliding event shown in (b) in FIG. 1 , it is detected that the processing time of the seventh sliding event by the application is no longer greater than the first time, and the resampling of the sliding events to be distributed is stopped, which is finally reflected as follows: Fig.13 The distribution of the first to fourth sliding events on the sliding trajectory shown in (b) is similar to Fig.13 The distribution of the first to fourth sliding events on the throw-slip trajectory is the same as shown in (a). Fig.13 The 5th to 7th sliding events shown in (b) are based on IMS Fig.13 The 5th to 10th sliding events shown in (a) are resampled. Fig.13 The distribution of the 8th to 10th sliding events on the sliding trajectory shown in (b) is similar to Fig.13 The 11th to 13th sliding events shown in (a) have the same distribution on the sliding trajectory.

[0217] It should be understood that: Fig.12 and Fig.13 The sliding event sampling points shown on the casting trajectory are only for schematic illustration. In actual screen display, it is difficult for the naked eye to perceive these sliding event sampling points.

[0218] For example, in Fig.10 Based on the embodiment shown, Fig.14 A schematic diagram of another method for resampling a first event to be distributed provided by an embodiment of the present application is shown.

[0219] like Fig.14 As shown, in Fig.10 On the basis of the embodiment shown, in order to compensate for the impact on user experience caused by the increased distance between adjacent first events after the first event to be distributed is resampled, the difference between the last synthesized resampled sliding event and the latest sliding event to be resampled can be taken as the optimizable distance, for example Fig.14 The optimizable distance D = (dx, dy) = |Mov(m0, n0) - Mov(x3, y3)| shown in ; then the inserted frame is synthesized according to the optimizable distance, and the inserted frame is inserted between the image frame corresponding to Mov(m0, n0) and the image frame corresponding to Mov(m1, n1).

[0220] In an embodiment of the present application, in a specific scenario, such as a list sliding scenario where the sliding display effect is visually obvious, the optimizable distance can be calculated based on the resampled sliding event, and between two sliding events after resampling, the optimizable distance can be used to synthesize a moving image with the previous frame image. This method can optimize the sliding effect without obtaining information such as the sliding direction and sliding distance, thereby enhancing the user's visual experience.

[0221] For example, in combination Fig.15 ,right Fig.14 The beneficial effects of the illustrated embodiment are described in detail.

[0222] Fig.15 (a) shows Fig.14 Schematic diagram of the interface corresponding to the sliding event Mov(m0,n0), Fig.15 (b) shows that Fig.14 The interface diagram corresponding to the optimizable distance point D = (dx, dy) in the figure is as follows: Fig.15 (c) shows that Fig.14 The interface diagram corresponding to the sliding event Mov(m1,n1) in . Fig.15 It can be seen that, taking the user performing an upward swipe operation on the screen of the electronic device as an example, before the distance optimization is performed, in response to the user's upward swipe operation, the display interface of the electronic device is Fig.15 The interface shown in (a) is directly switched to Fig.15 After distance optimization, the display interface of the electronic device is first Fig.15 The interface shown in (a) is switched to Fig.15 The interface shown in (b) is then Fig.15 The interface shown in (b) is switched to Fig.15 The interface shown in (c) in .

[0223] In some embodiments, the event distribution method provided in the embodiments of the present application can also be applied to scenarios where multiple electronic devices are interconnected.

[0224] For example, a mobile phone and a computer are interconnected through a super terminal, and the user's operations on the computer are transmitted to the mobile phone through short-distance communication. When the signal is poor, the events received by the mobile phone are likely to be unevenly distributed or piled up, which is specifically manifested as the computer controlling the mobile phone operation to freeze. Through the event distribution method provided in the embodiment of the present application, the IMS on the mobile phone can reprocess (i.e., resample) the received events, and then evenly distribute the events to the application, thereby overcoming the unsmooth sliding experience caused by the poor short-distance channel.

[0225] Another example: the tablet and the keyboard are interconnected via Bluetooth: when the channel signal is poor, the sliding events generated by the sliding operation on the touchpad of the keyboard are transmitted to the tablet through short-range communication. The sliding events received by the tablet are uneven, which is manifested as the tablet responding unsmoothly when sliding on the touchpad of the keyboard. Through the event distribution method provided in the embodiment of the present application, the IMS on the tablet can reprocess (i.e., resample) the received events, and then evenly distribute the events to the application, thereby overcoming the unsmooth sliding experience caused by the poor short-range channel.

[0226] One or more of the modules or units described herein can be implemented by software, hardware or a combination of the two. When any of the above modules or units are implemented in software, the software exists in the form of computer program instructions and is stored in a memory, and a processor can be used to execute the program instructions and implement the above method flow. The processor may include but is not limited to at least one of the following: a central processing unit (CPU), a microprocessor, a digital signal processor (DSP), a microcontroller (MCU), or an artificial intelligence processor and other types of computing devices that run software, each computing device may include one or more cores for executing software instructions to perform operations or processing. The processor may be built into an SoC (system on chip) or an application specific integrated circuit (ASIC), or it may be an independent semiconductor chip. In addition to the core used to execute software instructions for operations or processing in the processor, necessary hardware accelerators may be further included, such as a field programmable gate array (FPGA), a PLD (programmable logic device), or a logic circuit that implements a dedicated logic operation.

[0227] When the modules or units described in this document are implemented in hardware, the hardware can be any one or any combination of a CPU, a microprocessor, a DSP, an MCU, an artificial intelligence processor, an ASIC, a SoC, an FPGA, a PLD, a dedicated digital circuit, a hardware accelerator, or a non-integrated discrete device, which can run the necessary software or be independent of the software to execute the above method flow.

[0228] When the modules or units described herein are implemented using software, they 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 may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may 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 may be transmitted from a website site, a computer, a server, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server, or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integrations. The available medium may 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 drive (SSD)), etc.

[0229] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0230] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0231] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0232] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0233] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0234] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0235] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for event distribution, characterized in that: The method comprises: In the process of distributing a plurality of first events to the first application in sequence, detecting a duration of the first application processing an i-th first event, wherein the plurality of first events are generated in response to a first operation performed by a user on the first electronic device, wherein i is a positive integer greater than or equal to 1; When it is detected that the duration for the first application to process the i-th first event is greater than the first duration, the first events to be distributed are resampled to reduce the number of the first events to be distributed.

2. The method according to claim 1, characterized in that The method further comprises: When it is detected that the duration for the first application to process the i+nth first event is less than or equal to the first duration, resampling of the first event to be distributed is stopped, where n is a positive integer greater than or equal to 1.

3. The method according to claim 1 or 2, characterized in that: The resampling of the first event to be distributed comprises: The first events to be distributed are resampled according to a first rule, wherein the first rule comprises: re-determining b first events to be distributed from every a first events to be distributed, wherein a>b, a and b are both positive integers, a≥2, b≥1.

4. The method according to claim 3, characterized in that The method further comprises: The values ​​of a and b are determined according to a ratio of a second duration to the first duration, wherein the second duration is the duration for the first application to process the i-th first event.

5. The method according to any one of claims 1 to 4, characterized in that The resampling of the first event to be distributed comprises: Re-determine M first events to be distributed by resampling the Ni first events to be distributed, where M<(Ni), and M and N are both positive integers greater than or equal to 1; The method further comprises: Determining an optimizable distance according to a j-th first event to be distributed among the M first events to be distributed, wherein j=1, 2, 3, ..., M, and j is a positive integer greater than or equal to 1; A first image is synthesized according to the optimizable distance, the first image is displayed after a second image, and the second image refers to an interface image corresponding to the jth first event to be distributed.

6. The method according to any one of claims 1 to 5, characterized in that The duration of processing the i-th first event by the first application starts with the time when the i-th first event is distributed to the first application and ends with the time when the i-th first event processing completion notification sent by the first application is received.

7. The method according to any one of claims 1 to 6, characterized in that The first event includes a sliding event.

8. The method according to any one of claims 1 to 7, characterized in that The first operation performed by the user on the first electronic device includes any one of the following operations: A sliding operation performed by a user on the screen of the first electronic device; or A sliding operation performed by a user on a second electronic device connected to the first electronic device.

9. An event distribution device, characterized in that: The device comprises: a detection module, configured to detect a duration for the first application to process an i-th first event in a process of sequentially distributing a plurality of first events to the first application, wherein the plurality of first events are generated in response to a first operation performed by a user on the first electronic device, wherein i is a positive integer greater than or equal to 1; The processing module is configured to resample the first events to be distributed when it is detected that the duration for the first application to process the i-th first event is greater than a first duration, so as to reduce the number of the first events to be distributed.

10. The device according to claim 9, characterized in that The processing module is also used for: When it is detected that the duration for the first application to process the i+nth first event is less than or equal to the first duration, resampling the first event to be distributed is stopped, where n is a positive integer greater than or equal to 1.

11. The device according to claim 9 or 10, characterized in that The processing module is specifically used for: The first events to be distributed are resampled according to a first rule, wherein the first rule comprises: re-determining b first events to be distributed from every a first events to be distributed, wherein a>b, a and b are both positive integers, a≥2, b≥1.

12. The device according to claim 11, characterized in that The device also includes: A determination module is used to determine the values ​​of a and b according to the ratio of a second duration to the first duration, wherein the second duration is the duration for the first application to process the i-th first event.

13. The device according to any one of claims 9 to 12, characterized in that The processing module is specifically used for: Re-determine M first events to be distributed by resampling the Ni first events to be distributed, where M<(Ni), and M and N are both positive integers greater than or equal to 1; The determining module is also used for: Determining an optimizable distance according to a j-th first event to be distributed among the M first events to be distributed, wherein j=1, 2, 3, ..., M, and j is a positive integer greater than or equal to 1; The device also includes a synthesis module, which is used to synthesize a first image according to the optimizable distance, wherein the first image is displayed after a second image, and the second image refers to an interface image corresponding to the jth first event to be distributed.

14. The device according to any one of claims 9 to 13, characterized in that The duration of processing the i-th first event by the first application starts with the time when the i-th first event is distributed to the first application and ends with the time when the i-th first event processing completion notification sent by the first application is received.

15. The device according to any one of claims 9 to 14, characterized in that The first event includes a sliding event.

16. The device according to any one of claims 9 to 15, characterized in that The first operation performed by the user on the first electronic device includes any one of the following operations: A sliding operation performed by a user on the screen of the first electronic device; or A sliding operation performed by a user on a second electronic device connected to the first electronic device.

17. An electronic device, characterized in that: include: one or more processors; one or more memories; and one or more computer programs, wherein the one or more computer programs are stored in the one or more memories, and the one or more computer programs include instructions, which, when executed by the one or more processors, cause the electronic device to perform the method as described in any one of claims 1 to 8.

18. A computer-readable storage medium, characterized in that: The storage medium stores a program or an instruction, and when the program or the instruction is executed, the method according to any one of claims 1 to 8 is implemented.

19. A chip, characterized in that: Instructions are stored in the chip, and when the instructions are executed, the method according to any one of claims 1 to 8 is implemented.