Event anti-shake method and device of application interface, electronic device and storage medium

By embedding anti-shake control logic at the application framework layer and dynamically adjusting the anti-shake time window, the problems of low development efficiency and poor user experience in existing technologies are solved, achieving efficient, stable, and personalized user experience for global anti-shake.

CN121349323BActive Publication Date: 2026-03-20彩讯科技股份有限公司 +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511912909.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-18
Publication Date
2026-03-20
Estimated Expiration
2045-12-18

AI Technical Summary

Technical Problem

In existing technologies, application interface event debouncing strategies are inefficient to develop, costly, and cannot be adaptively adjusted, resulting in a decline in user experience.

Method used

By embedding anti-shake control logic at the application framework layer and wrapping the anti-shake control logic for different interactive components, global anti-shake is achieved. Independent anti-shake timers and adaptive rules are used to dynamically adjust the anti-shake time window, ensuring precise isolation and personalized protection of interactive events.

Benefits of technology

The development of global stabilization was achieved through zero-intrusion, which reduced development costs, improved system performance and stability, and ensured smooth operation and user experience during complex interactions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121349323B_ABST
    Figure CN121349323B_ABST
Patent Text Reader

Abstract

The application is suitable for the technical field of intelligent control, and provides an event anti-shake method and device of an application interface, an electronic device and a storage medium, the method comprising: when a first interaction event is triggered and is not in a first anti-shake time window, starting a first anti-shake timer after responding to the first interaction event under the condition that an event anti-shake function is started; the event anti-shake function is realized by implanting anti-shake control logic in a framework layer and wrapping the anti-shake control logic based on the framework layer for different interaction components; the framework layer does not respond to the same interaction event triggered again in the anti-shake time window of the interaction event; when a second interaction event is triggered and is not in a second anti-shake time window, starting a second anti-shake timer after responding to the second interaction event. The application implants the anti-shake control logic into the application framework layer, so that the event anti-shake function becomes a bottom-layer public service, thereby realizing global anti-shake, without the need to repeatedly write the anti-shake function for each component, and effectively improving the development efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of intelligent control, and particularly relates to an event anti-shake method and device of an application interface, an electronic device and a storage medium. BACKGROUND

[0002] In recent years, smart terminals with touch screens have become indispensable tools in people's daily life and work, and have gradually been popularized among groups such as elderly users or users with hand movement disorders. However, due to hand tremors or slow reactions, elderly users or users with hand movement disorders are prone to multiple false touches on the touch screen, resulting in repeated execution of the same operation by the application and confusion in the response of the application interface, and the anti-shake processing can solve or alleviate such faults to some extent.

[0003] Event anti-shake refers to the case where the same event is frequently triggered within a specified time, and the event is only executed when the interval of triggering exceeds the specified interval. The main strategy for implementing event anti-shake at present is to develop local anti-shake functions for interactive components in the application one by one by writing anti-shake functions, which is not only low in development efficiency and high in development cost, but also prone to errors or omissions in the anti-shake logic of some components due to development differences. In addition, most of the current anti-shake strategies use fixed anti-shake time windows and do not consider the personalized needs of users, and cannot adaptively adjust the anti-shake time window, resulting in a decline in user experience. SUMMARY

[0004] The embodiments of the present application provide an event anti-shake method and device of an application interface, an electronic device and a storage medium, which can solve the problems of low development efficiency, high development cost, poor stability and inability to meet personalized needs of the existing anti-shake strategies.

[0005] In a first aspect, the embodiments of the present application provide an event anti-shake method of an application interface, comprising:

[0006] When the target application is in an event anti-shake function enabled state, and it is detected that a first interactive event of the target application is triggered and the first interactive event is not within a first anti-shake time window corresponding to the first interactive event, the first interactive event is responded to, and then a first anti-shake timer associated with the first interactive event is created and started.

[0007] The event anti-shake function is implemented by implanting anti-shake control logic in the framework layer of the target application, and wrapping the anti-shake control logic based on the framework layer for different interactive component packages of the target application; the anti-shake time window of an interactive event is the time period from the start of the anti-shake timer associated with the interactive event to the termination of the anti-shake timer; the framework layer of the target application does not respond to the same interactive event triggered again within the anti-shake time window of the interactive event;

[0008] when a second interaction event of the target application is detected to be triggered and the second interaction event is not within a second anti-shake time window corresponding to the second interaction event, responding to the second interaction event, and then creating and starting a second anti-shake timer associated with the second interaction event;

[0009] wherein the second interaction event is different from the first interaction event, and the second anti-shake timer and the first anti-shake timer run independently of each other.

[0010] Compared with the prior art, the embodiments of the present application have the beneficial effects that:

[0011] The present application embeds the anti-shake control logic into the application framework layer, and realizes the event anti-shake function by wrapping the anti-shake control logic for different interaction components, so that the event anti-shake function becomes a bottom-layer public service, thereby realizing global anti-shake, without the need to repeatedly write anti-shake functions for each component in the business code, reducing the memory resource consumption caused by code redundancy, ensuring system performance, and effectively improving development efficiency and reducing development cost. In addition, the unified management of the framework layer also ensures high stability, avoiding anti-shake logic errors or omissions caused by development differences. In addition, by creating and managing independent anti-shake timers for different interaction events, and binding the life cycle of each anti-shake timer to the associated interaction event, the anti-shake states of different interaction events are accurately isolated, ensuring smoothness of operations in complex interaction processes, avoiding operation sequence confusion, and improving user experience.

