Input event reporting method and electronic equipment

By controlling the type of input events through the input management service, security events can be sent directly to the target application, which solves the security risks in the transmission of input events between applications and ensures the security of user data and information.

CN121637585APending Publication Date: 2026-03-10HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

In scenarios where one application launches another to provide services, existing input event reporting schemes pose security risks. Malicious applications can use the input event transmission process to simulate or tamper with input events, leading to potential threats to user data and information security.

Method used

Input events are sent directly to the target application through the input management service. Control is exercised based on the type of input event, bypassing the first application and only reporting input events within the security event set to the second application, thus ensuring the security of user data and information.

Benefits of technology

It effectively reduces the risk of malicious applications tampering with input, ensures the security of user data and information, and maintains the smoothness and experience of user operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121637585A_ABST
    Figure CN121637585A_ABST
Patent Text Reader

Abstract

The invention provides an input event reporting method and electronic equipment, and the method comprises the steps: in a scene in which a first application pulls up a second application to provide a service, an input management service can directly report an input event to the second application after a user executes an operation on a user interface to generate the input event; therefore, reporting of the input event can be controlled, and the frequency of sending the input event to the second application by the first application is reduced. According to the method, the phenomenon that some malicious applications serve as service users to use the process of sending the input events to the service provider to falsify the input events or tamper the input events can be avoided, the safety of the service provider is guaranteed, and therefore user data and information safety can be guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electronic equipment technology, and in particular to an input event reporting method and an electronic equipment. Background Technology

[0002] Currently, in scenarios where application A launches application B to provide services, when a user performs a user action on application B's window via touch gestures or an input device, the electronic device's input management service generates an input event based on this user action and sends the input event to application A; application A then sends the input event to application B. This input event reporting scheme poses security risks. Summary of the Invention

[0003] This application provides an input event reporting method and electronic device for controlling the reporting of input events in scenarios where one application launches another application to provide services, so as to ensure the security of user data and information.

[0004] In a first aspect, embodiments of this application provide an input event reporting method, which can be applied to an electronic device, the electronic device including an input management service, a first application, and a second application, the method comprising the following steps:

[0005] The input management service generates a first input event based on the operation information of the received first operation; the first operation is an operation performed by the user in the window of the first application; then, the input management service sends the first input event to the first application to cause the electronic device to display a first user interface; wherein, the first user interface is displayed through the window of the first application, and the first user interface includes a target component for displaying the display content of the second application; the input management service generates a second input event based on the operation information of the received second operation; the second operation is an operation performed by the user in the first user interface; the input management service sends the second input event to the second application.

[0006] In this method, when a first application launches a second application to provide services, the input management service can directly report the input events generated by the user's interaction with the user interface to the second application. This allows for control over the reporting of input events and reduces the frequency with which the first application sends input events to the second application. This method can prevent malicious applications, as service users, from using the process of sending input events to the service provider to create fake or tamper with input events, thus ensuring the security of user data and information.

[0007] In one possible design, the input management service can skip the first application and directly send the second input event to the second application based on the event type of the second input event.

[0008] Different types of input events have different security requirements. Based on this, the input management service can determine the target application to report an input event based on its event type, thereby controlling the reporting of input events. Through this design, the input management service can control the reporting of input events based on their event type.

[0009] In one possible design, the input management service can send the second input event to the second application through the following steps:

[0010] When the second input event is a keyboard event and the second input event does not belong to the set security event set, the input management service sends the second input event to the second application; wherein, the security event set includes at least one security event that does not set or modify the second application and running data;

[0011] When the second input event is a touch event or a click event, and the operation position of the second operation is within the hot zone of the second application, the input management service sends the second input event to the second application; the hot zone of the second application is the display area of ​​the display content of the second application in the window of the first application.

[0012] This design allows the input management service to directly report keyboard events that are not part of the security event set and may affect the security of the second application to the second application; it also allows it to directly report touch events or click events whose operation location is within the hot zone of the second application to the second application. The input management service avoids reporting these input events to the first application, preventing the first application from sending input events to the second application and affecting the security of the second application.

[0013] Optionally, since keyboard events that can move focus (referred to as focus-shifting keyboard events) do not set or modify application and runtime data, the security event set may include focus-shifting keyboard events. For example, the security event set may include at least the following focus-shifting keyboard events:

[0014] Arrow key events, Home key events, Backpress key events, Tab key events, End key events, Esc key events, and window switching shortcut key (Shift+Tab) events.

[0015] In one possible design, when the second input event is a keyboard event and does not belong to the security event set, the input management service can also send the second input event to the first application.

[0016] Through this design, the input management service will report keyboard events that do not belong to the security event set to the first application and the second application in parallel. While ensuring the security of the second application, it can also ensure that the first application can receive the keyboard event as soon as possible, so as to ensure the responsiveness of the user's keyboard operation and ensure the user experience.

[0017] In one possible design, the method further includes the step of enabling the input management service to obtain location information of the hotspot of the second application:

[0018] The first application creates the target component within its window based on the first input event; the layer management service uses the position of the target component as a hotspot of the second application and sends the hotspot position information of the second application to the window management service; the window management service sends the hotspot position information of the second application to the input management service; the input management service obtains the hotspot position information of the second application; wherein, the layer management service is used to manage layers and composite and render image frames of the corresponding window in each layer; the window management service is used to manage the display and configuration of windows.

[0019] In one possible design, the method further includes the following steps to enable the input management service to obtain component layout information of the display content of the second application displayed in the target component: the layer management service obtains the component layout information of the second application and sends the component layout information to the window management service; the window management service sends the component layout information to the input management service; the input management service obtains the component layout information; based on this, when the operation position of the second operation is located within the hot zone of the second application, the input management service can generate the second input event according to the operation information of the second operation and the component layout information.

[0020] In one possible design, after receiving the operation information of the third operation, the input management service can also generate a third input event based on the operation information of the third operation; the third operation is an operation performed by the user on the first user interface; when the third input event is a keyboard event and the third input event belongs to the security event set, the input management service sends the third input event to the first application; or when the third input event is a touch event or a click event, and the operation position of the third operation is not located within the hot zone of other applications, the input management service sends the third input event to the first application; the other applications are applications other than the first application, and the other applications include the second application.

