Method for automatically performing input event processing of a scenario and electronic device
By automatically handling input events on smartphones, accidental touches are blocked, and touch events are processed on the light effect layer. This solves the problem of complex and time-consuming manual operation for users, and improves the success rate of tasks and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HONOR DEVICE CO LTD
- Filing Date
- 2024-12-27
- Publication Date
- 2026-06-30
AI Technical Summary
In daily use of smartphones, users need to manually perform complex and tedious UI operations to complete specific tasks, which is prone to errors and time-consuming, thus affecting the user experience.
This paper provides a method for handling input events in an automated scenario. By switching between full-screen and small-window displays of the application page, accidental touch operations are blocked, and touch events are processed on the light effect layer to ensure that the task is executed according to the predetermined path.
It improves the success rate of automated task execution and user experience, avoids path deviations caused by accidental touch operations, and ensures that tasks are completed smoothly.
Smart Images

Figure CN122308694A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technology, and in particular to an input event processing method and electronic device for automatically executing scenarios. Background Technology
[0002] In daily smartphone use, users often need to manually perform a series of user interface (UI) operations to complete specific tasks, such as ordering takeout, turning off auto-renewal services, sending files, or other possible tasks. However, manually performing each step of these tasks is not only inconvenient but also prone to errors. Some tasks even have overly complex operation paths, making the user experience cumbersome and time-consuming, thus negatively impacting the user experience. Summary of the Invention
[0003] This application provides an input event processing method and electronic device for automatic execution scenarios, which can automatically execute tasks in response to user instructions, and can accurately process and respond to various input events (such as user touch screen events and injection events of automatic execution tasks) during automatic task execution, thereby improving the success rate of automatic task execution and enhancing user experience.
[0004] In a first aspect, embodiments of this application provide an input event processing method for automatically executing scenarios, the method comprising:
[0005] The device receives a first instruction, which is used to cause the electronic device to automatically perform a task. The automatic task includes sequentially displaying a first number of application pages, the first number of application pages including a first application page, a second application page, and a third application page. The first application page includes a first control, the second application page includes a second control, the second application page is a page displayed by the electronic device in response to an input operation on the first control, and the third application page is a page displayed by the electronic device in response to an input operation on the second control.
[0006] In response to a first instruction, a first application page is displayed in full screen and a first button is displayed; in response to a user's first operation on the first button, a first interface is displayed in full screen and a first window (the first window displays a second application page); a second operation by the user on the first window is received, and in response to the second operation, a third application page is displayed in full screen; wherein, the second operation acts on a third control in the second application page, the third control is used to trigger the display of a fourth application page, the fourth application page being different from the third application page.
[0007] The first button is a specific button for automatically executing tasks; it can also be called the window minimization button. The first interface can be the desktop or other application interfaces. The first window can also be called a small window. In contrast to a small window, a window displayed in full-screen mode can be called a full-screen window.
[0008] The input event handling method for automated execution scenarios provided in this application embodiment can automatically execute tasks in response to user commands, and can switch between full-screen and small window displays of the application page for the automated task. For various input events (such as user touch events) during automated task execution, it can respond according to specific processing logic for automated execution. For example, if a user touch operation on the small window is detected, it switches to full-screen mode, and the application page for the automated task continues to be displayed regardless of where the touch operation occurs within the small window. By blocking various accidental touch operations that may lead to task failure and avoiding deviations in the automated execution path caused by user touch operations, the success rate of automated task execution can be improved, thus enhancing the user experience.
[0009] In some possible implementations, the tasks to be performed automatically include any of the following: checking auto-renewal, sending files, disabling application permissions, optimizing overall device performance, disabling application notifications, and ordering takeout.
[0010] The first operation can be a click or other possible touchscreen operation. The second operation can be a click or other possible touchscreen operation.
[0011] In some possible implementations, the method further includes: not displaying the fourth application page in response to the second operation. That is, while the application page for automatically performing tasks is displayed in the first window, the electronic device receives the user's second operation on the first window, and in response to the second operation, switches from the first window to a full-screen window, continuing to display the application page for automatically performing tasks through the full-screen window. Even if the user clicks on the third control in the first window, it will not trigger a jump to the fourth application page corresponding to the third control.
[0012] For example, when an application page for automatically executing tasks is displayed in a small window, the electronic device receives a touch operation from the user on the small window. The touch location is the "Services" option. The normal processing logic after clicking the "Services" option is to trigger the display of the services page. In response to the user's click operation, the electronic device does not display the services page, but instead responds according to the specific processing logic for automatic execution, such as switching from a small window to a full-screen window and continuing to display the application page for automatically executing tasks.
[0013] In order to ensure the successful execution of the automatic task without interruption by user touch operation when the task is executed automatically in a small window, the solution of this application is as follows: when a user touch operation on the small window is detected, the window is switched to full screen. Regardless of where the touch operation is applied in the small window, the application page for the automatic task can still be displayed. This can avoid the automatic execution path being deviated due to user touch operation and improve the success rate of automatic task execution.
[0014] In some possible implementations, after the first application page is displayed in full screen, the method further includes: receiving a third operation from the user on the first application page; the third operation acts on a fourth control in the first application page, the fourth control being used to trigger the display of a fifth application page; in response to the third operation, the fifth application page is not displayed, and a first pop-up window is displayed, the first pop-up window being used to prompt whether to exit the automatic task.
[0015] For example, when an application page for automatically executing tasks is displayed in a full-screen window, and the electronic device receives a touch operation from the user, with the touch location falling on the "Payments" option, the normal processing logic after clicking the "Payments" option is to trigger the display of the payments page. In response to the user's click operation, the electronic device does not display the payments page, but instead responds according to the specific processing logic for automatic execution, such as a pop-up prompting whether to exit the automatic task.
[0016] The fourth control is not a specific button for automatically executing tasks.
[0017] For example, the first pop-up window may include a continue control and an exit control. If the user clicks the continue control, the electronic device continues to automatically perform the task; if the user clicks the exit control, the electronic device exits the automatic task.
[0018] To ensure successful automatic execution of tasks without interruption by user touch operations during full-screen automatic execution, the solution proposed in this application is as follows: upon detecting a user touch operation, if the touch location falls outside a specific button (e.g., the first button), a pop-up window will prompt the user to exit the automatic execution task. This avoids deviations in the automatic execution path caused by user touch operations, thereby improving the success rate of automatic task execution.
[0019] This solution not only effectively blocks accidental user touches, but also prompts users via pop-up windows to ask if they want to disable automatic task execution, ensuring a high success rate for tasks within the execution scope.
[0020] In some other possible implementations, the method further includes: receiving a third operation by the user on a first application page; the third operation acting on a fourth control, the fourth control being used to trigger the display of a fifth application page; and in response to the third operation, identifying whether the fifth application page is the same as the second application page.
[0021] On the one hand, if the fifth application page is different from the second application page, the first pop-up window is displayed. This can avoid the automatic execution path being deviated due to user touch screen operation, and improve the success rate of automatic task execution.
[0022] In other words, when the device detects that the user's touch position is different from the simulated click position of the automatically executed task, i.e. the execution path is different, the electronic device can pop up a window to prompt the user whether to exit automatic execution. The electronic device can exit automatic execution or continue execution according to the user's needs, which can avoid automatic execution failure due to path deviation.
[0023] For example, when an application page for automatically executing tasks is displayed in a full-screen window, the electronic device receives a touch operation from the user. The touch location is on the "Payments" option. The normal processing logic after clicking the "Payments" option is to trigger the display of the payments page. In response to the user's click operation, the electronic device recognizes that the user's touch location on the "Payments" option is different from the simulated click location on the "Auto-renewal" option in the automatic task, i.e., the execution path is different. Therefore, the electronic device does not display the payments page, but instead responds according to the specific processing logic of the automatic execution, such as a pop-up prompting whether to exit the automatic task.
[0024] On the other hand, if the fifth application page is the same as the second application page, the second application page is displayed in full screen, that is, it is executed automatically without being interrupted by the user's touch screen operation.
[0025] In other words, when the user's touch screen position is detected to be the same as the simulated click position for automatically executing the task, i.e. the execution path is the same, the electronic device continues to automatically execute the task without interrupting the automatic execution. Therefore, the solution in this application improves the success rate of automatic task execution.
[0026] For example, when an application page for automatically executing tasks is displayed in a full-screen window, the electronic device receives a touch operation from the user. The touch location falls on the "Auto-renewal" option. The normal processing logic after clicking the "Auto-renewal" option is to trigger the display of the auto-renewal page. In response to the user's click operation, the electronic device recognizes that the user's touch location for the "Auto-renewal" option is the same as the simulated click location for the "Auto-renewal" option in the automatic task execution, that is, the execution path is the same, so the electronic device continues to automatically execute the task.
[0027] With the above solution, if a user touch operation is detected in full-screen mode, it can be determined whether the user touch operation will cause an automatic execution path deviation: if the user touch operation will cause an automatic execution path deviation, a pop-up window will prompt whether to exit the automatic execution task; if the user touch operation will not cause an automatic execution path deviation, no pop-up window will be displayed, and the automatic execution task will continue, thereby improving the success rate of automatic execution tasks.
[0028] In some possible implementations, before receiving the user's second operation on the first window, the method further includes: receiving a first notification from a first application while the first interface is displayed in full screen and the first window is displayed; displaying a first notification interface floating on the first interface, the first notification interface displaying a fifth control; and displaying a first application interface of the first application in response to a fourth operation by the user on the fifth control.
[0029] For example, the first notification may be an incoming call notification, an SMS notification, or an alert notification.
[0030] In some possible implementations, the first notification is an incoming call notification, the first application is a phone application, the first notification interface is an incoming call notification interface, and the fifth control includes an answer control. In this case, responding to the user's fourth operation on the fifth control and displaying the first application interface of the first application includes: responding to the user's fourth operation on the answer control, triggering the call to be connected, and updating the incoming call notification interface to a call interface; wherein, during and after the call, the first window continuously displays the first number of application pages.
[0031] With the above-described solution of this application, when the application interface for automatically executing tasks is displayed in a small window or full-screen window, if the electronic device receives a first notification, the electronic device can display the first notification and receive user operations on the first notification, and display the application interface corresponding to the first notification. None of these will affect the normal execution of the automatic task, thereby improving the success rate of automatic task execution.
[0032] In some possible implementations, the method further includes: displaying a first prompt message in response to the first instruction, the first prompt message indicating that the electronic device is in an automatic execution state. The method further includes: maintaining the display of the first prompt message in the first window in response to a first operation by the user on the first button; and maintaining the display of the first prompt message in response to a second operation.
[0033] For example, the first prompt message may be "Running automatically" or "An application is running automatically".
[0034] With the above solution of this application, when the application interface for automatically executing tasks is displayed in a small window or a full-screen window, a first prompt message can be displayed in the small window or full-screen window. The user can learn from the first prompt message that the electronic device is automatically executing tasks, thereby improving the user experience.
[0035] In some possible implementations, the method further includes: displaying a second button in response to the first instruction; displaying a second pop-up window in response to a fifth operation by the user on the second button, the second pop-up window being used to prompt whether to stop the automatic task; and stopping the automatic task in response to a sixth operation by the user confirming the stopping of the automatic task, and canceling the display of the first button, the second button, and the first number of application pages.
[0036] For example, the second pop-up window may include a continue control and a stop control. If the user clicks the continue control, the electronic device continues to perform the task automatically; if the user clicks the stop control, the electronic device stops performing the task automatically.
[0037] In some other possible implementations, in response to the user's fifth action on the second button, the electronic device may not display the second pop-up window and may directly stop automatically executing the task.
[0038] The second button can also be called the task stop button.
[0039] Using the above approach, in automated execution scenarios, electronic devices can stop automatically executing tasks based on user needs. This makes the control of automated tasks more flexible.
[0040] In some possible implementations, the method further includes: displaying a light effect pattern when the first application page or the third application page is displayed in full screen; and displaying the light effect pattern in the first window when the second application page is displayed in the first window.
[0041] Among them, the light effect pattern can be a pattern with dynamic changing effects.
[0042] The light effect pattern can be displayed at the edge of the window, so as not to affect the display effect of the first application page, the second application page, and the third application page.
[0043] The above-described solution in this application displays light effect patterns during the automatic execution of tasks, which can serve as a prompt that the electronic device is automatically performing tasks and improve the user experience.
[0044] In some possible implementations, a first number of application pages are displayed on the first layer, a light effect pattern is displayed on the second layer, and a first button is displayed on the third layer. The second layer is located above the first layer, and both layers have the same size. The third layer is located above the second layer, and its size is smaller than that of the second layer.
[0045] The first layer can be called the application layer, the second layer can be called the light effect layer, and the third layer can be called the button layer.
[0046] In some possible implementations, upon receiving the first notification, the electronic device can display a first notification interface. This first notification interface can be displayed on the fourth layer. This fourth layer can be referred to as the notification layer. The notification layer can be displayed on top.
[0047] It should be noted that in automated execution scenarios, the following layer combinations may exist: Method 1: Layer without lighting effects. Method 2: Applied layer + lighting effect layer. Method 3: Applied layer + lighting effect layer + button layer. Method 4: Applied layer + lighting effect layer + button layer + notification layer.
[0048] In some possible implementations, the method further includes: upon receiving a first input event, determining, based on window information, that the current window includes the first layer and a specific layer different from the first layer; the specific layer includes the second layer and / or the third layer.
[0049] Case 1: If the first input event is the injection event of the automatically executed task, the injection event of the automatically executed task is distributed to the first layer;
[0050] Case 2: If the first input event is a user touch event, and the current window only includes the first layer and the second layer, then the user touch event is distributed to the second layer;
[0051] Case 3: If the first input event is a user touch event, and the current window includes the first layer, the second layer, and the third layer, then the user touch event is distributed to the second layer or the third layer according to the touch position information.
[0052] For example, if a user's first action on the first button is received, the input event corresponding to the first action is distributed to the third layer.
[0053] For example, if a second operation by the user on the first window is received, the input event corresponding to the second operation is dispatched to the second layer.
[0054] For example, if a third operation by the user on the first application page is received, the input event corresponding to the third operation is distributed to the second layer.
[0055] The specific layer can be a blank layer, a light effect layer displaying a light effect pattern, or other possible layers.
[0056] This application, by adding a light effect layer, not only serves as a prompt that the electronic device is automatically performing a task, but also prevents touch events from affecting the application layer, thus achieving a "shielding" effect.
[0057] The solution described in this application enables automatic task execution in response to user commands. Furthermore, it accurately distributes and responds to various input events (such as user touch events and injected events during task execution), thereby improving the success rate of automatic task execution. During automatic task execution, touch events are blocked by a light effect layer, preventing them from reaching the application layer and thus avoiding execution path deviation. By blocking these accidental touch operations that could lead to task failure, the success rate of automatic task execution is improved, enhancing the user experience.
[0058] In some possible implementations, the step of distributing the injection event of the automatically executed task to the first layer if the first input event is the injection event of the automatically executed task includes: if the first input event is the injection event of the automatically executed task, and the current window includes the first layer and the second layer, then the injection event of the automatically executed task is distributed to the first layer.
[0059] In some possible implementations, the method further includes: determining, based on a first marker and a first parameter value, that the current window includes the second layer; and determining, based on a second marker and a second parameter value, that the first input event is an injection event for the automatically executed task.
[0060] This application embodiment can accurately identify whether a light effect layer exists in the current window by setting a mark on the light effect layer, and then determine the corresponding input event distribution strategy based on the identification result; for various input events (such as user touch events and injection events of automatic task execution) during automatic task execution, it can accurately distribute and respond to them, which can improve the success rate of automatic task execution.
[0061] This application embodiment sets a flag for the injection event of the automatically executed task, which can accurately identify the input event as the injection event of the automatically executed task, and then determine the corresponding input event distribution strategy; for various input events (such as the injection event of the automatically executed task) during the automatic execution of the task, it can accurately distribute and respond to them, which can improve the success rate of the automatic execution of the task.
[0062] In this embodiment, the system assistant application can be responsible for receiving user instructions and responding to user instructions to initiate automatically executed tasks. The system assistant application can send injection events for automatically executed tasks to the input management service.
[0063] In this embodiment, the electronic device can distribute input events through an input management service (e.g., an input event distribution module), and the input management service can obtain window information from a window management service. The window information includes layer information in the current window.
[0064] In this application embodiment, the automatic execution scenario includes the start of the automatic execution task and the end of the automatic execution task.
[0065] In some possible implementations, the method further includes: after the automatic task is completed, displaying a sixth application interface and de-displaying the light effect pattern; receiving a seventh operation from the user, the seventh operation acting on a fifth control in the sixth application interface, the fifth control being used to trigger the display of the seventh application page; and in response to the seventh operation, displaying the seventh application page.
[0066] In some possible implementations, displaying the seventh application page in response to the seventh operation includes: in response to the seventh operation, determining, based on window information, that the current window includes a first layer and that the first layer is located at the top layer; displaying the sixth application interface on the first layer; distributing the user touch event corresponding to the seventh operation to the first layer; and updating the display content of the first layer from the sixth application interface to the seventh application page.
[0067] With the above-described solution in this application, after the automatic task is completed, the user's touch screen event is processed in accordance with the conventional input event handling method.
[0068] For example, after an automated task is completed, the electronic device displays a page. The device receives a touch input from the user, and the touch location is the "Services" option on that page. The standard procedure for clicking the "Services" option is to trigger the display of the services page. In response to the user's click, the electronic device displays the services page.
[0069] The following describes the method used in this application to process input events in an automatically executed scene using a light effect layer.
[0070] On the one hand, embodiments of this application provide a technical solution for automatically executing tasks, which can automatically execute tasks in response to user input commands and display an interface when automatically executing tasks. Specifically, embodiments of this application inject automatically executed tasks into a target application, triggering the target application to display an interface for automatically executing tasks based on the application layer.
[0071] On the other hand, based on the automatic task execution technical solution, this application provides a technical solution to add a light effect layer on the application layer, which enables user touch events to act on the light effect layer instead of the application layer during the automatic task execution process. Therefore, the light effect layer can play a "shielding" role.
[0072] The aforementioned user touch events and automated task injection events are both input events for electronic devices. Electronic devices need to distribute these input events to different applications, which then respond to them. For example, an automated task injection event might be distributed to a target application, which responds by displaying the automated task's interface on its application layer. Alternatively, an electronic device might distribute a user touch event to a system assistant application, which responds based on a lighting effect layer.
[0073] This application embodiment sets a unique identifier for the light effect layer. For example, a light effect layer can be uniquely represented by a first identifier name and a first parameter value. When the system assistant application creates and draws the light effect layer, the system assistant application can add a first identifier name and a first parameter value to the light effect layer. After the automatic task is started, the Window Management Service (WMS) will display the light effect layer, which carries the first identifier name and the first parameter value.
[0074] This application embodiment sets a unique identifier for the injection event of the automated task. For example, the injection event of the automated task can be uniquely represented by a second identifier name and a second parameter value. When the system assistant application requests the injection of the automated task, the system assistant application can add a second identifier name and a second parameter value to the injection event of the automated task.
[0075] This application embodiment enables more accurate distribution logic for input events by setting markers for the light effect layer and the injected events for automatically executed tasks.
[0076] With these two markers set, the input event dispatch module can obtain window information from the Window Management Service (WMS). If it is determined from the window information that a light effect layer (i.e., a layer with the first marker) currently exists, the input event dispatch module executes the following dispatch logic:
[0077] If the light effect layer is at the top, then the input events (user touch events) reported from the hardware device (touchscreen) will be distributed to the light effect layer, and the response will be to prompt "Do you want to exit auto-execution?" in a pop-up window on the light effect layer; and the injection events of auto-execution tasks received from the system assistant application will be distributed to the application layer (the application layer is located below the light effect layer).
[0078] If the light effect layer is not at the top layer or does not exist, the system's original input event dispatch logic will be followed. The original input event dispatch logic of the Android system is: touch events are dispatched by default to the topmost control of the topmost interface.
[0079] The improved solution provided in this application's embodiments uses a light effect layer to block touch events, preventing them from reaching the application layer. This avoids touch events affecting the application layer and thus prevents execution path offset. By blocking these accidental touch operations that could lead to task failure, the success rate of automatic task execution can be improved.
[0080] This application adds a light effect layer, which not only serves to indicate that a task is currently being automatically executed, but also acts as a "shield" when the user touches the screen. Specifically, during the automatic execution of a task, the light effect layer is placed above the application layer. When the electronic device detects a touch event, the touch event is directed to the light effect layer instead of the application layer. Therefore, the application layer can execute the task according to its original automatic execution path without being deviated from the path due to the touch.
[0081] Secondly, this application provides an input event processing apparatus for automatically executing a scenario. This apparatus includes units for executing the method described in the first aspect above. The apparatus can correspond to executing the method described in the first aspect above. For a detailed description of the units within the apparatus, please refer to the description in the first aspect above; for brevity, it will not be repeated here.
[0082] The method described in the first aspect above can be implemented in hardware or by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above functions. For example, a processing module or unit, a display module or unit, etc.
[0083] Thirdly, this application provides an electronic device, which includes a processor, a computer program or instructions stored in a memory, wherein the processor is used to execute the computer program or instructions to cause the method in the first aspect to be performed.
[0084] Fourthly, this application provides a computer-readable storage medium having a computer program (also referred to as instructions or code) stored thereon for implementing the method of the first aspect. For example, when the computer program is executed by a computer, it enables the computer to perform the method of the first aspect.
[0085] Fifthly, this application provides a chip including a processor. The processor is used to read and execute a computer program stored in a memory to perform the methods in the first aspect and any possible implementation thereof. Optionally, the chip further includes a memory connected to the processor via a circuit or wire.
[0086] Sixthly, this application provides a chip system including a processor. The processor is used to read and execute a computer program stored in a memory to perform the methods in the first aspect and any possible implementation thereof. Optionally, the chip system further includes a memory connected to the processor via a circuit or wire.
[0087] In a seventh aspect, this application provides a computer program product comprising a computer program (also referred to as instructions or code), which, when executed by an electronic device, causes the electronic device to implement the method in the first aspect.
[0088] It is understood that the beneficial effects of the second to seventh aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here. Attached Figure Description
[0089] Figure 1A A schematic diagram of the interface for users to manually check automatic renewal through electronic devices;
[0090] Figure 1B This is a diagram illustrating the touchscreen event handling process when querying automatic renewal.
[0091] Figure 2 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;
[0092] Figure 3A A schematic diagram of the interactive interface for the automatic execution scenario provided in this application embodiment;
[0093] Figure 3B A schematic diagram of the interactive interface for the automatic execution scenario provided in the embodiments of this application. Figure 2 ;
[0094] Figure 4 A schematic diagram illustrating an improvement to the input event processing method for an automated execution scenario provided in this application embodiment;
[0095] Figure 5An illustration of an improvement to the input event handling method for automated execution scenarios provided in the embodiments of this application. Figure 2 ;
[0096] Figure 6 A schematic diagram of the hardware and software architecture of the input event processing method for an automated execution scenario provided in the embodiments of this application;
[0097] Figure 7 A flowchart illustrating the input event processing method for an automated execution scenario provided in the first embodiment of this application;
[0098] Figure 8 A schematic diagram illustrating various layer configurations for an automated execution scenario provided in this application embodiment;
[0099] Figure 9 A schematic diagram illustrating touch events occurring under various layer conditions in the automatic execution scenario provided in the embodiments of this application;
[0100] Figure 10 A flowchart illustrating the input event processing method for an automated execution scenario provided in the second embodiment of this application;
[0101] Figure 11 A flowchart illustrating the input event processing method for an automated execution scenario provided in the second embodiment of this application. Figure 2 ;
[0102] Figure 12 A schematic diagram of the interface for the input event processing method for an automated execution scenario provided in the second embodiment of this application;
[0103] Figure 13 A schematic diagram of the interface for the input event handling method for the automatic execution scenario provided in the second embodiment of this application. Figure 2 ;
[0104] Figure 14 A schematic diagram of the interface for the input event handling method for the automatic execution scenario provided in the second embodiment of this application;
[0105] Figure 15 A schematic diagram of the interface for the input event handling method for the automatic execution scenario provided in the second embodiment of this application. Figure 4 ;
[0106] Figure 16 A schematic diagram of the interface for the input event handling method for the automatic execution scenario provided in the second embodiment of this application. Figure 5 ;
[0107] Figures 17 to 19 This is a schematic diagram illustrating the application scenario of the input event processing method for the automatic execution scenario provided in the embodiments of this application. Detailed Implementation
[0108] The embodiments of this application will be further described in detail below with reference to specific examples and the accompanying drawings.
[0109] In the following embodiments of this application, the term UI refers to the medium interface through which an application or operating system interacts and exchanges information with the user. It realizes the conversion between the internal form of information and the form that the user can accept. The user interface is source code written in a specific computer language such as Java or Extensible Markup Language (XML). The interface source code is parsed and rendered on the electronic device, ultimately presenting content that the user can recognize. A common form of user interface is the graphical user interface (GUI), which refers to a user interface related to computer operation displayed graphically. It can be visible interface elements such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets displayed on the screen of an electronic device.
[0110] In daily use of smartphones, users often need to frequently perform a series of operations to complete certain specific tasks, such as ordering takeout, checking automatic renewal, sending files, or other possible tasks.
[0111] Figure 1A This is a diagram illustrating the interface for users to manually check auto-renewal via electronic devices. (Example) Figure 1A As shown, taking a user manually checking auto-renewal status via an electronic device as an example, in response to the user's operation, the electronic device displays an interface 10 of the application, which displays service options 11. It should be noted that the content displayed on each interface of the application is carried out within an application layer. If the electronic device receives a click on service option 11 from the user, it applies the click event (or touch event) to the application layer, triggering a jump to service page 12, which displays the "Auto-Renewal" option 13. Then, if the electronic device receives a click on "Auto-Renewal" option 13 from the user, it applies the click event to the application layer, triggering a jump to auto-renewal page 14. This allows users to manually check the auto-renewal status of applications such as video apps and game apps.
[0112] Figure 1B This is a diagram illustrating the current system's existing touchscreen event handling process. (For example...) Figure 1BAs shown, the touch event distribution process includes: 1) The touch sensor detects a touch event and reports it to the TP driver, which then reports it to the input event reading module. 2) The input event reading module reports the touch event to the input event distribution module. 3) The input event distribution module obtains window information from the Window Management Service (WMS), which indicates the application layer. 4) The input event distribution module distributes the touch event to the application layer based on the window information, causing the touch event to act on the application layer and trigger a jump from the current page to another page.
[0113] It is evident that manually performing each step of these tasks is not only inconvenient but also prone to errors. In some cases, the operation paths are too complex, making it difficult for users to find the information and complete the operation smoothly, thus affecting the user experience.
[0114] To address the aforementioned problems, this application provides a technical solution for automatically executing tasks based on user needs. The user only needs to input an instruction, and the electronic device can respond by launching the target application and automatically executing tasks based on that application. These automatically executed tasks are completed sequentially according to an automatic execution path. After completion, the electronic device can display the task execution results.
[0115] For example, the automatic execution path includes application interface 1, application interface 2, etc. After the automatic execution task starts, the target application will display application interface 1 and simulate click / swipe / input operations on application interface 1, triggering a jump to application interface 2, and continuing to simulate click / swipe / input operations on application interface 2. In this way, the task is completed according to the automatic execution path.
[0116] In practical applications, many business operations provided by electronic devices involve numerous steps, complex operation paths, or a large amount of specific information that requires repeated manual input. The technical solution for automatically executing tasks provided in this application can improve these problems and provide great convenience to users.
[0117] It's important to note that during automated task execution, users may accidentally touch or actively tap the screen. The electronic device will respond to these touch events. However, if the current system's existing touch event handling strategy is followed, the touch event will affect the application interface. The touch response might redirect from the current application interface to another. If the touch response is inconsistent with the automated execution path, it will cause the path to deviate, leading to task failure.
[0118] Accordingly, embodiments of this application provide an input event processing method and electronic device for automatically executing scenarios. This method automatically executes tasks in response to user commands and can switch between full-screen and small-window displays of the application page for automatically executing tasks. For various input events (such as user touch events) during automatic task execution, it can respond according to specific processing logic for automatic execution. For example, upon detecting a user touch operation on the small window, it switches to a full-screen window, and regardless of where the touch is applied within the small window, the application page for automatically executing tasks will continue to be displayed. By blocking various accidental touch operations that may lead to task failure and preventing deviations in the automatic execution path caused by user touch operations, the success rate of automatically executing tasks can be improved, thus enhancing the user experience.
[0119] For automated execution scenarios, this application adds a specific layer to the existing application interface (also known as the application layer) and provides an input event handling strategy based on this specific layer. During automated task execution, this specific layer acts as a "shield," preventing touch events from affecting the application interface. This avoids path deviations caused by accidental screen touches during automated task execution, thus improving the success rate of automated task execution. The specific input event handling strategy will be described in detail below through embodiments.
[0120] In some implementations, a specific layer can be a blank layer, or a layer displaying a light effect pattern. For ease of explanation, the layer displaying the light effect pattern in this application is referred to as the light effect layer. The light effect layer not only serves as a "shielding" function, preventing touch events from affecting the application interface, but also serves as a "status indicator," that is, indicating through the light effect pattern that the current electronic device is in a state of automatically executing tasks.
[0121] The following description, in conjunction with the accompanying drawings, describes the electronic device to which the input event processing method for automatically executing scenarios provided in this application is applied. For example, the electronic device in this application embodiment may be a mobile phone, tablet computer, ultra-mobile personal computer (UMPC), netbook, as well as a cellular phone, personal digital assistant (PDA), wearable device (such as a smartwatch, smart bracelet), or other device with voice wake-up functionality. This application embodiment does not impose any special limitations on the specific form of the electronic device.
[0122] In some examples, users can input commands via their mobile phones to trigger the phones to automatically perform tasks.
[0123] In other examples, users can quickly issue commands through wearable devices and forward them to their mobile phones, which then automatically execute the tasks. The mobile phones then return the task completion results to the wearable devices, which display the results.
[0124] Figure 2 This illustration shows a hardware structure diagram of an electronic device according to an embodiment of this application. For example, a mobile phone is used as an example. Figure 2 As shown, the electronic device 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, antenna 1, antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver (i.e., earpiece) 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 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 aforementioned sensor module may include a touch sensor.
[0125] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, memory, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). Different processing units may be independent devices or integrated into one or more processors. The controller may be the nerve center and command center of the electronic device. The controller can generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution.
[0126] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0127] In this embodiment of the application, the electronic device can implement the method provided in this embodiment of the application through the processor 110.
[0128] The display screen 194 is used to display images, videos, etc. The display screen 194 may include a touch screen and a touch sensor.
[0129] In this embodiment, when the touch sensor detects a touch operation on the touchscreen, the touch sensor sends the touchscreen data to the processor 110. The touchscreen data may include touch duration and touch position parameters.
[0130] It is understood that the interface connection relationships between the modules illustrated in this embodiment are merely illustrative and do not constitute a structural limitation on the electronic device. In other embodiments, the electronic device may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0131] The above is a detailed description of the embodiments of this application using electronic device 100 as an example. It should be understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on electronic device 100. Electronic device 100 may have more or fewer components than shown in the figures, may combine two or more components, or may have different component configurations. The various components shown in the figures can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.
[0132] The implementation process of the automatic execution scenario provided in the embodiments of this application will be introduced below.
[0133] Implementation process of automated execution scenarios
[0134] The input event processing method for automatic execution scenarios provided in this application embodiment can be applied to various automatic execution scenarios. For example, the automatic execution scenario may be a scenario that responds to a user request to automatically query application renewal, or a scenario that responds to a user request to automatically send a file, or a scenario that responds to a user request to automatically disable application permissions, or a scenario that responds to a user request to automatically optimize overall machine performance, or a scenario that responds to a user request to automatically disable application notifications, or a scenario that responds to a user request to automatically order takeout, etc., which will not be elaborated further here.
[0135] Specifically, when a user wants to automatically perform a task through an electronic device, the user can wake up the electronic device's intelligent assistance application (or system assistant application or system assistant) and input the command. After receiving the user's command, the electronic device can recognize the user's intent, determine the automatic execution scenario, and then automatically execute the task.
[0136] Users can activate the system assistant application by pressing and holding the power button until it is activated, or by saying "Hello, YOYO" to their phone. This application does not limit the method of activating the system assistant application.
[0137] User commands can be input via voice or via text.
[0138] For example, taking the automatic execution scenario of checking application renewal as an example, when a user wants to check the application renewal status through an electronic device, the user can wake up the system assistant application and enter the command "Please help me check which applications are automatically deducting fees", or "Please help me check if application / service XX is automatically deducting fees", or "Please help me turn off all automatic deduction services", or "Please help me turn off the automatic deduction service of application / service XX". After receiving the user's command, the electronic device can perform intent recognition based on the user's command and determine that the automatic execution scenario is "checking renewal". Then, the system assistant application uses the task operation sequence (i.e., automatic execution path) corresponding to the "checking renewal" scenario to automatically execute the "checking renewal" task.
[0139] Table 1 schematically illustrates the task operation sequence corresponding to the "query renewal scenario". For example, the task operation sequence includes page navigation information, target controls on each page, and the UI tasks corresponding to each page, including whether user interaction is required.
[0140] Table 1
[0141]
[0142] Electronic devices can automatically execute the "renewal query" task according to the above task operation sequence and display the renewal query results.
[0143] The following diagram, with reference to the accompanying illustrations, illustrates the interface diagram for an automatic application renewal query scenario. Figure 3AAs shown in (a) to (b), when the user activates the system assistant application, the electronic device displays a dialog interface 20, which displays the interaction content between the user and the system assistant application. The system assistant application receives the user's instruction, "Help me check which application is automatically deducting fees." In response to the user's instruction, the system assistant application replies, "Okay, now redirect to..." Find all apps' auto-renewal settings. Then, as... Figure 3A As shown in (c) to (e), the electronic device jumps to The application interface 21 navigates to the next page following the task sequence, ultimately redirecting to the automatic renewal page 28, where users can check their automatic renewal status. Figure 3A As shown in (f), once the automatic task is completed, the electronic device acquires and displays the application's automatic renewal information 29 for the user to view.
[0144] Among them, such as Figure 3A As shown in (c), when automatically executing a task, the electronic device can display a simulated click cursor (as shown in circle 23) at the service option 22 in the application interface 21, demonstrating the simulated click operation during the automatic execution process. The display of the simulated click cursor at service option 22 indicates that the electronic device automatically clicks service option 22, which can trigger the electronic device to jump to the service page corresponding to service option 22. In this embodiment, the display size, display format, and display color of the cursor are not limited; they can be determined according to actual usage requirements.
[0145] Furthermore, when automating tasks, electronic devices can simulate not only clicks but also input and swipes within the application interface. By simulating actions on the application interface and automatically navigating to the next screen, each step of the automated task becomes highly intuitive, enhancing the user experience.
[0146] It should be noted that the embodiments of this application can use RPA (robotic process automation) technology to automatically simulate clicks and jump to pages, thereby achieving the purpose of automatically executing tasks.
[0147] Among them, such as Figure 3A As shown in (c) to (e), when automatically performing tasks, the electronic device in Light effects patterns can be overlaid on the application interface (as shown by the shadow 24 on the border) to indicate to the user that the electronic device is in a state of automatic task execution. Figure 3A As shown in (f), the electronic device does not display a light effect pattern after the automatic task is completed.
[0148] refer to Figure 3A As shown in (c), when the task is executed automatically, the electronic device can display an automatic execution progress box 25, a task stop button 26, and a window minimize button 27 in the application interface 21. The automatic execution progress box 25 is used to display automatic execution progress information and update it in real time. The task stop button 26 is used to trigger the stopping of the automatic execution task. The window minimize button 27 is used to trigger the switching from a full-screen window to a small window.
[0149] This solution enables the automatic execution of a series of preset tasks based on user intent. Furthermore, it can handle complex operation sequences, ensuring the automated execution process is completed smoothly according to user needs, thus saving users significant time and effort.
[0150] During the automatic execution of tasks, electronic devices can receive user input. It should be noted that different input operations will have different effects or impacts on the automatic execution of tasks. This application illustrates this through the following two scenarios.
[0151] User input scenario 1:
[0152] During the automatic execution of a task, the electronic device receives user input, such as clicking a task stop button or a window minimize button. In response to the user's click of the task stop button, the electronic device can stop the automatic execution of the task. In response to the user's click of the window minimize button, the electronic device switches the window from full-screen to a smaller window.
[0153] The following describes possible implementation methods for window switching in the automatic execution scenario of this application embodiment.
[0154] In this embodiment, when automatically executing a task, the electronic device can display the application interface for automatically executing the task in a full-screen window or a small window, depending on the user's needs. Furthermore, the electronic device can switch between full-screen and small window modes as needed.
[0155] In some embodiments, when an electronic device begins to automatically perform a task, the application interface for the automatically performing task is displayed in full-screen window by default, with light effect patterns displayed on the border of the full-screen window and a zoom-out button displayed within the full-screen window. Figure 3B As shown in (a), the electronic device is automatically performing a task and is in full-screen mode. If the electronic device receives a click operation from the user on the window minimization button 27 in the full-screen window 30, then the electronic device can switch the window that is automatically performing the task from the full-screen window 30 to the minimization window 27. Figure 3BThe small window 31 shown in (b) is an example. The electronic device displays a light effect pattern at the border of the small window 31, but no buttons are displayed inside the small window 31.
[0156] In some embodiments, the small window can be set to a locked state, for example, its position and / or size can be kept unchanged, and the content displayed in the small window will change as the automatic execution progresses. The small window display can also be referred to as a floating window display. Figure 3B As shown in (b) and (c), when automatically performing a task, in the small window state, if the electronic device receives a click operation from the user on any area of the small window 31, the electronic device can switch the window for automatically performing the task from the small window 31 to the full-screen window 30.
[0157] In addition to responding to user input and switching between full-screen and small windows, electronic devices can also automatically switch from full-screen to small windows when an immersive scene is detected, continuing to display the interface for automatically executing tasks within the small window. An immersive scene can be defined as one where the current system's status bar and navigation bar are automatically hidden.
[0158] For example, in this embodiment of the application, when the electronic device is executing an automatic query process and displaying the automatic execution page in full screen, if the electronic device plays a video or displays a game screen and the status bar and navigation bar are automatically hidden, the electronic device will determine whether the current user scenario is an immersive scenario. In an immersive scenario, the electronic device will switch the automatic execution page from full-screen window display to small window display to ensure that the immersive state is not disturbed.
[0159] User input scenario 2:
[0160] If the user clicks any button other than the task stop button and the window minimize button during the automatic execution of a task, the automatic execution of the task may fail.
[0161] The following explains why some user touch screen operations in automatic execution scenarios may cause automatic execution tasks to fail, and describes the improvement scheme provided by the embodiments of this application, and provides a more effective touch screen event handling strategy for automatic execution scenarios.
[0162] Figure 4 This is a schematic diagram illustrating the improvement of the input event handling method for the automatic execution scenario provided in the embodiments of this application from the perspective of the interface.
[0163] First, it's important to clarify that the main reason automatic task execution fails after a user click is that the execution path is inconsistent, i.e., the execution path deviates. Specifically, if the page redirected to after a user clicks is different from the page redirected according to the automatic execution path, this deviation will cause the automatic task execution to fail.
[0164] If the system's existing touchscreen event handling strategy is applied to automated scenarios, an execution path deviation will occur, leading to execution failure. For example, ... Figure 4 As shown in (a), when the task is executed automatically through the application layer, the system will simulate clicking the service option 32 on the current page to jump to the service page according to the automatic execution path. If the electronic device detects that the user clicks the favorite option 33 on the current page, then according to the original touch event handling strategy of the system, the touch event will be applied to the application layer 34 and processed by the application layer 34. Therefore, the system will jump from the current page to the favorite page 35, causing the execution path to deviate, thus resulting in the failure of automatic execution.
[0165] It's important to note that if the page redirected after a user clicks is the same as the page redirected according to the automatic execution path—meaning the execution path remains unchanged after the user clicks—then the automatic task execution will not fail. For example, if an electronic device automatically clicks service option 32 during automatic task execution, and the user clicks service option 32 at this time, the user's click will not cause the automatic task execution to fail.
[0166] The problem this application aims to solve is how to filter out accidental touch operations that may cause task failure during task execution, thereby improving the success rate of automatic task execution.
[0167] Figure 4 (b) represents the improved solution of this application. When a touch event occurs during automatic task execution, this improved solution controls the touch event to not act on the application layer, thereby preventing automatic execution path deviation. For example, when automatically executing a task through an application layer, the system will simulate clicking the service option 32 on the current page to jump to the service page, according to the automatic execution path. If the electronic device detects that the user clicks the favorite option 33 on the current page, then according to the touch event handling strategy provided in this application, the touch event will not act on the application layer 34, but on a specific layer other than the application layer 34, such as the aforementioned light effect layer 36. In this case, the specific layer completes the touch response, for example, displaying a pop-up window 37 on the specific layer. The pop-up window 37 displays the prompt message "Exit automatic execution?" and "Continue execution" and "Exit" buttons, thus preventing automatic execution path deviation.
[0168] Figure 5 This is a schematic diagram illustrating the improvement of the input event handling method for the automatic execution scenario provided in the embodiments of this application from the perspective of module interaction. Through... Figure 5 This allows for a better understanding of why user touchscreen operations may cause automated task failures in automated execution scenarios, and also a better understanding of the improvements in this application. In the embodiments of this application, input events in automated execution scenarios include injection events for automated task execution and user touchscreen events.
[0169] Figure 5 The event handling flow is shown using the system's original input event distribution logic. Steps 1-1, 1-2, and 1-3 are the handling flow for injected events of automatically executed tasks, and steps 2-1, 2-2, 2-3, and 2-4 are the handling flow for user touch screen events.
[0170] It should be noted that Android's original input event dispatch logic distributes touch events by default to the topmost control of the topmost interface. However, the existing solution only has an application layer, and touch events can only affect the application layer. Therefore, this logic cannot currently meet the goal of blocking user touch events in scenarios involving automated task execution. Therefore, this application has redesigned and customized the logic, adding logic for intercepting / blocking touch events.
[0171] like Figure 5 As shown, the improved solution provided in this application includes: adding a specific layer and providing an input event processing strategy based on the specific layer. The specific layer includes components for implementing the aforementioned... Figure 3A The light effect pattern shown can be a light effect layer, a blank layer, or other possible layers. For ease of explanation, this application embodiment uses an added specific layer as a light effect layer as an example for illustrative purposes.
[0172] First, let's explain the injection process for automated tasks. 1-1' The System Assistant App requests the injection of an automated task from the Input Event Distribution Module; 1-2' The Input Event Distribution Module obtains window information from the WMS side; 1-3' If the Input Event Distribution Module determines that the current window includes an application layer and a light effect layer based on the window information, then the Input Event Distribution Module can distribute the injection event of the automated task to the application layer, so that the injection event of the automated task acts on the application layer. That is, the electronic device will display the automated execution process through the application layer, such as page navigation, displaying the cursor corresponding to simulated click / input / swipe operations, etc.
[0173] The touch event handling strategy based on the light effect layer is further explained as follows: 2-1' During automatic task execution, the TP driver reports touch events to the input event reading module. 2-2' The input event reading module reports touch events to the input event distribution module. 2-3' The input event distribution module obtains window information from the WMS, which indicates the existence of a light effect layer. 2-4' The input event distribution module distributes touch events to the light effect layer according to the window information, so that the touch events act on the light effect layer.
[0174] The improved solution provided in this application's embodiments uses a light effect layer to block touch events, preventing them from reaching the application layer. This avoids touch events affecting the application layer and thus prevents execution path offset. By blocking these accidental touch operations that could lead to task failure, the success rate of automatic task execution can be improved.
[0175] Figure 6 The diagram below illustrates the hardware and software architecture of the input event processing method for the automated execution scenario provided in the embodiments of this application. For example... Figure 6 As shown, the hardware and software architecture includes hardware devices and software systems. The software system can be any one or more computer operating systems that implement business processing through processes, such as Linux, Unix, Android, iOS, or Windows. Applications can be installed and run on the operating system.
[0176] Operating systems for electronic devices can adopt layered architectures, event-driven architectures, microkernel architectures, microservice architectures, or cloud architectures. This application uses the layered architecture of the Android system as an example to exemplify the software system of an electronic device. A layered architecture divides the software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. For example, an operating system from top to bottom includes an application layer, an application framework layer, and a kernel layer.
[0177] The application layer includes a series of application packages. For example, the application layer includes, but is not limited to, [the following]. Apps include system assistant apps, phone and SMS apps, etc. The application framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer. The application framework layer includes some predefined functions. The kernel layer can provide input driver interfaces. For example, the kernel layer includes touch panel (TP) drivers. The hardware layer can include touch-enabled displays (often simply called touchscreens).
[0178] In this embodiment of the application, the application framework layer may include a UI framework layer, a window management service (WMS), an input management service (IMS), and a device access node, etc. This embodiment of the application does not impose any limitations on this.
[0179] The UI framework layer includes a view system, which comprises various visual controls, such as controls for displaying text and controls for displaying images. The view system can be used to build applications. The display interface can consist of one or more views. For example, in this embodiment, the view system can be used to display dynamic light effect prompts in the auto-execution window to indicate that the current page is a window for auto-execution tasks. The view system can also be used to display prompt information in the auto-execution window to indicate the specific actions or steps of the UI task being executed on the current page. The view system can also be used to display a window minimize button in the auto-execution window to trigger a switch from full-screen mode to small window mode. The view system can also be used to display a task stop button in the auto-execution window to trigger a stop to the execution of the UI task.
[0180] A Window Management Service (WMS) is used to manage window information for automatically executed tasks. In this embodiment, the WMS can provide window information indicating the current window's size and layer information. The electronic device can determine whether the window for automatically executing a task is a full-screen window or a small window based on the window information, and can also determine which layers exist and their hierarchical relationships.
[0181] In this embodiment, when automatically executing tasks, the window includes an application layer and a light effect layer. When the electronic device is in full-screen mode, the window also includes a button layer; when the electronic device receives a notification, the window also includes a notification layer. The display priority of each layer, from highest to lowest, is: notification layer, button layer, light effect layer, and application layer. That is, the notification layer is at the top layer, and the application layer is at the bottom layer.
[0182] This application embodiment can associate a light effect layer with a first marker and a first parameter value. The electronic device can determine whether a light effect layer exists in the current window based on the window information. If the electronic device recognizes that the window information includes the first marker and the first parameter value, then the electronic device can determine that a light effect layer exists in the current window.
[0183] The Input Management Service (IMS) manages input events and distributes them to the corresponding layers. The IMS includes the EventHub, the InputReader module, and the InputDispatcher module.
[0184] EventHub, the event management hub, provides functionality for subscribing to, unsubscribing from, and triggering events, primarily facilitating communication between different components. Internally, EventHub uses a key-value data structure to store event subscription information. When an event receiver subscribes to an event, EventHub stores the event name as the key and the callback function as the value. When an event sender sends an event, EventHub locates the corresponding callback function based on the event name and invokes it to complete the event notification.
[0185] In this embodiment, input events may include virtual events that simulate user operations. For example, virtual events that simulate user operations include virtual click events, virtual swipe events, and virtual input events.
[0186] In this embodiment, the input event may further include user touch events. For example, user touch events include user click events, user swipe events, and user input events.
[0187] Device access nodes are used to manage user touch events such as layer clicks during automated task execution. Device access nodes can report user touch events to the Input Management Service (IMS), which then distributes the user touch events to the corresponding layers.
[0188] In this embodiment of the application, the input event may also include an injection event for automatically executing a task, that is, injecting the automatically executing task into the target application, and the target application displays the application interface corresponding to the automatically executing task based on the application layer.
[0189] Furthermore, in this embodiment, the application framework layer may also include a virtual event handler and a notification manager.
[0190] A virtual event handler is used to simulate user click / input / swipe operations, triggering virtual click / input / swipe events. In this embodiment, by simulating virtual click / input / swipe events, tasks can be executed automatically.
[0191] The notification manager is used to manage notification messages, such as incoming call notifications, SMS notifications, application message notifications, or alert notifications that may be received when automatically performing tasks.
[0192] The input event handling method for automatically executed scenarios provided in this application embodiment may include the following two parts:
[0193] Injection of automated task execution
[0194] The following explains how the System Assistant App automatically injects tasks into the target App. (Reference) Figure 6 When a user wakes up the system assistant app and enters a command, the system assistant app can determine an auto-execution task based on the user's command and send the injection event of the auto-execution task to the input event distribution module to request that the auto-execution task be injected into the target application. Then, the input event distribution module distributes the injection event of the auto-execution task to the application layer, and the application layer reports the injection event of the auto-execution task to the target app (e.g., through the view system). (App). After injecting the automatic execution task into the target App, the target App can trigger page jumps and locate the target control on each page and simulate click / input / swipe operations according to the task operation sequence corresponding to the automatic execution task, so as to achieve the purpose of automatic task execution.
[0195] Reporting and distribution of user touch events
[0196] refer to Figure 6 When a touch event occurs on the touchscreen, the hardware device layer reports the event to the kernel layer of the software system. The kernel layer then reports the event to the device access node via the TP driver. Upon receiving the touch event, the device access node reports it to the event management center, which in turn reports it to the input event reading module. The input event reading module then reports it to the input event distribution module. The input event distribution module determines the touch event handling strategy based on window information and touchscreen position information. The specific touch event handling strategy will be described in detail below.
[0197] The input event handling method for automated execution scenarios provided in this application embodiment allows touch events to act on the light effect layer, or in some cases on the button layer, and in others on the notification layer during automated task execution. By shielding the application layer with the light effect layer, touch events are prevented from acting on the application layer, avoiding deviations in the automated execution path and thus improving the success rate of automated task execution.
[0198] It should be noted that although the embodiments of this application are described using the Android system as an example, the basic principles are also applicable to electronic devices based on operating systems such as iOS or Windows.
[0199] The execution subject of the input event processing method for automatically executing scenarios provided in this application embodiment can be the aforementioned electronic device, or it can be a functional module and / or functional entity within the electronic device capable of implementing the input event processing method for automatically executing scenarios. Furthermore, the solution of this application can be implemented through hardware and / or software, and the specific implementation can be determined according to actual usage requirements; this application embodiment does not impose any limitations. The following description uses an electronic device as an example, combined with the accompanying drawings, to exemplarily illustrate the input event processing method for automatically executing scenarios provided in this application embodiment.
[0200] The embodiments of this application will be described below with reference to the accompanying drawings and through several exemplary embodiments. The methods in the following embodiments can all be implemented in an electronic device having the above-described hardware structure and software architecture. The hardware structure diagram of the electronic device can be as follows: Figure 2 As shown, the software system block diagram of an electronic device can be as follows: Figure 6 As shown, the embodiments of this application are not limited to this. For ease of explanation, the electronic device used in the embodiments of this application is a mobile phone.
[0201] First, it should be noted that, on the one hand, the embodiments of this application provide a technical solution for automatically executing tasks, which can automatically execute tasks in response to user input commands and display the interface when the task is automatically executed. Specifically, the embodiments of this application inject the automatic task into the target application, triggering the target application to display the interface for automatically executing the task based on the application layer.
[0202] On the other hand, based on the automatic task execution technical solution, this application provides a technical solution of adding a light effect layer on the application layer. This not only allows the display of light effect patterns through the light effect layer to indicate the status of automatically executing a task, but also allows user touch events to act on the light effect layer during the automatic task execution process, instead of the application layer. Therefore, the light effect layer can play the role of "status prompt" and "shielding".
[0203] The user touch events and the injected events for automatically executed tasks mentioned above are both input events for electronic devices. Electronic devices need to distribute these input events to different applications. For example, an injected event for an automatically executed task is distributed to a target app, which responds to the injected event by displaying the corresponding application interface for the automatically executed task on the application layer. As another example, the electronic device distributes user touch events to a system assistant app, which can respond to the touch event based on a lighting effect layer.
[0204] This application embodiment sets a unique identifier for the light effect layer. For example, a light effect layer can be uniquely represented by a first identifier name and a first parameter value. When the system assistant app creates and draws the light effect layer, the system assistant app can add a first identifier name and a first parameter value to the light effect layer. After the automatic task is started, WMS will display the light effect layer, which carries the first identifier name and the first parameter value.
[0205] This application embodiment sets a unique identifier for the injection event of the automated task. For example, the injection event of the automated task can be uniquely represented by a second identifier name and a second parameter value. When the system assistant app requests the injection of an automated task, the system assistant app can add a second identifier name and a second parameter value to the injection event of the automated task.
[0206] This application embodiment enables more accurate distribution logic for input events by setting markers for the light effect layer and the injected events for automatically executed tasks.
[0207] With these two markers set, the input event dispatch module can obtain window information from the window-side WMS. If it is determined from the window information that a light effect layer (i.e., a layer with the first marker) currently exists, the input event dispatch module executes the following dispatch logic:
[0208] If the light effect layer is at the top, then the input events reported from the hardware device (touchscreen) (i.e., user touch events) will be distributed to the light effect layer, and the response will be to prompt "Do you want to exit automatic execution?" in a pop-up window on the light effect layer; and the input events received from the system assistant app (i.e., injection events for automatic execution tasks) will be distributed to the application layer, which is located below the light effect layer.
[0209] If the light effect layer is not at the top layer or does not exist, the system's original input event dispatch logic will be followed. The original input event dispatch logic of the Android system is: touch events are dispatched by default to the topmost control of the topmost interface.
[0210] This solution not only effectively blocks accidental user touches, but also prompts users via pop-up windows whether they want to disable automatic task execution, ensuring a high success rate for tasks within the execution scope.
[0211] The following describes the input event processing method for the automatic execution scenario provided in this application embodiment with reference to specific embodiments.
[0212] First Embodiment
[0213] Figure 7This is a schematic diagram of the module interaction flow of the input event handling method for an automated execution scenario provided in the embodiments of this application. The following is a breakdown of the process. Figure 7 This section explains the attachment of light effect layers, the injection of automatic tasks, and the handling of user touch screen events.
[0214] Attachment of light effect layers
[0215] S301, The System Assistant App starts automatically to perform tasks, creating and drawing light effect layers.
[0216] This application can display dynamic light effect patterns through the light effect layer, and can also complete touch screen response through the light effect layer. Therefore, the light effect layer can play a "shielding" role.
[0217] It should also be noted that the light effect layer can be defined by other names, and this application embodiment does not limit this.
[0218] S302, The System Assistant App attaches the light effect layer to the automatically executed task.
[0219] S303, the System Assistant App sends the first marker and first parameter value of the light effect layer to WMS.
[0220] For example, when the System Assistant App creates and draws the light effect layer, the System Assistant App can add a first marker to the light effect layer. The marker name can be "PRIVATE_FLAG_PASS_MAGIC_ACTION_VIRTUAL_EVENTS", and the parameter value (i.e. the first parameter value) can be set to 0x00010000.
[0221] S304. After the automatic task is started, WMS overlays a light effect layer on the application layer and stores the first marker and the first parameter value.
[0222] Referring to the above Figure 3A In sections (c) to (e), after the automatic task is started, the window displays application layer 21 and light effect layer 24. (Refer to the preceding text.) Figure 4 In (b) of the example, during the automatic task execution, the window displays application layer 35 and light effect layer 36. (Refer to the previous section.) Figure 5 In the improved solution, WMS can provide window information to the input event dispatch module, which indicates that the current window has an application layer and a light effect layer.
[0223] Injection of automated task execution
[0224] S305, The System Assistant App sends a request injection message to the input event distribution module of IMS. The request injection message is used to request that the automatic execution task be injected into the target application. The request message carries a second flag and a second parameter value.
[0225] The injection event that automatically executes the task can be uniquely represented by the second flag and the second parameter value.
[0226] For example, in this embodiment of the application, when the system assistant app requests the injection of an auto-execution task, the system assistant app can set a second flag for the injection event of the auto-execution task, the flag name is "POLICY_FLAG_MAGIC_ACTION", and the parameter value (i.e. the second parameter value) is "0x000200000".
[0227] S306. The input event dispatch module requests window information from the WMS.
[0228] S307. The input event dispatch module receives the window information returned by WMS.
[0229] The window information is used to indicate the layer status of the current window.
[0230] S308. If the window information includes the first marker and the first parameter value, the input event dispatch module determines that the current window has a light effect layer.
[0231] The input event dispatch module can determine the current window's layer information based on window information, such as the number of layers, specific layer types, and layer stacking relationships. For example, the input event dispatch module can determine from the window information that the current window contains a light effect layer and an application layer, with the application layer located below the light effect layer.
[0232] S309. If the injection request includes a second tag and a second parameter value, and the current window has a light effect layer and an application layer, then the input event dispatch module determines to dispatch the injection event of the automatically executed task to the application layer.
[0233] It should be noted that since the second flag and the second parameter value can uniquely represent the injection event of the automatic execution task, the input event distribution module can determine to distribute the injection event of the automatic execution task to the target application after receiving the second flag and the second parameter value.
[0234] S310, The input event dispatch module dispatches the injection events of the automatically executed task to the application layer of the target application.
[0235] S311. In response to the injection event, the target application displays the application interface in the application layer and performs simulated operations in the application interface according to the task operation sequence corresponding to the automatic execution task.
[0236] S312, The target application returns a message to the system assistant app indicating successful injection.
[0237] After the automated task is injected into the target application, the target application displays the interface for the automated task based on the application layer.
[0238] In automated scenarios, electronic devices use the touchscreen sensor on the display to detect touch events in real time. For example, when the touchscreen sensor detects a user's click or swipe on the display, it can report the touch event to the TP driver.
[0239] S313, TP driver reports touch screen events to input event acquisition module.
[0240] S314. The input event acquisition module reports touch screen events to the input event distribution module.
[0241] S315, The input event dispatch module obtains window information from WMS.
[0242] S316. The input event dispatch module determines whether the current window has a light effect layer based on the window information.
[0243] S317. When a light effect layer exists in the current window, the input event dispatch module dispatches the touch event to the light effect layer according to the touch event handling strategy provided in this application. The touch event will not affect the application layer.
[0244] For example, in the process of automating tasks based on an application layer, a light effect layer is overlaid on the application layer. When a touch event occurs, the touch event is directly distributed to the light effect layer, which then handles the touch response. Because the touch event acts on the light effect layer, it does not affect the application layer. In other words, the light effect layer acts as a shield, thus avoiding the problem of automatic execution path deviation caused by the touch event acting on the application layer.
[0245] S318. If the current window does not have a light effect layer, the input event dispatch module dispatches the touch event to the application layer according to the system's existing touch event handling strategy. The touch event acts on the application layer.
[0246] For example, after completing an automated task based on the application layer, the light effect layer is dedisplayed on the application layer; since the automated task has ended, there is no issue of automated execution path offset. When a touch event occurs, the touch event is directly distributed to the application layer, so that the touch event acts on the application layer, and the application layer handles the touch response.
[0247] Second Embodiment
[0248] The input event handling method for automatic execution scenarios provided in the first embodiment is mainly applied to simple scenarios. However, in actual implementation, other possible events may exist in the automatic execution scenario. For example, during the automatic execution of a task, various events such as window switching, receiving notifications, and exiting the task may occur. Accordingly, the number of layers and their hierarchical relationships will change. For example, after the automatic execution task is started, the electronic device may receive notifications such as incoming calls, SMS notifications, or warning notifications. The electronic device needs to display the notification content in a window. In this embodiment, a layer can be overlaid on the light effect layer to display the notification content. Therefore, the second embodiment of this application provides another input event handling method for automatic execution scenarios, which can better handle touch events in complex multi-layer scenarios.
[0249] The following section first describes the possible layer display methods provided by the embodiments of this application for automatic execution scenarios, and then describes the touch screen event handling strategy in complex multi-layer scenarios.
[0250] Automatically execute scene layer display method
[0251] In this embodiment, the automatic execution scenario includes both the initiation and termination of the automatic execution task. After the automatic execution task is initiated, the electronic device can add a light effect layer to the application layer; in some cases, a button layer can be attached to the light effect layer; in other cases, a top-priority layer can be added to display specific content; for example, the top-priority layer can be used to display preset notification content, such as incoming call notifications, SMS notifications, or warning notifications; for ease of explanation, the top-priority layer can be referred to as the notification layer.
[0252] Figure 8 and Figure 9 These are schematic diagrams illustrating the layer display methods in the automatic execution scenarios provided in the embodiments of this application.
[0253] 1) Method 1: Layer without light effect.
[0254] The electronic device does not display the light effect layer when the automatic task is not performed, or after the automatic task has ended. (Refer to the reference.) Figure 8 (a) and Figure 9 In Scenario 1, the window only displays application layer 40. In this case, the touch event applies to application layer 40.
[0255] 2) Method 2: Apply layer + light effect layer + button layer.
[0256] refer to Figure 8In (b), when the task is executed automatically, the full-screen window includes application layer 40, light effect layer 41 and button layer 42.
[0257] The application interface for automatically executing tasks is displayed through application layer 40. For example, the application interface displayed by application layer 40 includes service options and favorite options.
[0258] The light effect pattern is displayed through the light effect layer 41, which serves as a prompt that a task is currently being executed automatically. In addition, the light effect layer 41 prevents touch events from affecting the application layer 40, thus acting as a "shield".
[0259] Button layer 42 displays interactive buttons for controlling automatic execution, such as a task stop button 421 and a window minimize button 422. The task stop button 421 is used to trigger the stopping of the automatic task execution. The window minimize button 422 is used to trigger the switching from a full-screen window to a smaller window.
[0260] It's important to note that the button layer is attached to the light effect layer. When the light effect layer is displayed, the button layer can be shown or hidden, depending on the specific usage requirements. For example, in a full-screen window, the light effect layer will be displayed, and the button layer will be overlaid; in a small window, the light effect layer will be displayed, and the button layer will be hidden. If the light effect layer is not displayed in the window, the button layer will also not be displayed. For example, after exiting an auto-task, the electronic device will hide both the light effect layer and the button layer.
[0261] In some embodiments, this application can set the display priority of the light effect layer to be higher than that of the application layer, so that the light effect layer can play a "shielding" role. Specifically, during the automatic execution of tasks, the light effect layer is placed above the application layer. When the electronic device detects a touch event, the touch event can be applied to the light effect layer instead of the application layer. Therefore, the application layer can execute tasks according to the original automatic execution path without path deviation due to touch.
[0262] In some embodiments, this application can set the size of the light effect layer to be equal to the size of the application layer. That is, the application layer and the light effect layer always maintain the same display size. Having the light effect layer completely cover the application layer allows the light effect layer to better perform its "shielding" function.
[0263] In some embodiments, this application may set the light effect layer to a transparent or semi-transparent state so that the display content of the application layer is not obscured.
[0264] In other embodiments, this application may set the surrounding area of the light effect layer to a semi-transparent state and set the central area of the light effect layer to a transparent state, so that the display content of the application layer can be clearly seen by the user, and the light effect layer can be used to display the light effects that accompany the automatically executed tasks to the user.
[0265] In some embodiments, this application may set the display effect of the light effect layer according to actual usage requirements.
[0266] For example, the display effect of the light effect layer can be set to a static display effect or a dynamic display effect.
[0267] For example, the display color, pattern, area, and / or size of the light effect layer can be set according to actual usage needs.
[0268] For example, the dynamic blinking style and / or blinking frequency of the light effect layer can be set according to actual usage needs.
[0269] In some embodiments, the size of the button layer can be set to be smaller than the size of the light effect layer. This allows touch events to be applied to either the button layer or the light effect layer. Specifically, during automatic task execution, touch events are applied to the button layer, which satisfies the user's need to stop the task or switch to a small window state by clicking a function button during automatic task execution; or touch events are applied to the light effect layer, which can prevent accidental touch operations by the user during automatic task execution.
[0270] refer to Figure 9 In Scene 2, the layers are arranged from lowest to highest as follows: Application Layer 40, Light Effect Layer 41, and Button Layer 42. Touch events may affect either Button Layer 42 or Light Effect Layer 41. The specific handling methods for touch events will be explained below.
[0271] 3) Method 3: First application layer + second application layer + light effect layer.
[0272] refer to Figure 8 In (c), when the task is executed automatically, the small window includes the first application layer 40 and the light effect layer 41, and the small window is displayed on the second application layer 43.
[0273] The first application layer 40 displays the application interface for automatically executing tasks. For example, the first application layer 40 displays service options and favorites options.
[0274] The light effect pattern is displayed through the light effect layer 41, which serves as a prompt that a task is currently being executed automatically. In addition, the light effect layer 41 prevents touch events from affecting the first application layer 40, thus acting as a "shield".
[0275] The desktop or other application interfaces can be displayed through the second application layer 43.
[0276] It should be noted that, in order to improve the user experience, the button layer is removed when switching from a full-screen window to a small window. In other words, the small window includes the application layer and the light effect layer, but there is no button layer.
[0277] refer to Figure 9 In Scene 3, the layer stacking order from low to high is: Second Application Layer 43, First Application Layer 40, and Light Effect Layer 41. Touch events may affect either Light Effect Layer 41 or Second Application Layer 43. Specific touch event handling methods will be explained below.
[0278] 4) Method 4: Apply layer + light effect layer + button layer + notification layer.
[0279] When a preset event occurs during automatic task execution, the content of the preset event will be displayed in the window. This application's solution displays the content of the preset event through a top-level layer. For example, the preset event could be receiving an incoming call notification, receiving a video / voice call request, receiving an SMS notification, receiving a warning notification, or detecting a long press on the power button. For ease of explanation, the following example of receiving an incoming call notification will be used, and the top-level layer will be referred to as the notification layer.
[0280] refer to Figure 8 In step (d), when the electronic device receives an incoming call notification during automatic task execution, the electronic device displays an incoming call notification interface, which includes the caller ID 441, an answer control 442, and a hang-up control 443. This incoming call notification interface can be displayed via a notification layer 44. In this case, the window includes an application layer 40, a light effect layer 41, a button layer 42, and a notification layer 44.
[0281] In some embodiments, this application may set the display priority of the notification layer to be higher than that of the light effect layer. That is, the notification layer takes precedence over the light effect layer.
[0282] In some embodiments, this application may set the display priority of the notification layer to be higher than or equal to that of the button layer. That is, the notification layer is higher than the button layer, or the notification layer and the button layer are at the same level.
[0283] In some embodiments, the size of the notification layer can be set according to actual usage requirements.
[0284] In some cases, the notification layer is smaller than the light effect layer. That is, the notification layer partially covers the application layer and the light effect layer, which allows the application layer, the light effect layer, and the notification layer to be displayed simultaneously, improving the display effect.
[0285] In other cases, the notification layer is the same size as the lighting effect layer. That is, the notification layer completely covers the application layer and the lighting effect layer to provide a better notification.
[0286] In some embodiments, the display position of the notification layer can be set according to actual usage requirements.
[0287] In some cases, the notification layer and the button layer are located in different display areas on the light effect layer. That is, the notification layer and the button layer will not overlap; the notification layer will not obscure the button layer, nor will it completely obscure the light effect layer.
[0288] For example, when an electronic device receives an incoming call notification during automated task execution, a notification layer can be overlaid on the light effect layer to display the call notification interface, which includes answer and reject controls. In this case, the size of the notification layer can be smaller than the size of the light effect layer. Alternatively, the size of the notification layer can be equal to the size of the light effect layer.
[0289] For example, when an electronic device receives a video / voice call request while automatically performing a task, a notification layer can be overlaid on the light effect layer to display the video / voice call request interface, which includes answer and reject controls.
[0290] For example, when an electronic device receives an SMS notification during automated task execution, a notification layer can be overlaid on the light effect layer. This notification layer displays the SMS content, reply controls, and exit controls. In this case, the notification layer can be smaller than the light effect layer, meaning the notification layer partially covers both the application layer and the light effect layer. After a preset duration, the notification layer displayed on the light effect layer automatically hides.
[0291] For example, when an electronic device receives a warning notification during automated task execution, a notification layer can be overlaid on the light effect layer. This notification layer displays the warning content and an exit control. In this case, the size of the notification layer can be equal to the size of the light effect layer, meaning the notification layer completely covers both the application layer and the light effect layer, thus providing a better notification effect.
[0292] When an electronic device detects a long press on the power button during automated task execution, a notification layer can be overlaid on the light effect layer. This notification layer displays power off and restart controls. In this case, the size of the notification layer can be equal to the size of the light effect layer, meaning the notification layer completely covers both the application layer and the light effect layer, providing a better notification effect.
[0293] like Figure 9 As shown in Scenario 4, the layer stacking relationship from low to high is as follows: Application Layer 40, Light Effect Layer 41, Button Layer 42, and Notification Layer 44. When Notification Layer 44 partially covers Light Effect Layer 41, the touch event may act on Light Effect Layer 41, Button Layer 42, or Notification Layer 44; when Notification Layer 44 completely covers Light Effect Layer 41, the touch event acts on Notification Layer 44. The specific touch event handling method will be explained below.
[0294] This application provides various layer display methods for automatic execution scenarios, which can not only improve the display effect when automatically executing tasks, but also provide function buttons for controlling automatic execution tasks for users to use, and can also shield users from accidental touch operations when automatically executing tasks, and can also display incoming call notifications / warning notifications, etc. when automatically executing tasks, thus improving the user experience.
[0295] Touch event handling strategies for complex multi-layer scenes
[0296] Figure 10 This is a flowchart illustrating another input event processing method for an automated execution scenario provided in the second embodiment of this application.
[0297] S401, The System Assistant App attaches the light effect layer to the auto-execution task.
[0298] S402, the System Assistant App injects automatically executed tasks into the target application through the input event dispatch module.
[0299] The specific implementation process of S401 and S402 can be found in the relevant description in the first embodiment above, and will not be repeated here.
[0300] After the automated task is injected into the target application, the target application displays the interface for the automated task based on the application layer. During the automated task execution, various events may occur, such as window switching, receiving notifications, and exiting the task.
[0301] S403, Window Switching Event: After the automatic task starts, WMS switches the display window. In full-screen mode, a button layer is overlaid on the light effect layer, and in small window mode, the button layer is hidden.
[0302] S404 Notification Received Event: After an automatic task is initiated, if the electronic device receives a notification, WMS overlays a notification layer on the light effect layer. For example, the notification can be an incoming call notification, an SMS notification, or an alert notification.
[0303] S405, Exit Task Event: After the automatic task is completed, WMS hides the light effect layer and the button layer.
[0304] It should be noted that in automated execution scenarios, events such as window switching, receiving notifications, and / or task exit may or may not occur. The events mentioned above are illustrative examples; in actual implementation, other events may occur, and the specific events can be determined based on the actual situation.
[0305] In automated scenarios, electronic devices use the touchscreen sensor on the display to detect touch events in real time. For example, when the touchscreen sensor detects a user's click or swipe on the display, it can report the touch event to the TP driver.
[0306] S406, TP driver reports touch screen events to input event acquisition module.
[0307] When reporting a touch event, the touch location information will also be reported.
[0308] For example, a touch event can be a user's click on the screen, or it can be other possible user touch events.
[0309] S407. The input event acquisition module reports touch screen events to the input event distribution module.
[0310] S408, The input event dispatch module obtains window information from WMS.
[0311] S409. The input event dispatch module determines the touch event handling strategy based on window information and touch screen position information.
[0312] Based on the various layer display methods described above, this application provides a touch event handling strategy in an automated execution scenario, which can reasonably handle various touch events during automated task execution.
[0313] According to the embodiments of this application, in an automated execution scenario, when an electronic device detects a touch event, the electronic device can determine the touch event handling strategy based on the current window information and the touch position information. Specifically, the current window information can determine which layers are contained in the current window and their layer overlay relationships; further, combined with the touch position information, it can determine which layer the touch event affects and the specific touch position.
[0314] Figure 11 For based on Figure 10 A schematic diagram of the touch screen event handling process implemented in S409.
[0315] Touch event handling strategy for scenario 1
[0316] In Scenario 1, before an automatic task begins or after exiting an automatic task, the electronic device only displays the application layer. During the automatic task execution, when the electronic device detects a touch event, it can determine whether the touch event affects the application layer and the specific touch location based on window information and touch location information.
[0317] S1-S3: If the window information indicates that only an application layer exists, the input event dispatch module determines to dispatch the touch event to the application layer. The input event dispatch module notifies the target application to dispatch the touch event to the application layer, meaning the touch event acts on the application layer. The target application responds to the touch event based on the application layer.
[0318] Figure 12 This is a schematic diagram of the interactive interface for handling touch events by an electronic device in Scenario 1. When the electronic device detects that the favorites option 50 in the current window has been clicked, the electronic device can determine that the touch event is applied to the application layer 40 and that the target is the favorites option 50 in the application layer 40 based on the window information and the touch position information (indicating that the touch position falls on the favorites option 50). The electronic device responds to the touch event based on the application layer 40 and jumps to the favorites page 51.
[0319] Touch event handling strategy for scenario 2
[0320] In Scenario 2, when automatically executing tasks in full-screen mode, a light effect layer is overlaid on the application layer, and a button layer is overlaid on top of the light effect layer. For Scenario 2, the electronic device can determine whether the touch event applies to the light effect layer or the button layer based on window information and touch position information, and can also accurately determine which specific button on the button layer applies to the touch event.
[0321] S4-S5: The input event dispatch module determines, based on window information, that the application layer, light effect layer, and button layer exist in ascending order. The input event dispatch module then determines, based on touch screen position information, whether the touch screen position falls on a button in the button layer.
[0322] S6-S7: If the touchscreen location is determined to fall on a button in the button layer, the input event dispatch module notifies the system assistant app to dispatch the touchscreen event to the button layer; that is, the touchscreen event acts on the button layer. The system assistant app responds to the touchscreen event based on the button layer. For example, if the task stop button in the button layer is clicked, the system assistant app responds to the touchscreen event and stops the task execution.
[0323] S8-S9: If the touchscreen location does not fall on a button in the button layer, the input event dispatch module notifies the system assistant app to dispatch the touchscreen event to the light effect layer; that is, the touchscreen event acts on the light effect layer. The system assistant app responds to the touchscreen event based on the light effect layer. For example, the system assistant app prompts a pop-up window asking "Exit the automatic execution process?"
[0324] In other words, during the automatic task execution process, when the electronic device detects a touch event, it acquires window information and touch position information. If the window information indicates that the current window includes an application layer, a light effect layer, and a button layer, and the button layer is higher than the application layer, the electronic device further determines whether the touch position falls within the button area of the button layer based on the touch position information. If the electronic device determines that the touch position falls within the button area of the button layer (e.g., the minimize button of the button layer is clicked), it distributes the touch event to the button layer for processing (e.g., responding to the touch event by switching to a small window display). If the electronic device determines that the touch position does not fall within the button area of the button layer, it distributes the touch event to the light effect layer for processing, such as prompting the user via a pop-up window to choose whether to continue automatic execution or exit automatic execution. In this case, the application layer will not receive the touch event and therefore will not respond to it. Even if the user accidentally touches the screen, it will not affect the automatic execution process, thus ensuring the smooth completion of the automatic task.
[0325] Figure 13 This is a schematic diagram of the interactive interface for handling touch screen events on an electronic device in Scenario 3.
[0326] like Figure 13 As shown in (a), when the electronic device detects that the current window has been clicked, the electronic device can determine that the touch event 1 is applied to the window shrink button 422 in the button layer 42 based on the window information and the touch position information (indicating that the touch position falls on the window shrink button 422); the electronic device responds to the touch event 1 based on the button layer 42 and switches from a full-screen window to a small window.
[0327] like Figure 13As shown in (b), when the electronic device detects that the current window has been clicked, it can determine that touch event 2 applies to the light effect layer 41 based on the window information and the touch position information. The electronic device responds to touch event 2 based on the light effect layer 41 by displaying a pop-up window 52 with a "Exit Auto-Execution" prompt, a "Continue Execution" button 521, and an "Exit" button 522. Even if the touch position falls on the favorites option 50 in the application layer 40, the touch event will not apply to the application layer 40 because the light effect layer 41 acts as a shield, thus preventing a jump to the favorites page and avoiding automatic execution path deviation.
[0328] Touch event handling strategy for scenario 3
[0329] In Scenario 3, during automatic task execution, in a small window state, the small window displays a first application layer and a light effect layer. The small window is displayed on a second application layer, which is used to display the desktop or other application interfaces. During the automatic task execution, when the electronic device detects a touch event, it can determine whether the touch event affects the light effect layer or the second application layer based on window information and touch location information. In this case, the first application layer will not receive the touch event and therefore will not respond to it. Even if the user accidentally touches the screen, it will not affect the automatic execution process, thus ensuring the smooth completion of the automatic task.
[0330] S10-S11 If the window information indicates that there is a small window in the current window and the small window displays the application layer and the light effect layer, the input event dispatch module determines whether the touch screen position is within the small window.
[0331] S12-S13, If the touchscreen is located within a small window, the input event dispatch module determines to dispatch the touchscreen event to the light effect layer. The input event dispatch module notifies the system assistant app to dispatch the touchscreen event to the light effect layer, meaning the touchscreen event acts on the light effect layer. The system assistant app responds to the touchscreen event based on the light effect layer, for example, switching from a small window to a full-screen window.
[0332] S14-S15 If the touch screen location is outside the small window, the input event dispatch module determines to dispatch the touch screen event to the second application layer.
[0333] Figure 14 This is a schematic diagram of the interactive interface for handling touch screen events on an electronic device in Scenario 3.
[0334] like Figure 14As shown in (a), when the electronic device detects that the current window has been clicked, it can determine that touch event 1 applies to the light effect layer 41 based on window information (the current window contains a small window, and the small window displays an application layer and a light effect layer) and touch position information (indicating that the touch position falls within the small window). The electronic device responds to the touch event based on the light effect layer 41, and the light effect layer 41 updates its display size, switching from a small window to a full-screen window. The first application layer 40 and the light effect layer 41 maintain the same display size. Even if the touch position falls on the favorite option 50 within the first application layer 40, because the light effect layer 41 acts as a shield, touch event 1 will not apply to the first application layer 40, and therefore will not redirect to the favorites page, avoiding automatic path offset.
[0335] like Figure 14 As shown in (b), when the electronic device detects that the current window has been clicked, the electronic device can determine that the touch event 2 is applied to the second application layer 43 based on the window information (the current window contains a small window and the small window displays the application layer and the light effect layer) and the touch position information (indicating that the touch position falls in the area outside the small window); the electronic device responds to the touch event based on the second application layer 43, for example, the display content of the second application layer 43 is updated from the desktop home page to the negative one screen interface.
[0336] Touch event handling strategy for scenario 4
[0337] In Scenario 4, during automatic task execution in full-screen mode, a light effect layer is overlaid on the application layer, a button layer is overlaid on the light effect layer, and a notification layer can be set at the top layer. For example, the notification layer can display incoming call notifications, SMS notifications, or alert notifications. For Scenario 4, the electronic device can determine whether the touch event applies to the notification layer, the button layer, or the light effect layer based on window information and touch position information, and can also determine which specific button or control within the layer applies to the touch event.
[0338] S16-S17: The input event dispatch module determines, based on the window information, that the application layer, light effect layer, button layer, and notification layer exist in ascending order. The input event dispatch module then determines, based on the touch position information, whether the touch position falls on a control in the notification layer.
[0339] S18-S19: If the touchscreen location is determined to fall on a control within the notification layer, the input event dispatch module notifies the phone / notification app to dispatch the touchscreen event to the notification layer; that is, the touchscreen event acts on the notification layer. The phone / notification app responds to the touchscreen event based on the notification layer. For example, if the answer control in the notification layer is clicked, the phone / notification app responds to the touchscreen event and answers the call; if the hang-up control in the notification layer is clicked, the phone / notification app responds to the touchscreen event and hangs up the call.
[0340] S20. If it is determined that the touch screen position does not fall on the control of the notification layer, the input event dispatch module determines whether the touch screen position falls on the button of the button layer based on the touch screen position information.
[0341] S21-S22, If the touchscreen location is determined to fall on a button in the button layer, the input event dispatch module notifies the system assistant app to dispatch the touchscreen event to the button layer; that is, the touchscreen event acts on the button layer. The system assistant app responds to the touchscreen event based on the button layer. For example, in response to the touchscreen event, the system assistant app executes the function corresponding to the button.
[0342] S23-S24: If the touchscreen location does not fall on a button in the button layer, the input event dispatch module notifies the system assistant app to dispatch the touchscreen event to the light effect layer; that is, the touchscreen event acts on the light effect layer. The system assistant app responds to the touchscreen event based on the light effect layer. For example, the system assistant app prompts a pop-up window asking "Exit the automatic execution process?"
[0343] For example, when an electronic device receives an incoming call notification while automatically performing a task, it can overlay a notification layer on top of the light effect layer. This notification layer displays the incoming call notification interface, which may include answer and hang-up controls. When the electronic device detects a touch event, it acquires window information and touch position information. If the window information indicates that the current window includes an application layer, a light effect layer, a button layer, and a notification layer, and the notification layer is higher than the button layer, the button layer is higher than the button layer, and the light effect layer is higher than the application layer, then the electronic device further determines whether the touch event applies to the notification layer or the button layer based on the touch position information. If the touch event is applied to the answer or hang-up control of the notification layer, the electronic device will dispatch the touch event to the notification layer for processing, enabling the incoming call to be answered or hung up. If the touch event is applied to the stop or minimize button of the button layer, the electronic device will dispatch the touch event to the button layer for processing, enabling the button to be clicked. If the touch event is not applied to either the notification layer or the button layer, the electronic device will dispatch the touch event to the light effect layer for processing, for example, by prompting the user through a pop-up window whether to continue automatic execution or exit automatic execution.
[0344] Figure 15 This is a schematic diagram of the interactive interface for handling touch screen events on an electronic device in Scenario 4. (Example:) Figure 15 As shown, during the automatic execution of a task, the electronic device receives a warning notification and displays the warning notification 53. This warning notification 53 is displayed on a notification layer 44, which is at the top layer and completely covers the button layer, light effect layer, and application layer. When the electronic device detects that the current window has been clicked, it can determine, based on window information and touch location information, that the touch event will act on the "View Details" control 54 in the notification layer 44. The electronic device responds to this touch event based on the notification layer 44, for example, by updating the displayed content of the notification layer 44 to the "View Details" page.
[0345] Figure 16 This is a schematic diagram of another interactive interface for handling touch screen events by an electronic device in Scenario 4. During the automatic execution of a task, the electronic device receives an incoming call notification and displays the incoming call notification interface. This interface is displayed on notification layer 44, which is located at the top layer and partially covers the light effect layer 41.
[0346] like Figure 16 As shown in (a), when the electronic device detects that the current window has been clicked, the electronic device can determine that the touch event 1 is applied to the answer control 443 of the notification layer 44 based on the window information and the touch position information. The electronic device responds to the touch event 1 based on the notification layer 44 and answers the incoming call.
[0347] like Figure 16 As shown in (b), when the electronic device detects that the current window has been clicked, the electronic device can determine that the touch event 2 is applied to the window shrinking button 422 of the button layer 42 based on the window information and the touch position information. The electronic device responds to the touch event 2 based on the button layer 42 and switches from a full-screen window to a small window.
[0348] like Figure 16 As shown in (c), when the electronic device detects that the current window has been clicked, it can determine that touch event 3 applies to the light effect layer 41 based on the window information and touch position information. The electronic device responds to touch event 3 based on the light effect layer 41, displaying a pop-up window 52 on the light effect layer 41. For example, pop-up window 52 displays a prompt message "Exit automatic execution?", a "Continue execution" button 521, and an "Exit" button 522. Even if the touch position falls on the favorites option 50 of the application layer, the touch event will not apply to the application layer 40 because the light effect layer 41 acts as a shield, and therefore will not jump to the favorites page, thus avoiding automatic execution path deviation.
[0349] The above explains the touch screen event handling strategies for different scenarios. The following, with reference to the accompanying diagram, illustrates the possible implementation methods of electronic devices handling touch screen events in actual use scenarios.
[0350] Figure 17 This is a schematic diagram of an application scenario for the input event processing method for an automated execution scenario provided in the embodiments of this application.
[0351] like Figure 17 As shown in (a), during the automatic execution of a task, the current window displays an application layer 40, a light effect layer 41, and a button layer 42; the application layer 40 displays a service option 61 and a favorite option 62. The automatic execution of the task includes simulating clicking the service option 61 and then jumping to the service page.
[0352] like Figure 17 As shown in (a) and (b), the electronic device detects a user's click on the favorite option 62. In response to this click, the electronic device displays a pop-up window 63, which shows a continue button 631 and an exit button 632. Figure 17 As shown in (b), if the user clicks the Continue button 631, the electronic device can continue to perform the task automatically. If the user clicks the Exit button 632, the electronic device can stop performing the task automatically.
[0353] like Figure 17 As shown in (c), the electronic device continues to perform the task automatically, at which point the electronic device detects a user click on the window minimize button 422. Figure 17 As shown in (d), in response to the click operation, the electronic device minimizes the window for automatically performing the task, and the minimized window is displayed on the desktop. The electronic device continues to automatically perform the task and continues to display the application interface for automatically performing the task in the small window, such as displaying service page 64 in the small window, which displays payment options 65 and automatic renewal options 66.
[0354] like Figure 17 As shown in (d), the electronic device continues to automatically perform tasks, including simulating a click on the auto-renewal option 66, and then redirecting to the auto-renewal page. At this point, the electronic device detects the user's click on the small window. Figure 17 As shown in (e), in response to the click, the electronic device switches back from the small window to the full-screen window. The electronic device continues to perform tasks automatically and continues to display the application interface for automatically performing tasks in the full-screen window, such as displaying the auto-renewal page 67 in the full-screen window.
[0355] It should be noted that electronic devices can process user touch screen events in various scenarios according to the input event processing method for automatic execution scenarios provided in the embodiments of this application, so that automatic execution tasks can be performed normally. For example, even if the user's click position on the small window falls on the payment option 65, the electronic device will still jump to the automatic renewal page 67 according to the automatic execution path, without causing the automatic execution task to be interrupted. Therefore, the solution of this application improves the success rate of automatic execution tasks.
[0356] Figure 18 This is a schematic diagram illustrating another application scenario of the input event processing method for the automatic execution scenario provided in the embodiments of this application.
[0357] like Figure 18 As shown in (a), during the automatic task execution, the current window displays an application layer 40, a light effect layer 41, and a button layer 42; the application layer 40 displays a service page 64, which includes a payment option 65 and an auto-renewal option 66. The automatic task execution includes simulating clicking the auto-renewal option 66 and then redirecting to the auto-renewal page. The automatic execution path includes redirecting from the service page 64 to the auto-renewal page.
[0358] like Figure 18 As shown in (a) and (b), the electronic device detects a user's click on the payment option 65. In response to this click, the electronic device detects that the user's touch position is different from the simulated click position for automatically executing the task, i.e., the touch result is inconsistent with the automatic execution path, and therefore displays a pop-up window 63. If the user clicks the continue button 631 in the pop-up window 63, the electronic device continues to automatically execute the task.
[0359] like Figure 18 As shown in (c), the electronic device continues to perform the task automatically, at which point the electronic device detects the user's click on the automatic renewal option 66. Figure 18 As shown in (d), in response to the click operation, the electronic device detects that the user's touch position is the same as the simulated click position for automatically executing the task, that is, the touch result is consistent with the automatic execution path, so no pop-up window is displayed; the electronic device continues to automatically execute the task and jumps from the service page 64 to the automatic renewal page 67.
[0360] It should be noted that the electronic device can process user touch events in various scenarios according to the input event processing method for the automatic execution scenario provided in the embodiments of this application, so that the automatic execution task can be performed normally. For example, when it is detected that the user's touch position is different from the simulated click position of the automatic execution task, a pop-up window prompts the user whether to exit automatic execution. The electronic device can exit automatic execution or continue execution according to the user's needs, which can avoid automatic execution failure due to path offset. When it is detected that the user's touch position is the same as the simulated click position of the automatic execution task, the electronic device continues to automatically execute the task without causing the automatic execution task to be interrupted. Therefore, the solution of this application improves the success rate of automatic execution tasks.
[0361] Figure 19 This is a schematic diagram illustrating another application scenario of the input event processing method for the automatic execution scenario provided in the embodiments of this application.
[0362] like Figure 19 As shown in (a), during the automatic execution of a task, the current window displays an application layer 40, a light effect layer 41, and a button layer 42; the application layer 40 displays a service option 61. The automatic execution of the task includes simulating clicking on the service option 61 and then jumping to the service page.
[0363] like Figure 19 As shown in (a) and (b), the electronic device detects a user's click on the window minimize button 422. In response to this click, the electronic device minimizes the window of the auto-execution task, and the minimized window is displayed on the desktop. The electronic device continues to automate the task and continues to display the application interface of the auto-execution task in the smaller window, such as displaying service page 64, which displays the auto-renewal option 66. The auto-execution task also includes simulating a click on the auto-renewal option 66 and then redirecting to the auto-renewal page.
[0364] like Figure 19 As shown in (c), the electronic device receives an incoming call notification and displays an incoming call notification interface on notification layer 44. This interface includes an answer control 442. The electronic device detects a user's click on the answer control 442. Figure 19 As shown in (d), in response to the click operation, the electronic device answers the call, and the display content of notification layer 44 is updated from the call notification interface to the answering interface. Simultaneously, the electronic device continues to automatically perform tasks and continues to display the application interface for automatically performing tasks in a small window; for example, the content displayed in the small window is updated from the service page 64 to the automatic renewal page 67.
[0365] It should be noted that electronic devices can effectively process user touch screen events in various scenarios such as window switching and receiving notifications according to the input event processing method for automatic execution scenarios provided in the embodiments of this application, so that automatic execution tasks can be performed normally. Therefore, the solution of this application improves the success rate of automatic execution tasks.
[0366] This application's solution offers the following advantages: it enhances the stability of automated execution technology, avoiding low success rates due to user accidental touches. Furthermore, by customizing business capabilities for the native input event distribution process of the Android system, it can execute specific distribution logic based on special layers in specific scenarios, making it more flexible than the native input event distribution process of the Android system.
[0367] It should be noted that in the embodiments of this application, "greater than" can be replaced with "greater than or equal to", "less than or equal to" can be replaced with "less than", or "greater than or equal to" can be replaced with "greater than", and "less than" can be replaced with "less than or equal to".
[0368] The various embodiments described herein can be independent solutions or combinations thereof based on their inherent logic, and all such solutions fall within the protection scope of this application.
[0369] The foregoing mainly describes the solutions provided by the embodiments of this application from the perspective of method steps. It is understood that, in order to achieve the above functions, the electronic device implementing this method includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should recognize that, in conjunction with the units and algorithm steps of the various examples described in the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of protection of this application.
[0370] This application embodiment can divide an electronic device into functional modules based on the above method example. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing module. The integrated modules can be implemented in hardware or as software functional modules. It should be noted that the module division in this application embodiment is illustrative and only represents one logical functional division. In actual implementation, other feasible division methods may exist. The following description uses the division of functional modules according to each function as an example.
[0371] This application also provides a chip coupled to a memory, which is used to read and execute computer programs or instructions stored in the memory to perform the methods in the above embodiments.
[0372] This application also provides an electronic device including a chip for reading and executing computer programs or instructions stored in a memory, causing the methods in the various embodiments to be performed.
[0373] This embodiment also provides a computer-readable storage medium storing computer instructions. When the computer instructions are executed on an electronic device, the electronic device performs the aforementioned method steps to implement the input event processing method for the automatic execution scenario in the above embodiment.
[0374] This embodiment also provides a computer program product. The computer-readable storage medium stores program code. When the computer program product is run on a computer, it causes the computer to perform the above-mentioned related steps to realize the input event processing method for the automatic execution scenario in the above embodiment.
[0375] In this embodiment, the electronic device, computer-readable storage medium, computer program product or chip are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding methods provided above, and will not be repeated here.
[0376] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another apparatus, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0377] In this article, the term "and / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. The symbol " / " in this article indicates that the related objects are in an "or" relationship; for example, A / B means A or B.
[0378] The terms "first" and "second," etc., used in the specification and claims herein are used to distinguish different objects, not to describe a specific order of objects. In the description of embodiments in this application, unless otherwise stated, "multiple" means two or more; for example, multiple processing units refer to two or more processing units, etc.; multiple elements refer to two or more elements, etc.
[0379] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for handling input events in an automatically executed scenario, characterized in that, The method is applied to an electronic device, and the method includes: The device receives a first instruction, which is used to cause the electronic device to automatically perform a task. The automatic task includes sequentially displaying a first number of application pages, the first number of application pages including a first application page, a second application page, and a third application page. The first application page includes a first control, the second application page includes a second control, the second application page is a page displayed by the electronic device in response to an input operation on the first control, and the third application page is a page displayed by the electronic device in response to an input operation on the second control. In response to the first instruction, the first application page is displayed in full screen and the first button is shown; In response to the user's first operation on the first button, the first interface is displayed in full screen and the first window is displayed, in which the second application page is displayed. The system receives a second operation from the user on the first window. The second operation is applied to a third control in the second application page. The third control is used to trigger the display of a fourth application page, which is different from the third application page. In response to the second operation, the third application page is displayed in full screen.
2. The method according to claim 1, characterized in that, The method further includes: In response to the second operation, the fourth application page is not displayed.
3. The method according to claim 1 or 2, characterized in that, After the first application page is displayed in full screen, the method further includes: The system receives a third operation from the user on the first application page; the third operation is applied to a fourth control on the first application page, and the fourth control is used to trigger the display of a fifth application page. In response to the third operation, the fifth application page is not displayed, and a first pop-up window is displayed to prompt whether to exit the automatic task.
4. The method according to claim 3, characterized in that, Before receiving the user's second operation on the first window, the method further includes: When the first interface is displayed in full screen and the first window is displayed, a first notification from the first application is received. A first notification interface is displayed floating on the first interface, and the first notification interface displays a fifth control. In response to the user's fourth operation on the fifth control, the first application interface of the first application is displayed.
5. The method according to claim 4, characterized in that, The first notification is an incoming call notification, the first notification interface is an incoming call notification interface, and the fifth control includes an answer control; The step of displaying the first application interface of the first application in response to the user's fourth operation on the fifth control includes: In response to the user's fourth operation on the answer control, the incoming call is connected, and the incoming call notification interface is updated to the call interface; wherein, during and after the call, the first window continuously displays the first number of application pages.
6. The method according to any one of claims 1 to 5, characterized in that, The method further includes: In response to the first instruction, a first prompt message is displayed, indicating that the electronic device is in an automatic execution state; The method further includes: in response to a first operation by the user on the first button, maintaining the first prompt information displayed in the first window; and in response to a second operation, maintaining the first prompt information displayed.
7. The method according to any one of claims 1 to 6, characterized in that, The method further includes: In response to the first instruction, a second button is also displayed; In response to the user's fifth action on the second button, a second pop-up window is displayed, which prompts whether to stop the automatic task. In response to the user's confirmation to stop the automatic task, the automatic task is stopped, and the first button, the second button, and the first number of application pages are de-displayed.
8. The method according to any one of claims 1 to 7, characterized in that, The method further includes: When the first application page or the third application page is displayed in full screen, a light effect pattern is displayed; When the second application page is displayed in the first window, the light effect pattern is displayed in the first window.
9. The method according to claim 8, characterized in that, The first number of application pages are all displayed on the first layer, the light effect pattern is displayed on the second layer, and the first button is displayed on the third layer; The second layer is located above the first layer, and the second layer and the first layer have the same size; the third layer is located above the second layer, and the size of the third layer is smaller than the size of the second layer.
10. The method according to claim 9, characterized in that, The method further includes: Upon receiving a first input event, the window information determines that the current window includes the first layer and a specific layer different from the first layer; the specific layer includes the second layer and / or the third layer. If the first input event is an injection event for the automatically executed task, the injection event for the automatically executed task is distributed to the first layer; If the first input event is a user touch event, and the current window only includes the first layer and the second layer, then the user touch event is distributed to the second layer; If the first input event is a user touch event, and the current window includes the first layer, the second layer, and the third layer, then the user touch event is distributed to the second layer or the third layer according to the touch position information.
11. The method according to claim 10, characterized in that, If a user's first action on the first button is received, the input event corresponding to the first action is distributed to the third layer; If a second operation by the user on the first window is received, the input event corresponding to the second operation is dispatched to the second layer; If a third operation by the user on the first application page is received, the input event corresponding to the third operation is distributed to the second layer.
12. The method according to claim 10, characterized in that, If the first input event is an injection event for the automatically executed task, distributing the injection event for the automatically executed task to the first layer includes: If the first input event is the injection event for the automatically executed task, and the current window includes the first layer and the second layer, then the injection event for the automatically executed task is distributed to the first layer.
13. The method according to claim 12, characterized in that, The method further includes: Based on the first marker and the first parameter value, it is determined that the current window includes the second layer; Based on the second flag and the second parameter value, the first input event is determined to be the injection event for the automatically executed task.
14. The method according to any one of claims 1 to 13, characterized in that, The method further includes: After the automatic task is completed, the sixth application interface is displayed, and the light effect pattern is de-displayed. The user's seventh operation is received, and the seventh operation is applied to the fifth control in the sixth application interface. The fifth control is used to trigger the display of the seventh application page. In response to the seventh operation, the seventh application page is displayed.
15. The method according to claim 14, characterized in that, The response to the seventh operation, displaying the seventh application page, includes: In response to the seventh operation, it is determined from the window information that the current window includes a first layer and the first layer is located at the top layer; the sixth application interface is displayed on the first layer; Distribute the user touch event corresponding to the seventh operation to the first layer; Update the display content of the first layer from the sixth application interface to the seventh application page.
16. The method according to any one of claims 1 to 15, characterized in that, The automatically executed tasks include any of the following: querying automatic renewal, sending files, disabling application permissions, optimizing overall device performance, disabling application notifications, and ordering takeout.
17. An electronic device, characterized in that, The electronic device includes: one or more processors, and memory; The memory is coupled to the one or more processors, the memory being used to store computer program code, the computer program code including computer instructions, the one or more processors invoking the computer instructions to cause the electronic device to perform the method as described in any one of claims 1 to 16.
18. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes instructions that, when executed on an electronic device, cause the electronic device to perform the method as described in any one of claims 1 to 16.
19. A computer program product, characterized in that, The computer program product includes computer program code that, when run on an electronic device, causes the electronic device to perform the method as described in any one of claims 1 to 16.