[0012] In a possible implementation manner of the first aspect, the step of wrapping the anti-shake control logic for different interaction components of the target application based on the framework layer comprises:

[0013] In the initialization phase of the framework layer, locating a prototype object of at least one preset base class in the target application; wherein the preset base class is a component class inherited by at least one of the interaction components through a prototype chain;

[0014] For each original event handling method on the prototype object of the preset base class, the reference of the original event handling method is saved respectively;

[0015] Based on the reference and the anti-shake control logic, a target event handling method is constructed; the target event handling method is configured to, when receiving a call request for an original event handling method, first execute the anti-shake control logic, and determine whether to call the original event handling method through the reference and pass a component instance context and event parameters corresponding to the call request according to the execution result of the anti-shake control logic;

[0016] The original event processing method on the prototype object is replaced by a corresponding target event processing method, so that the preset base class and all interactive components that inherit the preset base class through a prototype chain automatically acquire the anti-shake control logic.

[0017] In the above scheme, the prototype object of the preset base class is directly replaced by a method, and the anti-shake control logic is implemented in the replaced method. Based on the prototype chain inheritance mechanism, all interactive components that directly or indirectly inherit from the preset base class can automatically inherit the anti-shake control logic, thereby realizing zero-intrusive global anti-shake. Even if the application component is expanded, the newly added component can also automatically realize anti-shake packaging by using the prototype chain feature, avoiding the problem of incomplete anti-shake control logic coverage, and ensuring development efficiency and system compatibility.

[0018] In a possible implementation manner of the first aspect, the step of executing the anti-shake control logic comprises:

[0019] When detecting that an interactive event is triggered, the call request for the original event processing method of the interactive event is intercepted;

[0020] If there is no anti-shake timer associated with the interactive event at present, the original event processing method is executed, and a corresponding anti-shake timer is created and started. The anti-shake timer is configured to remain in a started state within a corresponding anti-shake time window, and is automatically cleared after the anti-shake time window ends.

[0021] If there is an anti-shake timer associated with the interactive event at present, the call request is discarded.

[0022] In the above scheme, it is ensured that for the same interactive event, there is only one valid timer instance within the anti-shake time window. The anti-shake timer is automatically started after being created, and is automatically cleared after the anti-shake time window ends, without the need for manual management. The code logic is simplified, and the memory occupation of the timer is automatically managed to ensure efficient use of resources.

[0023] In a possible implementation manner of the first aspect, the step of creating and starting the corresponding anti-shake timer further comprises:

[0024] Based on at least one influencing factor related to the interactive event, the length of the anti-shake time window corresponding to the interactive event is dynamically determined according to a predefined adaptive rule.

[0025] In the above scheme, different anti-shake time windows are set for different interactive events to realize a flexible anti-shake strategy. Through adaptive dynamic adjustment of the anti-shake time window, personalized anti-shake protection is provided, and the best balance between performance optimization and user experience is realized.

[0026] In a possible implementation manner of the first aspect, the influence factors include a component type, an event level, user historical operation data, a device state, and a current triggering time, and the step of dynamically determining the length of the anti-shake time window corresponding to the interaction event according to the at least one influence factor related to the interaction event and according to a predefined adaptive rule includes:

[0027] determining a first adjustment coefficient corresponding to the component type;

[0028] determining a second adjustment coefficient corresponding to the event level;

[0029] determining a first adjustment value corresponding to the user historical operation data in a previous time period;

[0030] determining a second adjustment value corresponding to the device state;

[0031] determining a third adjustment coefficient corresponding to a time period in which the current triggering time is located;

[0032] determining the length of the anti-shake time window corresponding to the interaction event based on a basic anti-shake duration, the first adjustment coefficient, the second adjustment coefficient, the third adjustment coefficient, the first adjustment value, and the second adjustment value; wherein the first adjustment coefficient, the second adjustment coefficient, and the third adjustment coefficient are used as multiplicative factors, and the first adjustment value and the second adjustment value are used as additive terms.

[0033] In the foregoing solution, the component type, the event level, the user historical operation data, the device state, and the current triggering time are selected as the influence factors to adjust the length of the anti-shake time window, the component type, the event level, and the time period in which the triggering time is located are mapped to multiplicative coefficients according to the action modes of the specific factors, the device state and the user historical operation data are used as dynamic additive terms, a hybrid rule is used to dynamically calculate the length of the anti-shake time window, and a reasonable anti-shake optimization logic chain is formed.

[0034] In a possible implementation manner of the first aspect, the event anti-shake method of the application interface further includes:

[0035] starting the event anti-shake function by receiving a user input anti-shake starting instruction;

[0036] and / or,

[0037] determining whether to start the event anti-shake function based on a matching result of collected user personal information and a preset feature template;

[0038] The preset feature template defines user group features suitable for the event anti-shake function.

[0039] In the above scheme, two parallel opening event anti-shake function modes are provided, one is through user active enablement, and the other is through intelligent start of the system after intelligent judgment that the user personal information meets specific characteristics. The cooperative design of the two opening paths covers the needs of different user groups, respects user choice, reduces the use threshold of the event anti-shake function through intelligent means, and realizes the unity of universality and individuality.