[0021] This design allows the input management service to directly report keyboard events that fall within the security event set and do not affect the security of the second application to the first application, allowing the first application to decide whether to send them to the second application. It also allows for the direct reporting of touch or click events where the operation location is not within the hotspot of other applications to the first application. This ensures both a good user experience and the security of the second application.

[0022] In one possible design, the second application receives a fourth input event from the first application within a set time after receiving a second input event from the input management service; the second application discards the fourth input event.

[0023] With this design, in order to ensure security and reduce or avoid receiving false or tampered input events from the first application, the second application can stop processing input events from the first application for a set period of time after receiving input events from the input management service.

[0024] Secondly, embodiments of this application provide an electronic device including a display screen, one or more processors, and a memory; the display screen is used to display a user interface, the one or more processors are coupled to the memory, and the one or more processors are used to read a computer program stored in the memory to execute the method provided in either aspect. The computer program code includes computer instructions.

[0025] Thirdly, embodiments of this application provide a chip including a processor coupled to a memory. The processor is used to call computer program instructions stored in the memory during runtime to implement the methods provided in any of the above aspects. Optionally, the chip may further include components such as a memory, a communication interface, and a power supply module. The memory is used to store computer programs; the communication interface is used to receive and send data; and the power supply module is used to supply power to the processor.

[0026] Fourthly, embodiments of this application provide a computer storage medium storing computer program instructions that, when executed on an electronic device, cause the computer to perform the methods provided in any of the above aspects.

[0027] Fifthly, embodiments of this application provide a computer program product, the computer program product including computer program instructions; when the computer program instructions are executed on a computer, the computer causes the computer to perform the method provided in any one aspect.

[0028] The technical effects that can be achieved by any of the second to fifth aspects mentioned above can be described with reference to the technical effects that can be achieved by any possible design in the first aspect mentioned above. The repetition will not be discussed. Attached Figure Description

[0029] Figure 1 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;

[0030] Figure 2 A software structure diagram of an electronic device provided in an embodiment of this application;

[0031] Figure 3A A schematic diagram illustrating an example of one application launching another application to provide services, as provided in this application embodiment;

[0032] Figure 3B A schematic diagram illustrating an example of one application launching another application to provide services, as provided in this application embodiment;

[0033] Figure 4 A flowchart illustrating an input event reporting method provided in this application embodiment;

[0034] Figure 5 A flowchart illustrating how an input management service obtains location information of a hotspot of a second application, as provided in an embodiment of this application;

[0035] Figure 6 A flowchart for reporting input events is provided as an example of this application.

[0036] Figure 7 This is a schematic diagram illustrating an example of input event reporting provided in an embodiment of this application;

[0037] Figure 8A A schematic diagram of a component tree provided in an embodiment of this application;

[0038] Figure 8B Another component tree diagram provided for an embodiment of this application;

[0039] Figure 9A comparative diagram of the two input event reporting methods provided in this application;

[0040] Figure 10 This is a structural diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0041] This application provides an input event reporting method and an electronic device for controlling the reporting of input events in scenarios where one application launches another application to provide services, thereby ensuring user data and information security. The method and electronic device are based on the same technical concept. Since the methods and electronic devices solve problems based on similar principles, their implementations can be mutually referenced, and repeated details will not be elaborated further.

[0042] The following explanations of some terms used in this application are provided to facilitate understanding by those skilled in the art.

[0043] 1) Electronic equipment refers to devices or apparatuses that have data connectivity, data calculation, and processing capabilities. Generally, electronic equipment has a display screen capable of showing a user interface.

[0044] For example, the electronic device in this application may be a tablet computer, personal computer (PC), laptop computer, computer, netbook, in-vehicle computer, in-vehicle terminal, smartphone, smart wearable device (e.g., smartwatch, smart bracelet, smart glasses, smart helmet, etc.), personal digital assistant (PDA), smart home device (e.g., smart TV, smart mirror, smart speaker, etc.). This application does not limit the specific form of the electronic device.

[0045] Electronic devices can perform their functions and provide services to users through an operating system they run. For example, the electronic device may, but is not limited to, running an operating system... Or other operating systems.

[0046] 2) An application (APP) is installed on an electronic device and provides services to the user through specific business logic after it runs. Applications can be developed by the electronic device manufacturer, the operating system vendor, or a third-party application vendor; this application does not limit the scope of the application. Applications can also be called application programs, application software, etc.

[0047] For example, applications can include: various drawing applications, calling applications, camera applications, SMS applications, chat applications, video applications, music applications, electronic map applications, social applications, etc.

[0048] 3) Service users and service providers.

[0049] In a scenario where one application launches another application to provide a service, the service user is the application that initiates the launch process, while the service provider is the application that is launched and provides services to the initiator.

[0050] Since the user interface of the service provider is embedded in the user interface of the service user, the service user can also be called the host application.

[0051] 4) Process.

[0052] A process is a running activity of a program with certain independent functions on a specific set of data. A process is an independent unit for resource allocation and scheduling by the operating system. For example, when an application runs, an electronic device launches the corresponding process for that application. process, process.

[0053] It should be noted that different processes can communicate with each other, i.e., cross-process communication. Currently, cross-process communication methods include, but are not limited to, inter-process communication (IPC) and binder.

[0054] 5) Components.

[0055] A component is a reusable object in software that can interact with other objects. It can be implemented through classes; that is, a component is a reusable program or module.

[0056] Components may include those with user interface functionality or visual representation. At least one component may be laid out in a user interface, window, or page.

[0057] It should be understood that components can be nested; for example, a container component can display multiple components. These multiple components may include, for example, a confirmation component and a cancellation component.

[0058] In some examples, the confirmation component can also be called the confirmation control, and the cancellation component can also be called the cancellation control.

[0059] In some examples, the component can also be an image component or a text component.

[0060] In some examples, a container class component may contain image components and / or text components. For instance, a container class component may display editable or readable text components, or image components for the user to view. Alternatively, a container class component may display both image and text components.

[0061] The target component in the examples below can be a container component, so that the container component can display more content for the second application.

[0062] It should be understood that in the embodiments of this application, "at least one" means one or more, and "more than one" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, a and b, a and c, b and c, or a, b, and c, where a, b, and c can be single or multiple.