[0040] In a possible implementation manner of the first aspect, the event anti-shake method of the application interface further includes:

[0041] determining a user attribute based on the user personal information within the anti-shake time window of any interactive event;

[0042] when the user attribute is a first group attribute that needs auxiliary operation, starting an enhanced multi-modal feedback mechanism for the same interactive event triggered again;

[0043] when the user attribute is a second group attribute of regular operation, starting a basic visual feedback mechanism for the same interactive event triggered again;

[0044] wherein the enhanced multi-modal feedback mechanism includes at least two of visual feedback, tactile feedback and auditory feedback.

[0045] In the above scheme, feedback information is provided within the anti-shake time window to reduce the operation anxiety of the user and further improve the experience of the user. Meanwhile, different feedback mechanisms are used for different user groups to provide the most suitable interactive experience for different types of users by optimal resource allocation. The users of regular operation obtain efficient and concise interaction and avoid unnecessary disturbance, and the users that need auxiliary operation obtain more sensory prompts to ensure that the information is transmitted accurately. Meanwhile, system efficiency and humanistic care are considered.

[0046] In the second aspect, the embodiments of the present application provide an event anti-shake device of an application interface, including:

[0047] a first control module, configured to, when a target application is in an event anti-shake function opening state, and when a first interactive event of the target application is detected to be triggered and the first interactive event is not within a first anti-shake time window corresponding to the first interactive event, respond to the first interactive event, and then create and start a first anti-shake timer associated with the first interactive event;

[0048] The event anti-shake function is implemented by implanting anti-shake control logic in a framework layer of the target application, and wrapping the anti-shake control logic based on the framework layer for different interactive component packages of the target application; the anti-shake time window of the interactive event is a time period from when an anti-shake timer associated with the interactive event is started to when the anti-shake timer is terminated; the framework layer of the target application does not respond to the same interactive event that is triggered again within the anti-shake time window of the interactive event.

[0049] The second control module is configured to, when detecting that a second interactive event of the target application is triggered and the second interactive event is not within a second anti-shake time window corresponding to the second interactive event, respond to the second interactive event, and then create and start a second anti-shake timer associated with the second interactive event.

[0050] The second interactive event is different from the first interactive event, and the second anti-shake timer and the first anti-shake timer run independently of each other.

[0051] In a third aspect, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the event anti-shake method of the application interface according to any one of the first aspect when executing the computer program.

[0052] In a fourth aspect, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program, and the computer program is characterized by being executable on a processor to implement the event anti-shake method of the application interface according to any one of the first aspect.

[0053] In a fifth aspect, a computer program product is provided, and when the computer program product is executed on a terminal device, the terminal device executes the event anti-shake method of the application interface according to any one of the first aspect.

[0054] It can be understood that the beneficial effects of the second aspect to the fifth aspect can be referred to the related description of the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS

[0055] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0056] Figure 1is a flowchart of an event anti-shake method of an application interface provided by an embodiment of the present application;

[0057] Figure 2 is a flowchart of wrapping anti-shake control logic of an interaction component based on a framework layer in an event anti-shake method of an application interface provided by an embodiment of the present application;

[0058] Figure 3 is a flowchart of executing anti-shake control logic in an event anti-shake method of an application interface provided by an embodiment of the present application;

[0059] Figure 4 is a flowchart of determining a length of an anti-shake time window in an event anti-shake method of an application interface provided by an embodiment of the present application;

[0060] Figure 5 is a flowchart of controlling an event anti-shake function in an event anti-shake method of an application interface provided by an embodiment of the present application;

[0061] Figure 6 is a flowchart of controlling a feedback mechanism in an event anti-shake method of an application interface provided by an embodiment of the present application;

[0062] Figure 7 is a structural diagram of an event anti-shake apparatus of an application interface provided by an embodiment of the present application;

[0063] Figure 8 is a structural diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0064] In the following description, specific details are set forth, such as particular system configurations, techniques, etc., in order to provide a thorough understanding of the embodiments of the present application. However, persons having ordinary skill in the art will readily understand that the present application can be practiced without these specific details. In other instances, well-known structures, devices, circuits, and materials have not been described in detail in order to avoid obscuring the application.

[0065] It should be understood that the term "comprising" as used in the specification and in the claims indicates the presence of the recited features, integers, steps, operations, elements, and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0066] It should also be understood that the term "and / or" as used herein refers to any one of the associated listed items, combinations of one or more of the associated listed items, and all possible combinations thereof.

[0067] In addition, in the description of the present application and the appended claims, the terms "first", "second", "third" and the like are used only to distinguish descriptions, and cannot be understood as indicating or implying relative importance.

[0068] Referring to Figure 1 The application embodiment provides a flowchart of an event anti-shake method of an application interface. The event anti-shake method of the application interface is mainly aimed at a single application in a Hongmeng operating system. The prototype chain hijacking technology is applied to the Hongmeng system to realize global anti-shake in the whole life cycle of the application. Of course, the method can also be applied to other operating systems. As an example but not limitation, the method can include the following steps:

[0069] S11, when it is detected that a first interaction event of a target application is triggered and the first interaction event is not in a first anti-shake time window corresponding to the first interaction event, responding to the first interaction event, and then creating and starting a first anti-shake timer associated with the first interaction event, under the condition that the target application is in an event anti-shake function opening state.

[0070] The event anti-shake function is realized by implanting anti-shake control logic in the framework layer of the target application, and wrapping the anti-shake control logic based on the framework layer to different interaction components of the target application. The anti-shake time window of the interaction event is the time period from the start of the anti-shake timer associated with the interaction event to the termination of the anti-shake timer. The framework layer of the target application does not respond to the same interaction event triggered again within the anti-shake time window of the interaction event.

[0071] S12, when it is detected that a second interaction event of a target application is triggered and the second interaction event is not in a second anti-shake time window corresponding to the second interaction event, responding to the second interaction event, and then creating and starting a second anti-shake timer associated with the second interaction event.

[0072] The second interaction event is different from the first interaction event, and the second anti-shake timer and the first anti-shake timer run independently of each other.

[0073] In this embodiment, the interaction components include but are not limited to key components, sliding components, input box components, etc., and the interaction events include but are not limited to click operation and long press operation on the key components, sliding operation on the sliding components, input operation on the input box components, etc.

[0074] In a possible implementation, when the target application is an application of the Harmony system, the anti-shake control logic is specifically implanted in an ArkUI (official UI development framework of the Harmony system) framework layer, is initialized in an EntryAbility (an application startup first loaded core capability component responsible for initializing the application and managing the life cycle), and is set as a global singleton. In an interactive component that needs to be anti-shaked, the anti-shake control logic is used to wrap an event processing method.

[0075] The event anti-shake method of the application interface provided in this embodiment implants the anti-shake control logic in the application framework layer, and implements the event anti-shake function by wrapping the anti-shake control logic for different interactive components, so that the event anti-shake function becomes a bottom layer public service, thereby achieving global anti-shake, without the need to repeatedly write anti-shake functions for each component in the business code, reducing memory resource consumption caused by code redundancy, ensuring system performance, effectively improving development efficiency, and reducing development cost. In addition, the unified management of the framework layer also ensures high stability, avoiding anti-shake logic errors or omissions caused by development differences. In addition, by creating and managing independent anti-shake timers for different interactive events, and binding the life cycle of each anti-shake timer to the associated interactive event, the anti-shake states of different interactive events are accurately isolated, ensuring smoothness of operations in a complex interactive process, avoiding operation sequence confusion, and improving user experience.

[0076] In this embodiment, the event anti-shake method of the application interface includes wrapping anti-shake control logic for interactive components based on the framework layer, as shown in Figure 2 , by way of example but not limitation, the process of wrapping anti-shake control logic for interactive components based on the framework layer can include the following steps:

[0077] S21, in the initialization stage of the framework layer, locating a prototype object of at least one preset base class in the target application.

[0078] The preset base class is a component class inherited by at least one interactive component through a prototype chain.

[0079] In a possible implementation, which interactive components are bound to the anti-shake function and which interactive components are not bound to the anti-shake function can be determined according to actual design requirements. For example, interactive components involved in a continuous hit event do not need to be bound to the anti-shake function.

[0080] S22, for each original event processing method on the prototype object of the preset base class, the reference of the original event processing method is saved respectively.

[0081] S23, constructing a target event processing method based on the reference and the anti-shake control logic.

[0082] In a possible implementation, the target event processing method is configured to: when receiving a call request for the original event processing method, first execute the debounce control logic, and determine whether to call the original event processing method by reference and pass the component instance context and event parameters corresponding to the call request according to the execution result of the debounce control logic.

[0083] S24, the original event processing method on the prototype object is replaced by the corresponding target event processing method, so that the preset base class and all interactive components that inherit the preset base class through the prototype chain automatically obtain the debounce control logic.

[0084] The event debounce method of the application interface provided in the embodiment directly replaces the method of the prototype object of the preset base class, and performs the debounce control logic in the replaced method. Based on the prototype chain inheritance mechanism, all interactive components that directly or indirectly inherit from the preset base class can automatically inherit the debounce control logic, so that zero-intrusive global debounce is realized. Even if the application component is expanded, the newly added component can also automatically realize the debounce wrapping by using the prototype chain feature, avoiding the problem of incomplete debounce control logic coverage, and ensuring the development efficiency and system compatibility.

[0085] Optionally, referring to Figure 3 The process of executing the debounce control logic can include the following steps:

[0086] S31, when it is detected that an interactive event is triggered, the call request for the original event processing method of the interactive event is intercepted; if there is no debounce timer associated with the interactive event at present, steps S32 to S34 are sequentially executed; if there is a debounce timer associated with the interactive event at present, step S35 is executed.

[0087] S33, the original event processing method is executed.

[0088] S33, based on at least one influence factor related to the interactive event, the length of the debounce time window corresponding to the interactive event is dynamically determined according to a predefined adaptive rule.

[0089] S34, the corresponding debounce timer is created and started.

[0090] The debounce timer is configured to remain in a started state within the corresponding debounce time window, and is automatically cleared after the debounce time window ends.

[0091] S35, the call request is discarded.