[0063] In the embodiments of this application, descriptions such as "when," "under the circumstances," "if," and "if" all refer to the electronic device making corresponding processing under certain objective circumstances. They are not time limits, nor do they require the electronic device to make a judgment action when implementing it, nor do they imply any other limitations.

[0064] It should be noted that in this application, "used for indicating" can include both direct and indirect indication. When describing information as being used to indicate A, it can include whether the information directly or indirectly indicates A, but does not necessarily mean that the information contains A. Taking first information used to indicate first content as an example, the first information can contain the first content, or a part of the first content, or an identifier, index, indicator, etc., of the first content, and can also contain algorithms, calculation parameters, etc., for determining the first content. This application does not limit the manner of "indication".

[0065] In this application, "containing / including A" may be equivalent to "containing / including information A". Information A is used to indicate A.

[0066] In addition, it should be understood that in the description of this application, the words "first" and "second" are used only for the purpose of distinguishing descriptions and should not be construed as indicating or implying relative importance or order.

[0067] The solutions provided in the embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0068] This application provides an electronic device that can implement the input event reporting method provided in this application. See below for reference. Figure 1The structure of the electronic device provided in the embodiments of this application will be described.

[0069] like Figure 1 As shown, the electronic device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a USB interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, 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 SIM card interface 195, etc.

[0070] Processor 110 may include one or more processing units, such as a central processing unit (CPU), an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). These different processing units may be independent devices or integrated into one or more processors.

[0071] 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 this memory. By providing memory, the number of times the processor 110 accesses data in the internal memory 121 can be reduced, thus reducing the processor 110's waiting time and improving system efficiency.

[0072] Display screen 194 is used to display various user interfaces. Display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Minied, MicroLED, Micro-OLED, quantum dot light-emitting diode (QLED), etc. In some embodiments, electronic device 100 may include one or N displays screens 194, where N is a positive integer greater than 1. Display screen 194 can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces (GUIs). For example, display screen 194 may display windows, photos, videos, web pages, or documents, etc.

[0073] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, program code for at least one application, etc. The operating system may include, but is not limited to, […]. The program storage area can store computer programs for implementing the input event reporting method provided in the embodiments of this application. When the processor 110 executes these computer programs, the electronic device can execute the input event reporting method. The data storage area can store data created during the use of the electronic device 100.

[0074] In addition, the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.

[0075] The sensor module 180 may include, but is not limited to, fingerprint sensors, touch sensors, pressure sensors, magnetic sensors, ambient light sensors, barometric pressure sensors, bone conduction sensors, etc.

[0076] A touch sensor, also known as a "touch panel," can be located on the display screen 194. The touch sensor detects touch operations applied to or near it. It transmits the detected touch operation to an application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In some embodiments, the touch sensor can be integrated with the display screen 194 to form a touch display. In other embodiments, the touch sensor may be located on the surface of the electronic device 100, in a different position than the display screen 194.

[0077] The wireless communication function of electronic device 100 can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor, and baseband processor. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Mobile communication module 150 can provide wireless communication solutions for electronic device 100, including 2G / 3G / 4G / 5G. Wireless communication module 160 can provide wireless communication solutions for electronic device 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies.

[0078] In this embodiment, the electronic device 100 can connect to peripheral devices via USB interface 130 or other interfaces; the electronic device 100 can also establish a wireless connection with peripheral devices via wireless communication module 160. For example, peripheral devices may include, but are not limited to, input devices such as keyboards, mice, gamepads, handwriting input tablets, remote controls, joysticks, etc.; output devices such as extended screens, speakers, printers, etc.; cameras, external storage devices, etc.

[0079] It should be understood that Figure 1 The electronic device 100 shown is merely an example and does not constitute a limitation on the electronic device. In practical applications, the electronic device 100 may have more or fewer components than those shown in the figure, may combine two or more components, or may have different component configurations. The various components shown in the figure may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.

[0080] The software system of the electronic device 100 provided in this application embodiment can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application embodiment takes a layered architecture as an example. Figure 2 The software structure of an electronic device is illustrated by example.

[0081] A layered architecture divides the software within an electronic device into several layers, each with a clear role and function. Layers can communicate with each other through software interfaces. For example... Figure 2 As shown, the software architecture of an electronic device, from top to bottom, includes at least the following: application layer, system service layer, and kernel layer. Additionally, an electronic device may include a hardware abstraction layer (HAL), which provides hardware resource support for the electronic device.

[0082] The application layer is the top layer of the operating system, including the operating system's native applications and installed third-party applications, such as camera, gallery, calendar, Bluetooth, music, video, messaging, calculator, chat applications, video applications, music applications, electronic map applications, social applications, and so on.

[0083] The system service layer is an important part of the operating system of an electronic device, including various system services provided by the operating system. For example, the system service layer may include: window management service, operation management service, notification management service, layer management service, input management service, access control service, etc.

[0084] The window management service manages the display and configuration of the window library. Based on display settings and multiple management functions, it controls the display of windows or interfaces on the screen, adjusting their transparency, position, and size. It also includes features such as screen locking and screenshot capabilities. The window management service can obtain parameters such as screen size and resolution, and can identify display areas in the user interface, such as the status bar.

[0085] The operation and management service is responsible for starting, switching, and scheduling various components in the system, as well as managing and scheduling applications.

[0086] Notification management services allow applications to display notification information in the status bar, as well as to convey informational messages. These messages can disappear automatically after a short pause, without requiring user interaction.

[0087] The input management service is used to collect, process, and distribute user operation information and input events. For example, after receiving operation information reported by touch drivers or other input device drivers (such as keyboard drivers, mouse drivers, etc.), the input management service can convert it into input events and distribute them to other modules for processing. For instance, when a user performs an operation on an application, the input management service can generate an input event based on the received user operation information and distribute it to the application. As another example, during a user's drawing operation, the input management service generates an input event after receiving the drawing operation information and distributes it to the window management service; the window management service then distributes it to the activity management service; the activity management service can respond to the input event and display the drawing trajectory in the corresponding window.