[0092] This embodiment provides an event debouncing method for application interfaces, ensuring that for the same interactive event, only one valid timer instance exists within the debouncing time window. The debouncing timer starts automatically after creation and is automatically cleared after the debouncing time window ends, eliminating the need for manual management and simplifying code logic. Automatic management of timer memory usage ensures efficient resource utilization. Furthermore, different debouncing time windows are set according to different interactive events when creating the debouncing timer, enabling flexible debouncing strategies. By dynamically adjusting the debouncing time window to adapt to the environment, personalized debouncing protection is provided, achieving an optimal balance between performance optimization and user experience.

[0093] Optionally, see Figure 4 One implementation of step S33 in the process of executing the anti-shake control logic may include:

[0094] S331. According to the first adjustment coefficient corresponding to the component type.

[0095] S332. Determine the corresponding second adjustment coefficient based on the event level.

[0096] S333. Determine the corresponding first adjustment value based on the user's historical operation data in the previous time period.

[0097] S334. Determine the corresponding second adjustment value based on the device status.

[0098] S335. Determine the corresponding third adjustment coefficient based on the time period in which the current trigger time is located.

[0099] S336. Determine the length of the stabilization time window corresponding to the interactive event based on the basic stabilization duration, the first adjustment coefficient, the second adjustment coefficient, the third adjustment coefficient, the first adjustment value, and the second adjustment value.

[0100] Among them, the first adjustment coefficient, the second adjustment coefficient, and the third adjustment coefficient are used as multiplication factors, and the first adjustment value and the second adjustment value are used as addition terms.

[0101] In one possible implementation, a higher first adjustment factor is used for component types with less interactive content, such as click interactions and swipe interactions; while a lower first adjustment factor is used for component types with more interactive content, such as long press interactions and input interactions.

[0102] In one possible implementation, the event level indicates the importance of the event. For example, for the same click operation, the level of a form submission event is higher than that of a page redirection event. For higher-level interactive events, a higher second adjustment factor is used to extend the length of the debouncing time window, while for lower-level interactive events, a lower second adjustment factor can be used.

[0103] In a possible implementation, the user historical operation data reflects user operation habits, and an operation interval pattern of the user can be obtained therefrom. Meanwhile, the operation interval pattern of the user is updated regularly every time interval, and for a user who needs to operate more frequently, the first adjustment value can be shortened to shorten the length of the anti-shake time window, and for a user who operates less frequently, the first adjustment value can be lengthened.

[0104] In a possible implementation, the device status includes device performance and network status, and for a low-performance device or a poor network, the second adjustment value is lengthened, and for a high-performance device or a good network, the second adjustment value is shortened.

[0105] In a possible implementation, the time interval in which the current trigger time is located includes daytime and nighttime, and for operation at nighttime, more caution is needed, and a higher third adjustment coefficient can be set for nighttime, and a lower third adjustment coefficient can be set for daytime.

[0106] The event anti-shake method of the application interface provided in this embodiment selects the component type, the event level, the user historical operation data, the device status, and the current trigger time as influencing factors to adjust the length of the anti-shake time window, maps the component type, the event level, and the time interval in which the trigger time is located to a multiplication coefficient according to the action mode of the specific factors, uses the device status and the user historical operation data as a dynamic addition term, dynamically calculates the length of the anti-shake time window using a hybrid rule, and forms a reasonable anti-shake optimization logic chain.

[0107] Optionally, the event anti-shake method of the application interface further includes controlling the event anti-shake function, as shown in Figure 5 , by way of example but not limitation, the flow of controlling the event anti-shake function can include the following steps:

[0108] S41, the event anti-shake function is started by receiving a user input anti-shake starting instruction.

[0109] S42, whether to start the event anti-shake function is determined based on a matching result of the collected user personal information and a preset feature template.

[0110] The preset feature template defines user group features suitable for the event anti-shake function.

[0111] In this embodiment, the event anti-shake function of the application can be automatically turned on or off, and the event anti-shake function can also be automatically started for some special groups, such as elderly users and users with hand disabilities. By way of example but not limitation, the user can register an account in the use of the application, so that the age information is collected, and then it is determined whether the user is an elderly person, and for example, it is detected whether the user repeatedly triggers the same interactive event in a short period of time, and if so, the user is suitable for the event anti-shake function.

[0112] The event anti-shake method of the application interface provided in this embodiment sets two parallel ways of starting the event anti-shake function, one is through user active starting, and the other is through intelligent starting of the system after the system intelligently judges that the user personal information meets specific characteristics. The cooperative design of the two starting paths covers the needs of different user groups, respects the user's right to choose, reduces the use threshold of the event anti-shake function through intelligent means, and realizes the unity of universality and individuality.

[0113] Optionally, the event anti-shake method of the application interface further includes a control feedback mechanism, see Figure 5 , as an example but not limitation, the flow of the control feedback mechanism can include the following steps:

[0114] S51, within the anti-shake time window of any interaction event, determining the user attribute based on the user personal information; when the user attribute is a first group attribute that needs auxiliary operation, executing step S52; when the user attribute is a second group attribute of normal operation, executing step S53.

[0115] The first group includes young users and users with hand disabilities, and the second group is usually ordinary users who actively open the event anti-shake function (some ordinary users may also need the anti-shake function), and at the same time, the feedback mechanism can further remind the user that the event anti-shake function has been started, preventing the user from feeling anxious about the anti-shake process.

[0116] S51, starting an enhanced multi-modal feedback mechanism for the same interaction event triggered again.

[0117] S53, starting a basic visual feedback mechanism for the same interaction event triggered again.

[0118] The enhanced multi-modal feedback mechanism includes at least two of visual feedback, tactile feedback, and auditory feedback.

[0119] In one possible implementation, the visual feedback includes displaying an anti-shake state progress bar, the tactile feedback includes activating the touch screen vibration, and the auditory feedback includes playing voice prompt information, and all feedbacks are closed when the anti-shake timer is terminated.

[0120] The event anti-shake method of the application interface provided in this embodiment provides feedback information within the anti-shake time window to reduce the user's operation anxiety and further improve the user's experience, and at the same time, different feedback mechanisms are used for different user groups to provide the most suitable interactive experience for different types of users, so that users with normal operation get efficient and concise interaction and avoid unnecessary disturbance, and users who need auxiliary operation get more sensory prompts to ensure that the information is transmitted accurately, while the system efficiency and humanistic care are taken into account.

[0121] It should be understood that the size of the serial number of each step in the above embodiments does not mean the order of execution, and the execution order of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0122] The event debouncing method corresponding to the application interface described in the above embodiments, Figure 6 The structural block diagram of the event debouncing device of the application interface provided by the embodiments of the present application is shown, and only the parts related to the embodiments of the present application are shown for ease of illustration.

[0123] Referring to Figure 7 The event debouncing device of the application interface comprises:

[0124] The first control module is configured to, when the target application is in an event debouncing function enabled state, and when it is detected that a first interaction event of the target application is triggered and the first interaction event is not within a first debouncing time window corresponding to the first interaction event, respond to the first interaction event, and then create and start a first debouncing timer associated with the first interaction event. The event debouncing function is implemented by implanting debouncing control logic in the framework layer of the target application, and wrapping the debouncing control logic based on the framework layer for different interactive components of the target application. The debouncing time window of the interaction event is the time period from the start of the debouncing timer associated with the interaction event to the termination of the debouncing timer. The framework layer of the target application does not respond to the same interaction event triggered again within the debouncing time window of the interaction event.

[0125] The second control module is configured to, when it is detected that a second interaction event of the target application is triggered and the second interaction event is not within a second debouncing time window corresponding to the second interaction event, respond to the second interaction event, and then create and start a second debouncing timer associated with the second interaction event. Wherein the second interaction event is different from the first interaction event, and the second debouncing timer and the first debouncing timer run independently of each other.

[0126] In some embodiments of the present application, the event anti-shake device of the application interface further comprises an anti-shake packaging module, specifically configured to locate a prototype object of at least one preset base class in the target application during the initialization stage of the framework layer; wherein the preset base class is a component class inherited by at least one interactive component through a prototype chain; for each original event handling method on the prototype object of the preset base class, the reference of the original event handling method is saved respectively; the target event handling method is constructed based on the reference and the anti-shake control logic; the target event handling method is configured to, when receiving a call request for the original event handling method, first execute the anti-shake control logic, and determine whether to call the original event handling method through the reference and pass the component instance context and event parameters corresponding to the call request according to the execution result of the anti-shake control logic; and replace the original event handling method on the prototype object with the corresponding target event handling method, so that the preset base class and all interactive components inheriting the preset base class through the prototype chain automatically obtain the anti-shake control logic.

[0127] In some embodiments of the present application, the event anti-shake device of the application interface further comprises an anti-shake execution module, specifically configured to intercept a call request for an original event handling method of an interactive event when detecting that the interactive event is triggered; if there is no anti-shake timer associated with the interactive event at present, execute the original event handling method, dynamically determine the length of the anti-shake time window corresponding to the interactive event according to the predefined adaptive rule based on at least one influencing factor related to the interactive event, create and start the corresponding anti-shake timer, and the anti-shake timer is configured to remain in the starting state within the corresponding anti-shake time window, and automatically clear after the anti-shake time window ends; if there is an anti-shake timer associated with the interactive event at present, discard the call request.

[0128] In some embodiments of the present application, the anti-shake execution module is further specifically configured to determine a first adjustment coefficient corresponding to the component type; determine a second adjustment coefficient corresponding to the event level; determine a first adjustment value corresponding to the user historical operation data in the last time period; determine a second adjustment value corresponding to the device state; determine a third adjustment coefficient corresponding to the time period in which the current trigger time is located; determine the length of the anti-shake time window corresponding to the interactive event based on the basic anti-shake duration, the first adjustment coefficient, the second adjustment coefficient, the third adjustment coefficient, the first adjustment value and the second adjustment value; wherein the first adjustment coefficient, the second adjustment coefficient and the third adjustment coefficient are used as multiplication factors, and the first adjustment value and the second adjustment value are used as addition terms.

[0129] In some embodiments of the present application, the event anti-shake device of the application interface further comprises a function starting module, specifically configured to start the event anti-shake function by receiving an anti-shake opening instruction input by a user.

[0130] In some embodiments of the present application, the function starting module is further specifically configured to determine whether to start the event anti-shake function based on a matching result of the collected user personal information and a preset feature template; wherein the preset feature template defines user group features applicable to the event anti-shake function.