[0088] Layer management service is a standalone service provided by the operating system of an electronic device. It is a low-level, resident service of the operating system. During device operation, this layer management service needs to run continuously, and the operating system prioritizes allocating resources to it to ensure that it can perform image compositing at any time, thereby ensuring that the electronic device can display the user interface in real time. The layer management service is mainly responsible for the creation, control, and management of layers. It composites and renders the image frames of the corresponding window in each layer, and finally combines the graphic frames from all layers into the image of the user interface to be displayed on the screen.

[0089] For example, when an application or system service in the application layer starts running, it can request the layer management service to create at least one layer so that the window of the application or system service can be displayed in the user interface. The layer management service can create a corresponding layer for the requested application or system service, thus binding the application or system service to the layer. In this way, the layer management service can composite and render the image frame of the application or system service window on the layer corresponding to the application or system service. Finally, the layer management service can merge the image frames rendered in the multiple created layers into an image frame of the user interface, and then send the image frame to HAL to display the image frame on the screen, thus realizing the display of the user interface.

[0090] Access control services can provide access permission verification for various applications in the application layer and other system services in the system service layer.

[0091] Optionally, between the application layer and the system service layer, the software architecture of the electronic device may also include an application framework layer (FWK) (not shown in the figure). The application framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer. The application framework layer may include some predefined functions. For example, the application framework layer may include a content provider, a view system, a phone manager, a resource manager, etc. The content provider is used to store and retrieve data, making this data accessible to applications in the application layer. The view system includes visual components, such as components that display text, images, documents, etc.; components in the view system can be used to build the user interface of the application. The phone manager is used to provide communication functions for the electronic device.

[0092] The kernel layer provides the core system services of the operating system, such as security, memory management, process management, network protocol stack, and driver models, all of which are implemented based on the kernel layer. The kernel layer also serves as an abstraction layer between the hardware and software stacks. This layer contains many drivers related to electronic devices, including: display drivers; keyboard drivers; mouse drivers; Flash drivers for memory-based devices; camera drivers; audio drivers; Bluetooth drivers; WiFi drivers; and touch drivers.

[0093] HAL (Hardware Interface Layer) is the interface layer between the operating system kernel and the hardware circuitry of an electronic device, and its purpose is to abstract the hardware. For example, HAL can include various sensors, displays, cameras, hardware composers (HWCs), and other hardware components in an electronic device. The HWC is primarily responsible for image compositing and display.

[0094] It should be noted that, Figure 2 This is merely an example of the software architecture of an electronic device, simply listing some layers and software modules, and does not constitute any limitation on the software architecture of the electronic device. In practical applications, the operating system of an electronic device may include other layers, or each layer may include other software modules for implementing one or more functions or services. Furthermore, this application does not limit the specific layer where each software module resides. For example, some system services in the system service layer may be deployed in the application framework layer or in the kernel layer.

[0095] Furthermore, this application does not specifically limit the names of the various software modules in the software structure. For example, in In operating systems, the window management service can be WindowManagerServer (WMS), the layer management service can be the layer management engine (SurfaceFlinger), and the input management service can be InputManagerService. InputManagerService can include modules such as input management (InputManager), event hub (EventHub), and input dispatcher (InputDispatcher). operating system( In an OS, the window management service can be SceneBoard (SCB), the layer management service can be RenderService (RS), and the input management service can be Multimodal Input Service (INPUT).

[0096] The multimodal input service aims to support developers in providing users with a rich variety of human-computer interaction methods. Building upon its continuous improvement in supporting traditional input, the multimodal input service leverages the distributed advantages of OpenHarmony to enhance cross-device interaction and provide system-level support for new scenarios and businesses. The input component of the multimodal input service adopts the OpenHarmony system-level input event management framework, connecting southbound to various input devices (touchscreens, mice, keyboards, remote controls, gamepads, etc.). It aggregates various input events (keyboard events, touch events, click events, etc.), processes them through normalization / standardization, and then distributes them to other system services or applications.

[0097] With the development of electronic technology, applications are becoming increasingly feature-rich and convenient. In some scenarios, an application that a user is currently using can launch another application to provide services to it.

[0098] Currently, there are technologies in the field of electronic device technology that support one application launching another to provide services. Taking the example of a first application launching a second application, the first application can launch the second application through an internal component, thereby embedding the display content of the second application within the window of the first application. The display content of the second application is run through the process of the second application, and the process of the first application does not participate in the layout and rendering of the display content of the second application.

[0099] For example, when a user sets a profile picture, posts a message containing photos, or creates a video in a social media app, the user can activate the photo gallery app, displaying its content within the social media app's window. This allows the user to choose from multiple images or videos. Figure 3AAs shown in (a), in the window of the social application, the user clicks the icon of the gallery application; in response to the user's click, the social application can launch the gallery application and embed and display the content of the gallery application in the window. This content may include pictures or videos saved in the gallery application for the user to select, such as... Figure 3A As shown in (b) above. The display area occupied by the content of the gallery application is the same size as the window of the social application, therefore... Figure 3A The user interface shown in (b) does not display other content of the social application window.

[0100] For example, such as Figure 3B As shown in (a), when a user needs to open a document sent by another user while using a chat application, the user can click on the document icon displayed in the chat application window. In response to the user's click, the chat application can launch a document editor and embed the content of the document editor into the chat application window, so that the document can be opened within the content displayed in the document editor. See [reference needed]. Figure 3B As shown in (b) of the diagram.

[0101] In the scenario described above, where the first application initiates a second application to provide services, the first application is the service user, and the second application is the service provider. In the current input event reporting scheme, when a user performs a user action on the service provider's window, following event bubbling logic, the electronic device's input management service generates an input event based on the user's action and reports it to the service user; the service user then sends the input event to the service provider. Continuing with... Figure 2 Taking the software structure of the illustrated electronic device as an example, during the process of the first application launching the second application, when the user performs a user operation within the window of the first application (embedded with the display content of the second application), the input management service in the system service layer, after receiving the operation information reported by the touch driver or input device driver in the kernel layer, generates an input event based on the received operation information and reports the input event to the first application. When the first application determines that the input event is initiated for the second application, it sends the input event to the second application. The second application then performs subsequent actions based on the input event.

[0102] In the traditional input event reporting schemes described above, the communication between the service provider and the service user is open for the transmission of input events. Some malicious applications, acting as service users, can exploit this process of sending input events to the service provider to simulate user input, sending false or tampered input events to illegally obtain user authorization, access sensitive data, or perform high-risk operations. Such behavior cannot guarantee user data and information security, not only infringing on users' legitimate rights but also seriously affecting the security and stability of the software ecosystem of electronic devices. Therefore, in scenarios where one application launches another to provide services, how to control the reporting of input events to ensure user data and information security is crucial to the user's security experience.

[0103] To eliminate the security risks associated with traditional input event reporting processes and to control the reporting of input events to ensure user data and information security, this application provides an input event reporting method. This method can be applied to, for example... Figure 1 The electronic device shown can have a software structure as follows: Figure 2 As shown. In this embodiment, the electronic device may include: an input management service, a first application, and a second application. The first application and the second application can be any application installed on the electronic device. See below for further details. Figure 4 The flowchart shown below provides a detailed description of the embodiments of this application.

[0104] S401: The input management service receives the operation information of the first operation and generates a first input event based on the operation information of the first operation. The first operation is the operation performed by the user in the window of the first application.

[0105] Prior to S401, the electronic device had already run the first application, and the window of the first application was included in the initial user interface displayed by the electronic device.

[0106] The first operation is used to instruct the first application to launch the second application, so that the second application provides services to the first application. Optionally, the first operation can be an operation performed by the user in the window of the first application. The first operation can be an operation performed on a component in the window of the first application, such as a click, touch, or drag operation performed by the user on the component using a finger, stylus, or other input device (such as a keyboard, mouse, gamepad, etc.), and this application does not limit it in this respect.

[0107] In this embodiment, the input management service can receive operation information of user operations reported by drivers from the kernel layer. The driver reporting the operation information varies depending on how the user performs the operation.

[0108] For example, if a user performs a first operation on the display screen (touchscreen) using their finger or stylus, the operation information for that first operation is sent to the input management service by the touch driver after receiving sensor data from the touch sensor. As another example, if a user performs a first operation in the window of a first application using an input device such as a keyboard or mouse, the operation information for that first operation is generated by the driver of the corresponding input device (e.g., keyboard driver, mouse driver) and sent to the input management service.

[0109] Furthermore, this application does not limit the operation information of user operations. For example, the operation information of user operations may include, but is not limited to, at least one of the following: operation location, operation time, type of component or operation data of the component performing the user operation, and sensor data collected by the sensor. The specific content included in the operation information of user operations will vary depending on factors such as the type of input device used by the user to perform the operation and the method of user operation (click, drag, button, etc.).

[0110] S402: The input management service sends a first input event to the first application to cause the electronic device to display a first user interface. The first user interface is displayed through a window of the first application and includes a target component for displaying content from a second application.

[0111] The first user interface is the user interface displayed after the content of the second application is embedded within the window of the first application.

[0112] In some examples, upon receiving the first input event, the first application can launch a second application based on the first input event, embedding a virtual window of the second application within the window of the first application, so that the second application can provide services to the first application. Here, the virtual window of the second application is not an independent window, but rather display content that needs to be displayed within a specific display area within the window of the first application.

[0113] In some examples, after receiving the first input event, the first application can create a component in its window to display the content of the second application, and then display the content of the second application (i.e., the virtual window of the second application) within that component.

[0114] In this embodiment, the first application is the service user, and the second application is the service provider; the service user can use the services provided by the service provider through the content displayed in the window. The first application may also be called a host application, and the second application may also be called a target application, etc. The second application may be an application that is embedded and launched by the first application.

[0115] It should also be noted that the first application can launch one or more applications through the above steps. That is, the first application can have one or more service providers, and one or more virtual windows of applications can be embedded in the window of the first application.

[0116] S403: The input management service receives the operation information of the second operation and generates a second input event based on the operation information of the second operation. The second operation is the operation performed by the user in the first user interface.

[0117] In this step, the descriptions of the second operation, the operation information of the second operation, and the method by which the input management service receives the operation information of the second operation can be found in the relevant description of the first operation in S401, and will not be repeated here.

[0118] S404: The input management service sends a second input event to the second application. The second application can then perform subsequent actions based on this second input event.

[0119] Through steps S401-S404 above, in scenarios where the first application launches the second application to provide services, the input management service can directly report input events generated by user actions on the user interface to the second application. This allows for control over the reporting of input events, reducing the frequency with which the first application sends input events to the second application. This method can prevent malicious applications, acting as service users, from using the process of sending input events to the service provider to create false or tamper with input events, thus ensuring user data and information security.

[0120] Different types of input events have different security requirements. Therefore, optionally, the input management service can determine the target application to which the input event should be reported based on its event type, thereby controlling the reporting of input events. That is, when executing S404, the input management service can skip the first application and directly send the second input event to the second application based on its event type.

[0121] Optionally, the input management service can report input events using the following event reporting rules:

[0122] For keyboard events that fall within the defined set of security events, the input management service can report them to the service user.

[0123] For keyboard events that do not belong to this set of security events, the input management service can report them in parallel to the service user and the service provider.

[0124] For other types of events (including touch events, click events, etc.), the input management service can determine the target application to which the input event is reported based on the location of the user's operation. Specifically, for touch or click events where the user's operation is located within the hotspot of a service provider, the input management service can report them to that service provider; for touch or click events where the user's operation is not located within the hotspot of any service provider, the input management service can report them to the service user.

[0125] The security event set includes at least one security event that does not set or modify the application or runtime data. Since keyboard events that can move focus (referred to as focus-shifting keyboard events) do not set or modify the application's program and runtime data, the security event set may include focus-shifting keyboard events. For example, the security event set may include at least the following focus-shifting keyboard events:

[0126] Arrow key events, Home key events, Backpress key events, Tab key events, End key events, Esc key events, and window switching shortcut key (Shift+Tab) events.

[0127] In addition, the location information of the hotspot for any service provider is synchronized from the layer management service to the window management service, and then sent by the window management service to the input management service. The hotspot for any service provider is the display area of ​​the service provider's content within the service user's window. Taking the first application and the second application as examples, the hotspot for the second application is the display area of ​​the second application's content within the first application's window.

[0128] In the aforementioned event reporting rules, the input management service reports keyboard events to the service user to ensure responsiveness and a smooth user experience. Since keyboard events within the security event set do not affect the service provider's security, the input management service can follow a traditional input event reporting scheme, first reporting the event to the service user, who then decides whether to send it to the service provider. However, other keyboard events outside the security event set may affect the service provider's security. Therefore, the input management service can distribute these events in parallel to both the service user and the service provider to prevent the service user from sending the event to the service provider. This approach ensures both a smooth user experience and the service provider's security.

[0129] Based on the above event reporting rules, the input management service can execute S404 through any of the following steps:

[0130] When the second input event is a keyboard event and does not belong to the set security event set, the input management service sends the second input event to the second application;

[0131] When the second input event is a touch event or a click event, and the operation position of the second operation is within the hot zone of the second application, the input management service sends the second input event to the second application; wherein, the hot zone of the second application is the display area of ​​the window of the second application within the window of the first application.

[0132] In addition, when the second input event is a keyboard event and does not belong to the set of security events, the input management service can also send the second input event to the first application, thereby sending the second input event to the service provider and the service user in parallel.

[0133] The following is for reference. Figure 5 Steps S4021-S4024 in the flowchart shown below explain how the input management service obtains the location information of the hot zone of the second application:

[0134] S4021: After S402, upon receiving the first input event, the first application creates a target component within its window based on the first input event. This target component is used to display the content of the second application. This target component can also be called a UI extension component.

[0135] S4022: The layer management service obtains the location information of the target component and uses the location of the target component as the hotspot of the second application.

[0136] S4023: The layer management service sends the location information of the hot zone of the second application to the window management service.

[0137] S4024: The window management service sends the location information of the hot zone of the second application to the input management service, and the input management service obtains the location information of the hot zone of the second application.

[0138] The layer management service manages layers, compositing and rendering the corresponding window's image frames within each layer; the window management service manages the display and configuration of windows. For details on the specific functions of the layer management and window management services, please refer to [link to relevant documentation]. Figure 2 The descriptions of layer management services and window management services in the illustrated electronic device software architecture will not be repeated here.

[0139] Optionally, the input management service can also be accessed through... Figure 5Steps S4025-S4027 in the input management service obtain component layout information of the display content of the second application displayed in the target component, so that when the operation of the second operation is within the hot zone of the second application, the input management service can generate a second input event based on the operation information of the second operation and the component layout information. The process by which the input management service obtains the component layout information of the display content of the second application is as follows:

[0140] S4025: After S4021, the layer management service obtains the component layout information of the second application;

[0141] S4026: The layer management service sends the component layout information to the window management service;

[0142] S4027: The window management service sends the component layout information to the input management service.

[0143] The component layout information is used to indicate the layout of the component and may include, but is not limited to, at least one of the following information for at least one component that needs to be deployed: the type of the component, the content or data displayed within the component, and parameters such as the size, color, and position of the component.

[0144] It should be noted that after the first application creates the target component within its window, it sends image frame data to the layer management service. The layer management service then generates the latest image frame for the first application's window based on this image frame data, thereby refreshing the window. Optionally, the layer management service can obtain the target component's position information and the second application's component layout information based on the received image frame data. Therefore, in one implementation, the transmission process of the second application's hotspot position information and component layout information can be combined: S4022 and S4025 are combined, allowing the layer management service to obtain the target component's position information and the second application's component layout information; S4023 and S4026 are combined, allowing the layer management service to send the second application's hotspot position information and component layout information to the window management service; and S4024-S4027 are combined, allowing the window management service to send the second application's hotspot position information and component layout information to the input management service.

[0145] The above describes the process by which the input management service reports input events to the second application. In some implementations, the input management service can also report input events to the service user (i.e., the first application) based on the aforementioned event reporting rules. See below for reference. Figure 6 The process of the input management service reporting input events to the first application is explained as follows:

[0146] S405: The input management service receives the operation information of the third operation and generates a third input event based on the operation information of the third operation. The third operation is the operation performed by the user in the first user interface.

[0147] In this step, the descriptions of the third operation, the operation information of the third operation, and the method by which the input management service receives the operation information of the third operation can be found in the relevant description of the first operation in S401, and will not be repeated here.

[0148] S406: When the third input event is a keyboard event and belongs to a set of security events, the input management service sends the third input event to the first application; or when the third input event is a touch event or click event, and the operation position of the third operation is not within the hot zone of other applications, the input management service sends the third input event to the first application. Here, "other applications" refers to applications other than the first application, including the second application. The first application can perform subsequent actions based on this third input event.

[0149] Optionally, in this embodiment, to ensure security and avoid receiving false or tampered input events from the service user, the service provider will not process input events sent by the service user for a set period of time after receiving an input event from the input management service. Based on this, in one implementation, after S404, the second application receives a fourth input event from the first application within the set period of time after receiving the second input event from the input management service, and the second application discards the fourth input event.

[0150] In summary, this application provides an input event reporting method. In a scenario where a first application launches a second application to provide services, the input management service can directly report the input event to the second application after the user performs an operation on the user interface, thereby controlling the reporting of input events and reducing the frequency of the first application sending input events to the second application. This method can prevent malicious applications, as service users, from using the process of sending input events to the service provider to create false or tamper with input events, ensuring the security of the service provider and thus guaranteeing the security of user data and information.

[0151] based on Figure 4 The method provided in the illustrated embodiments also includes an example of input event reporting. This example uses a device equipped with... This explanation uses the software architecture of an electronic device with an operating system as an example. (See also...) Figure 7 As shown, the application layer of the electronic device includes Application A and Application B, and the system service layer includes Window Management Service (e.g., SCB), Layer Management Service (e.g., RS), and Input Management Service—Multimodal Input Service. The functions of the Window Management Service, Layer Management Service, and Multimodal Input Service can be found in [reference needed]. Figure 2The relevant descriptions of the software structure shown are not repeated here.

[0152] During the process of application A launching application B to provide services, application A creates a UI extension component within its window to display the content of application B. For example, this UI extension component can also be called a Secure UIExtensionComponent (or simply Secure UEC). Through the interaction between application A, application B, and various system services of the electronic device, application B creates a virtual window to display its content within application A's window. For example, this virtual window can also be called a Secure Virtual Window or a Secure Virtual Window client. This UI extension component is used to display the content within application B's virtual window. The process of triggering application A to launch application B can be found in [reference needed]. Figure 4 The descriptions of S401-S402 in the illustrated embodiments will not be elaborated here.

[0153] S701: After the layer management service recognizes the newly added interface extension component in the window of application A, it synchronizes the position information of the interface extension component and the component layout information of the virtual window of application B to the window management module in the window management service.

[0154] The layer management service uses the location of this interface extension component as a hotspot for application B.

[0155] S702: The window management module sends the location information of the interface extension components and the component layout information of the virtual window of application B to the multimodal input service.

[0156] S703: In a scenario where an electronic device displays the first user interface of application B launched by application A, the multimodal input service receives operation information of user actions reported by the kernel layer driver. In the first user interface, a virtual window displaying application B is embedded within the window of application A; this user action is performed by the user within the first user interface. Based on the received operation information of the user action, the multimodal input service generates an input event and determines the target object for reporting the input event based on its event type.

[0157] In implementation, the multimodal input service can report input events according to the event reporting rules provided in the above embodiments, including:

[0158] When the input event is a keyboard event and does not belong to the security event set, the multi-mode input service executes S704a and S704b in parallel, and reports the input event to application A and application B in parallel.

[0159] When the input event is a keyboard event and belongs to the security event set, the multi-mode input service executes S704b to report the input event to application A. Application A then continues to follow the event bubbling logic to decide whether to send the input event to application B.

[0160] When the input event is a touch event or a click event, and the user's operation position is within the hot zone of application B, the multi-mode input service executes S704a to report the input event to application B;

[0161] When the input event is a touch event or a click event, and the user's operation position is not within the hot zone of application B (and not within the hot zone of other applications), the multi-mode input service executes S704b to report the input event to application A.

[0162] In one implementation, the service user can create a component tree and synchronously send it to the system service so that the system service can identify the service provider. The service user can create a corresponding component node for each service provider's virtual window and attach the component node of each service provider's virtual window as a child node under the component node of the corresponding interface extension component.

[0163] In this example, application A launches two applications (application B and application C). Application A will create UI extension component 1 and UI extension component 2 for application B and application C respectively. Application B will create virtual window 1, and application C will create virtual window 2. The component tree created by application A is as follows: Figure 8A As shown.

[0164] Furthermore, service users can also attach components within the virtual window to the component nodes of the virtual window according to the component layout information, so that the system service receiving the component tree can recognize the component layout information within the virtual window. Continuing with the scenario where application A launches applications B and C as an example, the component tree created by application A is shown in Figure 8B.

[0165] Optionally, application A will Figure 8A The component tree shown is sent to the layer management service. The layer management service can determine the virtual window associated with each interface extension component by traversing the component tree (e.g., depth-first traversal), thereby determining the hotspot of each service provider.

[0166] Application A will Figure 8B The component tree shown is sent to the layer management service. The layer management service can traverse the component tree (e.g., depth-first traversal) to determine not only the virtual windows associated with each interface extension component, thus further determining the hotspots of each service provider, but also the component layout information of each virtual window.

[0167] See Figure 9 As shown in (a), in a traditional input event reporting scheme, in a scenario where application A launches application B to provide services, the window management service notifies the input management service of the position information of application A's window. After receiving the user's operation information, the input management service reports the generated input event 1 to application A when the user's operation is located within application A's window. Thus, if the application is malicious, application A can use the process of sending input events to application B to simulate user input and send a fake input event (input event 2) to application B, thereby compromising the security of application B.

[0168] In the solution provided in the embodiments of this application, see [reference]. Figure 9 As shown in (b), the layer management service notifies the window management service of the location information of the hotspot of application B within the window of application A. The window management service also notifies the input management service of the location information of the hotspot of application B within the window of application A, so that the input management service can determine the location of the hotspot of application B within the window of application A. Thus, after receiving the operation information of the user's operation, the input management service can directly report input event 1 to application B based on the event type of the generated input event 1 and the location of the user's operation. Through this scheme, the input management service can control the reporting of input events, reducing the frequency of input event transmission between applications. This prevents malicious applications, acting as service users, from using the process of sending input events to the service provider to create false or tamper with input events, thereby ensuring application security and ultimately guaranteeing the security of user data and information.

[0169] It should be noted that this application does not limit the application scenarios to which the input event reporting scheme provided in the embodiments of this application applies. In this scheme, the service provider and the service user can be any application installed in the electronic device, and are not limited to... Figure 3A and Figure 3B The application scenarios shown.

[0170] It should be noted that when applications and system services installed on an electronic device are running, the electronic device will start corresponding processes. For clarity and conciseness, the above description of the embodiments in this application uses the first application, the second application, and the input management service, layer management service, and window management service as examples of the execution subjects. However, this embodiment does not limit the execution subject of each step. For example, the above-mentioned applications and system services can also be replaced by the application processes and the system service processes.

[0171] It should also be noted that each step in the above embodiments can be executed by the corresponding device, or by components such as chips, processors, or chip systems within that device. The embodiments of this application do not limit their execution. The above embodiments are merely illustrative examples of execution by the corresponding device. Furthermore, the specific implementation methods or examples in the above embodiments do not limit the solutions provided by the embodiments of this application.

[0172] It should be noted that in the above embodiments, some steps may be selected for implementation, and the order of the steps in the figures may be adjusted. This application does not limit this. It should be understood that performing some of the steps in the figures, adjusting the order of the steps, or combining them in a specific implementation all fall within the protection scope of this application.

[0173] It is understood that, in order to achieve the functions described in the above embodiments, each device involved in the above embodiments includes a hardware structure and / or software module corresponding to perform each function. Those skilled in the art should readily recognize that, based on the units and method steps of the various examples described in conjunction with the embodiments disclosed in this application, 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 scenario and design constraints of the technical solution.

[0174] It is understood that the architecture and application scenarios described in the embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of the present invention, and do not constitute a limitation on the technical solutions provided by the embodiments of the present invention. As those skilled in the art will know, with the evolution of network architecture and the emergence of new services, the technical solutions provided by the embodiments of the present invention are also applicable to similar technical problems.

[0175] It should be noted that the "steps" in the embodiments of this application are merely illustrative and are intended to better understand one method of presentation used in the embodiments. They do not constitute a substantial limitation on the execution of the solution of this application. For example, the "step" can also be understood as a "feature". Furthermore, the steps do not constitute any limitation on the execution order of the solution of this application. Any changes to the order of steps, or the merging or splitting of steps made on this basis without affecting the overall solution implementation, resulting in a new technical solution, are also within the scope of disclosure of this application.

[0176] Based on the same concept, embodiments of this application also provide an electronic device. For example... Figure 10As shown, the electronic device includes a display screen 1001, one or more processors 1002, and a memory 1003. Optionally, the electronic device may also include a transceiver 1004. For example, the above-mentioned devices can be connected via one or more communication buses. The one or more computer programs are stored in the memory 1003 and configured to be executed by the one or more processors 1002. The one or more computer programs include instructions that can be used to cause the electronic device to perform various steps of the methods in the above embodiments.

[0177] For example, the above-mentioned one or more processors 1002 may specifically be Figure 1 The processor 110 in the illustrated electronic device 100. The aforementioned memory 1003 can specifically be... Figure 1 The illustrated electronic device 100 includes internal memory 121 and / or external memory connected to the electronic device. The transceiver 1004 can be... Figure 1 The mobile communication module 150 and / or wireless communication module 160 are shown. The aforementioned display screen 1001 can specifically be... Figure 1 The display screen 194 shown is not limited in this embodiment of the application.

[0178] Based on the same concept, embodiments of this application also provide an electronic device, which includes units for performing the various steps of the methods provided in the above embodiments.

[0179] For details on the specific functions of each module, please refer to the above embodiments; they will not be repeated here.

[0180] Based on the above embodiments, this application also provides a computer program product, which includes instructions; when the computer program is run on a computer, it causes the computer to execute the method provided in the above embodiments.

[0181] Based on the above embodiments, this application also provides a computer-readable storage medium storing computer program instructions, which, when executed by a computer, cause the computer to perform the methods provided in the above embodiments.

[0182] Optionally, the aforementioned computer may include, but is not limited to, electronic devices.

[0183] The storage medium can be any available medium that a computer can access. For example, but not limited to, a computer-readable medium can include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer.

[0184] Based on the above embodiments, this application also provides a chip for reading a computer program stored in a memory to implement the method provided in the above embodiments. Optionally, the chip may include a processor and a memory, wherein the processor is coupled to the memory and is used to read the computer program stored in the memory to implement the method provided in the above embodiments.

[0185] Based on the above embodiments, this application provides a chip system including a processor for supporting a computer device in implementing the functions involved in the electronic devices described in the above embodiments. In one possible design, the chip system further includes a memory for storing necessary programs and data of the computer device. This chip system may be composed of chips or may include chips and other discrete components.

[0186] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0187] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0188] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0189] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