[0131] In some embodiments of the present application, the event anti-shake device of the application interface further comprises a feedback control module, which is specifically configured to determine a user attribute based on user personal information within the anti-shake time window of any interactive event; when the user attribute is a first group attribute that needs auxiliary operation, an enhanced multi-modal feedback mechanism is started for the same interactive event triggered again; when the user attribute is a second group attribute of regular operation, a basic visual feedback mechanism is started for the same interactive event triggered again; wherein the enhanced multi-modal feedback mechanism comprises at least two of visual feedback, tactile feedback and auditory feedback.

[0132] It should be noted that the information interaction, execution process and the like between the above-mentioned devices / units, since based on the same concept as the method embodiments of the present application, the specific functions and the technical effects brought by them can be referred to the method embodiments part, and will not be repeated here.

[0133] Figure 8 The structural schematic diagram of an electronic device provided by an embodiment of the present application is shown in FIG. 3. As shown in FIG. 3, the electronic device 3 of the embodiment comprises at least one processor 30 (only one processor is shown in the figure), a memory 31 and a computer program 32 stored in the memory 31 and executable on the at least one processor 30, and the processor 30 implements the steps in the above-mentioned event anti-shake method embodiments of each application interface when executing the computer program 32. Figure 8 Figure 8 The electronic device 3 can be a desktop computer, a notebook computer, a palm computer and a cloud server, etc. The electronic device 3 can include, but is not limited to, the processor 30 and the memory 31. Those skilled in the art can understand that the electronic device 3 shown in the figure is only an example of the electronic device 3, and does not constitute a limitation on the electronic device 3, and can include more or fewer components than those shown in the figure, or combine certain components, or different components, for example, can also include an input / output device, a network access device, etc.

[0134] The electronic device 3 can be a desktop computer, a notebook computer, a palm computer and a cloud server, etc. The electronic device 3 can include, but is not limited to, the processor 30 and the memory 31. Those skilled in the art can understand that the electronic device 3 shown in the figure is only an example of the electronic device 3, and does not constitute a limitation on the electronic device 3, and can include more or fewer components than those shown in the figure, or combine certain components, or different components, for example, can also include an input / output device, a network access device, etc. Figure 8

[0135] ​​The processor 30 can be a central processing unit (CPU), and can also be other general-purpose processors, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or the like. The general-purpose processor can be a microprocessor, or the processor can also be any conventional processor.

[0136] The memory 31 can be an internal storage unit of the electronic device 3, such as a hard disk or a memory of the electronic device 3 in some embodiments. The memory 31 can also be an external storage device of the electronic device 3, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, or the like, in other embodiments. Further, the memory 31 can include both an internal storage unit and an external storage device of the electronic device 3. The memory 31 is used to store an operating system, an application program, a boot loader, data, and other programs, such as program codes of computer programs, and the like. The memory 31 can also be used to temporarily store data that has been output or will be output.

[0137] The embodiments of the present application further provide a computer readable storage medium storing a computer program, and the computer program is executed by a processor to implement the steps in the event anti-shake method embodiments of the various application interfaces.

[0138] The embodiments of the present application provide a computer program product, and when the computer program product is run on a mobile terminal, the mobile terminal is caused to implement the steps in the event anti-shake method embodiments of the various application interfaces.

[0139] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the present application implements all or part of the processes in the above-mentioned embodiment methods, which can be completed by instructing related hardware through a computer program. The computer program can be stored in a computer readable storage medium, and the computer program can implement the steps of the event anti-shake method embodiments of each application interface when executed by a processor. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or some intermediate forms, etc. The computer readable medium at least includes any entity or device capable of carrying the computer program code to the photographing device / terminal equipment, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium. For example, U disk, mobile hard disk, magnetic disk or optical disk, etc. In some jurisdictions, according to legislation and patent practice, the computer readable medium cannot be an electrical carrier signal and a telecommunication signal.

[0140] In the above embodiments, the description of each embodiment has its own focus, and the parts not described or recorded in detail in a certain embodiment can be referred to the relevant description of other embodiments.

[0141] Those skilled in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0142] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features can be replaced by equivalents; and these modifications or replacements do not make the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.

Claims

1. An event debouncing method for an application interface, characterized in that, include: When the target application is in the event deshaking mode, when a first interaction event to the target application is detected and the first interaction event is not within the first deshaking time window corresponding to the first interaction event, the first interaction event is responded to, and then a first deshaking timer associated with the first interaction event is created and started. The event stabilization function is implemented by embedding stabilization control logic in the framework layer of the target application and wrapping the stabilization control logic in different interactive components of the target application based on the framework layer; the stabilization time window of the interactive event is the time period from the start of the stabilization timer associated with the interactive event to the termination of the stabilization timer; the framework layer of the target application does not respond to the same interactive event that is triggered again within the stabilization time window of the interactive event; When a second interaction event to the target application is detected and the second interaction event is not within the second stabilization time window corresponding to the second interaction event, the second interaction event is responded to, and then a second stabilization timer associated with the second interaction event is created and started; The second interactive event is different from the first interactive event, and the second anti-shake timer and the first anti-shake timer operate independently of each other; The step of wrapping the anti-shake control logic for different interactive components of the target application based on the framework layer includes: During the initialization phase of the framework layer, the prototype object of at least one preset base class in the target application is located; wherein, the preset base class is a component class inherited by at least one of the interactive components through a prototype chain; For each primitive event handling method on the prototype object of the preset base class, a reference to the primitive event handling method is saved respectively; A target event handling method is constructed based on the reference and the debouncing control logic; the target event handling method is configured to: when a call request for the original event handling method is received, first execute the debouncing control logic, and determine whether to call the original event handling method through the reference and pass the component instance context and event parameters corresponding to the call request based on the execution result of the debouncing control logic; Replace the original event handling method on the prototype object with the corresponding target event handling method, so that the preset base class and all interactive components that inherit the preset base class through the prototype chain automatically obtain the anti-shake control logic.