Claims

1. An input event reporting method applied to an electronic device, comprising: The method comprises: The input management service generates a first input event according to operation information of a received first operation; the first operation is an operation performed by a user in a window of a first application; The input management service sends the first input event to the first application, so that the electronic device displays a first user interface; wherein the first user interface is displayed through the window of the first application, and the first user interface comprises a target component for displaying display content of a second application; The input management service generates a second input event according to operation information of a received second operation; the second operation is an operation performed by a user in the first user interface; The input management service sends the second input event to the second application.

2. The method of claim 1, wherein, The input management service sends the second input event to the second application, comprising: The input management service skips the first application and directly sends the second input event to the second application according to an event type of the second input event.

3. The method of claim 1 or 2, wherein, The input management service sends the second input event to the second application, comprising: When the second input event is a keyboard event and the second input event does not belong to a set of security events, the input management service sends the second input event to the second application; wherein the set of security events comprises at least one security event that does not set or modify the second application and running data; or When the second input event is a touch event or a click event, and an operation position of the second operation is located in a hot area of the second application, the input management service sends the second input event to the second application; the hot area of the second application is a display area of the display content of the second application in the window of the first application.

4. The method of claim 3, wherein, The method further comprises: When the second input event is a keyboard event and the second input event does not belong to the set of security events, the input management service sends the second input event to the first application.