2. The event debouncing method for application interfaces according to claim 1, characterized in that, The steps for executing the image stabilization control logic include: When an interactive event is detected to be triggered, the call request to the original event handling method of the interactive event is intercepted; If there is no deshake timer associated with the interaction event, the original event handling method is executed to create and start the corresponding deshake timer; the deshake timer is configured to remain running within the corresponding deshake time window and be automatically cleared after the deshake time window ends. If a debouncing timer is currently associated with the interaction event, the call request is discarded.

3. The event debouncing method for application interfaces according to claim 2, characterized in that, Before the step of creating and starting the corresponding anti-shake timer, the following is also included: Based on at least one influencing factor related to the interaction event, the length of the anti-shake time window corresponding to the interaction event is dynamically determined according to a predefined adaptive rule.

4. The event debouncing method for application interfaces according to claim 3, characterized in that, The influencing factors include component type, event level, user historical operation data, device status, and current trigger time. The step of dynamically determining the length of the anti-shake time window corresponding to the interaction event based on at least one influencing factor related to the interaction event and according to predefined adaptive rules includes: According to the first adjustment coefficient corresponding to the component type; Determine the corresponding second adjustment coefficient based on the event level; The corresponding first adjustment value is determined based on the user's historical operation data within the previous time period; Determine the corresponding second adjustment value based on the device status; The corresponding third adjustment coefficient is determined based on the time period in which the current trigger time falls; The length of the stabilization time window corresponding to the interactive event is determined based on the base stabilization duration, the first adjustment coefficient, the second adjustment coefficient, the third adjustment coefficient, the first adjustment value, and the second adjustment value; wherein, the first adjustment coefficient, the second adjustment coefficient, and the third adjustment coefficient are used as multiplication factors, and the first adjustment value and the second adjustment value are used as addition terms.

5. The event debouncing method for an application interface according to claim 1, characterized in that, The event debouncing method for the application interface also includes: The event stabilization function is activated by receiving a stabilization activation command input by the user. And / or, Whether to enable the event debouncing function is determined based on the matching results between the collected user personal information and the preset feature template; The preset feature template defines the user group characteristics applicable to the event stabilization function.

6. The event debouncing method for an application interface according to claim 5, characterized in that, The event debouncing method for the application interface also includes: Within the anti-shake time window of any interactive event, the user attribute is determined based on the user's personal information; When the user attribute is a first group attribute that requires assisted operation, an enhanced multimodal feedback mechanism is activated for the same interaction event that is triggered again. When the user attribute is a second group attribute of regular operation, a basic visual feedback mechanism is initiated for the same interaction event that is triggered again. The enhanced multimodal feedback mechanism includes at least two of the following: visual feedback, tactile feedback, and auditory feedback.

7. An event debounce device for an application interface, characterized in that, include: The first control module is configured to respond to the first interaction event when the target application is in the event stabilization function enabled state, and when the first interaction event is detected to be triggered and the first interaction event is not within the first stabilization time window corresponding to the first interaction event, and then create and start the first stabilization timer associated with the first interaction event. The event stabilization function is implemented by embedding stabilization control logic in the framework layer of the target application and wrapping the stabilization control logic in different interactive components of the target application based on the framework layer; the stabilization time window of the interactive event is the time period from the start of the stabilization timer associated with the interactive event to the termination of the stabilization timer; the framework layer of the target application does not respond to the same interactive event that is triggered again within the stabilization time window of the interactive event; The second control module is used to respond to the second interaction event when it is detected that a second interaction event on the target application is triggered and the second interaction event is not within the second anti-shake time window corresponding to the second interaction event, and then create and start the second anti-shake timer associated with the second interaction event; The second interactive event is different from the first interactive event, and the second anti-shake timer and the first anti-shake timer operate independently of each other; The step of wrapping the anti-shake control logic for different interactive components of the target application based on the framework layer includes: During the initialization phase of the framework layer, the prototype object of at least one preset base class in the target application is located; wherein, the preset base class is a component class inherited by at least one of the interactive components through a prototype chain; For each primitive event handling method on the prototype object of the preset base class, a reference to the primitive event handling method is saved respectively; A target event handling method is constructed based on the reference and the debouncing control logic; the target event handling method is configured to: when a call request for the original event handling method is received, first execute the debouncing control logic, and determine whether to call the original event handling method through the reference and pass the component instance context and event parameters corresponding to the call request based on the execution result of the debouncing control logic; Replace the original event handling method on the prototype object with the corresponding target event handling method, so that the preset base class and all interactive components that inherit the preset base class through the prototype chain automatically obtain the anti-shake control logic.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the event debouncing method for the application interface as described in any one of claims 1 to 6.

9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the event debouncing method for the application interface as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Anti-shake and throttling packaging method and system

    CN111460350A

  • Anti-shake method, anti-shake device and wearable equipment

    CN116069223A