5. The method of claim 3 or 4, wherein, The method further comprises: The first application creates the target component in the window of the first application according to the first input event; The layer management service takes a position of the target component as a hot area of the second application, and sends position information of the hot area of the second application to a window management service; wherein the layer management service is used for managing layers and compositing and rendering image frames of corresponding windows in each layer; and the window management service is used for managing display and configuration of windows; The window management service sends the position information of the hot area of the second application to the input management service; The input management service acquires the position information of the hot area of the second application.

6. The method of claim 5, wherein, The method further comprises: The layer management service acquires component layout information of the second application, and sends the component layout information to the window management service; The window management service sends the component layout information to the input management service; The input management service acquires the component layout information; The input management service generates a second input event according to operation information of a received second operation, comprising: When the operation position of the second operation is located in the hot area of the second application, the input management service generates the second input event according to the operation information of the second operation and the component layout information.

7. The method according to any one of claims 3 to 6, wherein, The method further comprises: The input management service receives operation information of a third operation, and generates a third input event according to the operation information of the third operation; the third operation is an operation performed by a user on the first user interface; When the third input event is a keyboard event and the third input event belongs to the set of safe events, the input management service sends the third input event to the first application; or When the third input event is a touch event or a click event, and the operation position of the third operation is not located in a hot area of another application, the input management service sends the third input event to the first application; the another application is an application other than the first application, and the another application includes the second application.

8. The method according to any one of claims 1 to 7, wherein, The method further comprises: The second application receives a fourth input event from the first application within a set time period after receiving the second input event from the input management service; The second application discards the fourth input event.

9. An electronic device, comprising: The electronic device comprises: a display screen configured to display a user interface; a memory configured to store computer program instructions; a processor configured to execute the computer program instructions to support the electronic device to implement the method according to any one of claims 1-8.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium has stored thereon computer program instructions which, when executed by processing circuitry, implement the method according to any one of claims 1-8.

11. A computer program product comprising instructions, characterized in that, When the computer program product is run on a computer, the computer is caused to perform the method according to any one of claims 1-8.