Operation identification method and device

By identifying operations based on the stylus sliding distance and duration on the terminal device, the problem that sliding operations are misidentified as click operations is solved, and the accuracy of window closing is improved.

CN117472220BActive Publication Date: 2024-11-19HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311199825.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-15
Publication Date
2024-11-19
Estimated Expiration
2043-09-15

AI Technical Summary

Technical Problem

When the terminal device is processing the stylus sliding operation, due to the large number of reports and there may be jitter, the sliding operation is mistakenly recognized as a click operation, and the non-full-screen window cannot be closed correctly.

Method used

Set the sliding distance threshold and duration threshold to distinguish the sliding operation and click operation by displaying a non-full screen window on the terminal device and determining whether to close the window based on the sliding distance and operation duration of the stylus.

Benefits of technology

It effectively reduces the situation where sliding operations are mistakenly recognized as click operations, improves the accuracy of operation recognition, and ensures that the user can close the window correctly.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117472220B_ABST
    Figure CN117472220B_ABST
Patent Text Reader

Abstract

An embodiment of the present application provides an operation identification method and apparatus, which relate to the field of terminal technology, wherein a terminal device displays a first interface, the first interface including a first control; the terminal device receives a first operation on the first control; in response to the first operation, the terminal device displays a first window on an upper layer of the first interface, the first window being a non-full-screen window; when the terminal device receives a second operation of a stylus on the first window, the terminal device can determine whether to close the first window based on detection of a sliding distance and an operation duration in the second operation, so as to reduce the situation in which a sliding operation is identified as a click operation and the first window cannot be closed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to an operation identification method and device. Background Art

[0002] With the popularization and development of the Internet, people's functional requirements for terminal devices are becoming more and more diverse. For example, in order to simplify the way of using electronic devices, stylus pens have gradually become an important tool for inputting data into terminal devices or controlling terminal devices.

[0003] Typically, a terminal device can recognize a sliding operation or a clicking operation of a stylus on a display screen, and execute corresponding steps according to the recognized operation.

[0004] However, in response to the sliding operation of the stylus on the display screen, since the stylus reports a large number of points and there may be jitter in the reporting points, the terminal device recognizes multiple events reported by the stylus during the sliding operation as click events, resulting in the user being unable to select. Summary of the invention

[0005] An embodiment of the present application provides an operation recognition method and apparatus, by which a terminal device can pop up a non-full-screen first window from the bottom of an interface, and determine whether to close the first window based on a sliding distance and duration of an operation performed by a stylus on the first window, so as to reduce the situation in which a sliding operation is recognized as a click operation and the first window cannot be closed.

[0006] In a first aspect, an embodiment of the present application provides an operation identification method, the method comprising: a terminal device displays a first interface, the first interface including a first control; the terminal device receives a first operation on the first control; in response to the first operation, the terminal device displays a first window on an upper layer of the first interface, the first window being a non-full-screen window; when the terminal device receives a second operation of a stylus on the first window, if a sliding distance in the second operation is less than a first threshold and a duration of the second operation is greater than a second threshold, the terminal device continues to display the first window; when the terminal device receives a third operation of the stylus on the first window, if a sliding distance in the third operation is greater than the first threshold and a duration of the third operation is greater than the second threshold, the terminal device closes the first window.

[0007] The first window may be the target window described in the embodiment of the present application.

[0008] In this way, when the terminal device displays the first window, the terminal device can determine whether to close the first window based on the detection of the sliding distance and operation duration in the second operation, so as to reduce the situation where the sliding operation is recognized as a click operation and the first window cannot be closed.

[0009] In a possible implementation manner, the first threshold is positively correlated with a screen size of the terminal device, or the first threshold is positively correlated with a screen resolution of the terminal device.

[0010] It is understandable that the larger the screen size, the more reported points uploaded by the stylus during the same operation, and the larger the screen resolution, the more obvious the jitter of the reported points uploaded by the stylus during the same operation. Therefore, in order to achieve better recognition effects in devices with different screen resolutions (or screen sizes), the terminal device can match different first thresholds for devices with different screen resolutions (or screen sizes).

[0011] In a possible implementation, the first interface is an interface in a file management application, the first interface includes at least one file or folder, the at least one file or folder may include a first file, and the terminal device receives a first operation for a first control, including: when the first file is selected, the terminal device receives the first operation for the first control.

[0012] In this way, in a scenario where the terminal device selects the first file and opens the first window, the terminal device can implement function settings for the first file through the first window.

[0013] In a possible implementation, when the first control is a control for moving a file or / folder, the first window displays path information for moving the file or folder; or, when the first control is a control for copying a file or / folder, the first window displays path information for copying the file or folder; when the first control is a control for compressing a file or folder, the first window displays one or more of the following: a text box for setting a compressed package name, a control for setting a compression format, or a control for setting a compressed package storage location, etc.

[0014] It can be understood that moving (or copying, or compressing) files or folders can pull up the first window. When the terminal device displays the first window, the terminal device can identify the second operation in the first window to reduce the situation where the sliding operation is identified as a click operation and the first window cannot be closed.

[0015] In one possible implementation, the terminal device displays the first interface, including: the terminal device displays a second interface, in which a card of a file management application is displayed; when the terminal device receives an operation on the card of the file management application, the terminal device displays a second window in the second interface, and the second window includes a control for editing the card; when the terminal device receives an operation on the control for editing the card, the terminal device displays the first interface, the first control is a control for selecting a folder, and at least one folder in the file management application is displayed in the first window.

[0016] It can be understood that when displaying a card of a file management application, the terminal device can pull up the first window by setting the folder displayed in the card of the file management application. When the terminal device displays the first window, the terminal device can reduce the situation where the sliding operation is recognized as a click operation and the first window cannot be closed by recognizing the second operation in the first window.

[0017] In one possible implementation, the terminal device displays the first interface, including: the terminal device displays a third interface, and a card of a note application is displayed in the third interface; when the terminal device receives an operation on a card of the note application, the terminal device displays a third window in the third interface, and the third window includes a control for editing the card; when the terminal device receives an operation on the control for editing the card, the terminal device displays the first interface, the first control is a control for selecting a note, and at least one note in the note application is displayed in the first window.

[0018] It can be understood that when a note card is displayed, the terminal device can pull up the first window by setting the note content displayed in the note card. When the terminal device displays the first window, the terminal device can reduce the situation where the sliding operation is recognized as a click operation and the first window cannot be closed by recognizing the second operation in the first window.

[0019] In a possible implementation, when the second operation includes: a pressing operation of the stylus pen on the first window and a sliding operation of the stylus pen on the first window, the sliding distance is the distance between the pressing operation and the sliding operation, and the duration of the second operation is the difference between the time of the pressing operation and the time of the sliding operation.

[0020] In this way, the terminal device can calculate the sliding distance and the duration of the second operation based on the pressing operation and the sliding operation in the second operation, thereby reducing the problem of inaccurate identification of the sliding operation determined by only using the sliding distance in the existing method.

[0021] In a possible implementation, a file management application is provided in the terminal device. Before the terminal device closes the first window, the method further includes: the file management application determines that the sliding operation is processed by the first parent view view in the first window, and the first parent view is the largest view in the first window.

[0022] In a possible implementation, the first parent view includes at least one child view, the at least one child view includes a first child view, and before the terminal device continues to display the first window, the method further includes: the file management application determines that the first child view handles the sliding operation.

[0023] It can be understood that the first parent view in the first window can intercept the second operation. When intercepting, the first parent view can call onTouchEvent() to process the second operation. When interception is not possible, the first parent view can pass the event corresponding to the second operation to the child view of the first parent view for processing.

[0024] In a possible implementation, the terminal device is further provided with: a user interface tool UIkit, and an input module. After responding to the first operation, the method further includes: the input module sends an event corresponding to the first operation to the file management application; the file management application calls a first instruction to pull up the first window based on the event corresponding to the first operation; the file management application calls a second instruction to obtain the HwBottomsheet object from the UIkit, and the HwBottomsheet object includes the layout information of the first window, the context information of the first window and the style attribute information of the first window; the file management application sets the state of the HwBottomsheet object to visible.

[0025] In this way, the file management application can pull up the first window through the HwBottomsheet object obtained from UIkit.

[0026] In a possible implementation, after the terminal device closes the first window, the method further includes: the terminal device continues to display the first interface.

[0027] In a second aspect, an embodiment of the present application provides an operation identification device, which includes a display unit and a processing unit. The display unit is used to display a first interface, which includes a first control; the processing unit is used to receive a first operation on the first control; in response to the first operation, the display unit is also used to display a first window on the upper layer of the first interface, and the first window is a non-full-screen window; when the terminal device receives a second operation of the stylus on the first window, if the sliding distance in the second operation is less than the first threshold and the duration of the second operation is greater than the second threshold, the display unit is also used to continuously display the first window; when the terminal device receives a third operation of the stylus on the first window, if the sliding distance in the third operation is greater than the first threshold and the duration of the third operation is greater than the second threshold, the processing unit is also used to close the first window.

[0028] In a third aspect, an embodiment of the present application provides a terminal device, including a processor and a memory, the memory being used to store code instructions; the processor being used to run the code instructions so that the terminal device executes the method described in the first aspect or any one of the implementations of the first aspect.

[0029] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores instructions. When the instructions are executed, the computer executes the method described in the first aspect or any one of the implementations of the first aspect.

[0030] In a fifth aspect, a computer program product includes a computer program, and when the computer program is executed, the computer executes the method described in the first aspect or any one of the implementations of the first aspect.

[0031] It should be understood that the second to fifth aspects of the present application correspond to the technical solutions of the first aspect of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 A schematic diagram of a scenario provided for an embodiment of the present application;

[0033] Figure 2 A schematic diagram of the hardware structure of a terminal device provided in an embodiment of the present application;

[0034] Figure 3 A schematic diagram of the software structure of a terminal device provided in an embodiment of the present application;

[0035] Figure 4 A schematic diagram of an interface for pulling up a target window provided in an embodiment of the present application;

[0036] Figure 5A schematic diagram of another interface for pulling up a target window provided in an embodiment of the present application;

[0037] Figure 6 A schematic diagram of another interface for pulling up a target window provided in an embodiment of the present application;

[0038] Figure 7 A flowchart of an operation identification method provided in an embodiment of the present application;

[0039] Figure 8 A schematic diagram of module interaction of an operation identification method provided in an embodiment of the present application;

[0040] Fig. 9 A schematic diagram of an interface illustrating a view provided in an embodiment of the present application;

[0041] Fig.10 A schematic diagram of the structure of an operation identification device provided in an embodiment of the present application;

[0042] Fig.11 A schematic diagram of the hardware structure of another terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0043] In order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. For example, the first value and the second value are only used to distinguish different values, and do not limit their order. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit them to be different.

[0044] It should be noted that, in this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in this application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0045] In the present application, "at least one" means one or more, and "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers 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 mean: a, b, c, a and b, a and c, b and c, or a, b and c, where a, b, c can be single or multiple.

[0046] For example, Figure 1 A schematic diagram of a scenario provided in an embodiment of the present application. Figure 1 In the corresponding embodiment, a terminal device being a tablet is taken as an example for illustration, and this example does not constitute a limitation on the embodiments of the present application.

[0047] The terminal device displays Figure 1 The interface shown in a in the figure may be an interface in a file management application, and the interface may display at least one file or folder, such as displaying a new folder 1, a new folder 2, a document 1, and a document 2.

[0048] When the terminal device receives a long press operation of the user or the stylus on the location of the document 1, the terminal device displays the following Figure 1 The interface shown in b in the figure may display: controls for sharing files or folders, controls for setting labels, controls 101 for moving files or folders (or called move controls 101), controls for deleting files or folders, and controls for opening more functions, etc. In this interface, document 1 is selected, and other files / or folders are not selected.

[0049] When the terminal device receives a click operation of the user or the stylus on the mobile control 101, the terminal device can pop up a window (or card) 102 from the bottom of the display screen and display the following information: Figure 1 In the interface shown in c in FIG. 1 , the window 102 may be a non-full screen control, and the window 102 may be closed in response to the downward sliding operation of the stylus. The window 102 may include one or more of the following: a control for selecting a moving path (such as a control displayed as the word "Preview" and a control displayed as the word "My Tablet"), a control 103 for closing the window, a control for confirming the move, etc., which is not limited in the embodiments of the present application.

[0050] When the terminal device receives a downward sliding operation of the stylus on the window 102, the terminal device may recognize the downward sliding operation as a click operation, so that the terminal device can respond to the click operation and display the corresponding content without closing the window 102. Alternatively, when the terminal device receives a click operation of the stylus on the window 102, the terminal device may recognize the click operation as a sliding operation, so that the terminal device closes the window 102 or slides to display other content in the interface.

[0051] For example, the terminal device may set the sliding distance threshold to a value greater than 0dp, such as 1dp or 2dp. When the terminal device receives a downward sliding operation of the stylus pen on the window 102, the terminal device may confirm that the downward sliding operation is a sliding operation when the sliding distance is greater than the sliding distance threshold. In this scenario, since the stylus pen reports more points, when the downward sliding operation of the stylus pen is slower, the terminal device may recognize the slower downward sliding operation as a continuous click operation, resulting in the inability to close the window 102. Wherein, in the case of 160 pixel density as the reference, 1dp = 1 pixel (px).

[0052] Alternatively, the terminal device may set the sliding distance threshold to 0dp, and when the terminal device receives a click operation of the stylus on the window 102, if the terminal device detects that the sliding distance is not greater than the sliding distance threshold, it may be determined as a click operation. In this scenario, since the stylus point reporting is jittery, the terminal device may determine that the sliding distance is greater than the sliding distance threshold based on at least two events reported during the jitter, and recognize it as a sliding operation, resulting in the control being unable to be selected.

[0053] In view of this, the embodiment of the present application provides an operation recognition method, in which, when a terminal device pops up a non-full-screen first window from the bottom of the interface, the terminal device can determine whether to close the first window according to the sliding distance and operation duration of the stylus in the operation on the first window, so as to reduce the situation where the sliding operation is recognized as a click operation and the first window cannot be closed, and improve the accuracy of operation recognition. The first window can be the target window described in the embodiment of the present application.

[0054] It is understandable that the above-mentioned terminal device can also be called terminal, user equipment (UE), mobile station (MS), mobile terminal (MT), etc. The terminal device can be a mobile phone with a touch screen, a smart TV, a wearable device, a tablet computer (Pad), a computer with wireless transceiver function, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote medical surgery, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city, a wireless terminal in smart home, etc. The embodiments of the present application do not limit the specific technology and specific device form adopted by the terminal device.

[0055] Therefore, in order to better understand the embodiment of the present application, the structure of the terminal device of the embodiment of the present application is introduced below. Figure 2 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application.

[0056] The terminal 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, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, an indicator 192, a camera 193, and a display screen 194, etc.

[0057] Among them, the sensor module 180 may include one or more of the following: pressure sensor, gyroscope sensor, air pressure sensor, magnetic sensor, acceleration sensor, distance sensor, proximity light sensor, fingerprint sensor, temperature sensor, touch sensor, ambient light sensor, or bone conduction sensor, etc., which is not specifically limited in the embodiments of the present application.

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

[0059] The processor 110 may include one or more processing units. Different processing units may be independent devices or integrated into one or more processors. The processor 110 may also be provided with a memory for storing instructions and data.

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

[0061] The charging management module 140 is used to receive charging input from a charger, which may be a wireless charger or a wired charger. The power management module 141 is used to connect the charging management module 140 to the processor 110 .

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

[0063] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. The antenna in the terminal device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antenna.

[0064] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to terminal devices. The mobile communication module 150 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, etc. the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.

[0065] The wireless communication module 160 can provide wireless communication solutions applied to terminal devices, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), etc.

[0066] The terminal device realizes the display function through the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, connecting the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering.

[0067] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In some embodiments, the terminal device may include 1 or N display screens 194, where N is a positive integer greater than 1.

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

[0069] The camera 193 is used to capture static images or videos. In some embodiments, the terminal device may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0070] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the terminal device. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos can be stored in the external memory card.

[0071] The internal memory 121 can be used to store computer executable program codes, and the executable program codes include instructions. The internal memory 121 can include a program storage area and a data storage area.

[0072] The terminal device can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor.

[0073] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. Speaker 170A, also known as "speaker", is used to convert audio electrical signals into sound signals. The terminal device can listen to music or listen to hands-free calls through speaker 170A. Receiver 170B, also known as "earpiece", is used to convert audio electrical signals into sound signals. When the terminal device answers a call or voice message, the voice can be answered by placing receiver 170B close to the human ear. Headphone interface 170D is used to connect wired headphones. Microphone 170C, also known as "microphone" or "microphone", is used to convert sound signals into electrical signals. In an embodiment of the present application, the terminal device may have a microphone 170C.

[0074] The pressure sensor is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor can be set on the display screen 194. The gyroscope sensor can be used to determine the motion posture of the terminal device. The air pressure sensor is used to measure the air pressure. The magnetic sensor includes a Hall sensor. The acceleration sensor can detect the magnitude of the acceleration of the terminal device in all directions (generally three axes). Distance sensor, used to measure the distance. The proximity light sensor can include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The ambient light sensor is used to sense the brightness of the ambient light. The fingerprint sensor is used to collect fingerprints. The temperature sensor is used to detect the temperature. The touch sensor, also known as a "touch device". The bone conduction sensor can obtain vibration signals.

[0075] The touch sensor may be provided on the display screen 194, and the touch sensor and the display screen 194 form a touch screen, or a "touch screen". In the embodiment of the present application, a capacitive sensing node grid (hereinafter referred to as a capacitive sensor) may be provided in the touch screen. When the terminal device determines that the value of the capacitance in at least one grid received by the capacitive sensor exceeds the capacitance threshold, it may be determined that a touch operation has occurred; further, the terminal device may determine the touch area corresponding to the touch operation based on the area occupied by at least one grid exceeding the capacitance threshold.

[0076] The button 190 includes a power button, a volume button, etc. The button 190 may be a mechanical button. It may also be a touch button. The terminal device may receive the button input and generate a key signal input related to the user settings and function control of the terminal device. The indicator 192 may be an indicator light, which may be used to indicate the charging status, power change, message, missed call, notification, etc.

[0077] The software system of the terminal device can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture, etc., which will not be elaborated here.

[0078] For example, Figure 3 A software structure diagram of a terminal device provided in an embodiment of the present application. Figure 3 As shown, the layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into multiple layers, from top to bottom, including the application (APP) layer, the application framework (framework) layer, the hardware abstraction layer (HAL), and the kernel layer (kernel), etc., which is not limited in the embodiments of the present application.

[0079] The application layer may include a series of application packages. The application layer may include one or more of the following: file management applications, user interface tools (UESR interface kit, UIkit), Bluetooth, or telephone applications, etc., which are not limited in the embodiments of the present application.

[0080] UIkit can define the frames of graphical interface elements for applications. For example, the elements that users operate on the screen and interact with the application can be defined by classes in UIkit.

[0081] The application framework layer provides application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined interfaces. The application framework layer may include one or more of the following: input module, display composition system (surfaceflinger), window manager, content provider, resource manager, view system, or notification manager, etc.

[0082] The input module is used to transmit the event information generated by the operation to modules such as the file management application.

[0083] The window manager is used to manage window programs. For example, the window manager can be used to apply for the foreground window, obtain the display screen size, determine whether there is a status bar, lock the screen, touch the screen, drag the screen, capture the screen, etc.

[0084] The display synthesis system is used to switch frame rates and synthesize layers.

[0085] Content providers are used to store and retrieve data and make it accessible to applications. Data can include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc. The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to build applications. The display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying pictures. The resource manager provides various resources for applications, such as localized strings, icons, pictures, layout files, video files, and so on.

[0086] The purpose of the hardware abstraction layer is to abstract the hardware, and to provide a unified interface for querying hardware devices for upper-layer applications, or to provide data storage services for upper-layer applications. The hardware abstraction layer may include modules such as the hardware composer (HWC).

[0087] The kernel layer is the layer between hardware and software. The kernel layer is used to drive the hardware to make it work. The kernel layer may include one or more of the following: display driver, camera driver, or sensor driver, etc.

[0088] In the embodiments of the present application, no specific limitation is imposed on the software layers involved in the software architecture, the modules contained in the layers, and the functions of the modules.

[0089] The following specific embodiments are used to describe in detail the technical solution of the present application and how the technical solution of the present application solves the above technical problems. The following specific embodiments can be implemented independently or in combination with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0090] In order to implement the operation recognition method provided in the embodiment of the present application, the embodiment of the present application provides an example of the scenario of the target window in the operation recognition method (see Figure 4-Figure 6 Corresponding embodiment), the target window can be a non-full screen window, and the target window can be closed when the terminal device determines that a downward sliding operation is detected.

[0091] The target window may be generated by the terminal device through a trigger operation of the stylus on the note card on the desktop (see Figure 4 Corresponding embodiments), or the target window can be generated by the terminal device through the trigger operation of the stylus on the file management card on the desktop (see Figure 5 Corresponding embodiments), or the target window can be generated by the terminal device through the stylus for the trigger operation of the move control (or copy control, or compression control) in the file management (or Figure 6Corresponding embodiment), the embodiment of the present application does not limit the specific method of pulling up the target window.

[0092] In one implementation, Figure 4 A schematic diagram of an interface for pulling up a target window provided in an embodiment of the present application.

[0093] The terminal device displays Figure 4 The interface shown in a in the figure may be the desktop of the terminal device, and may display one or more of the following: a note card 401, a file management card, an icon of a setting application, an icon of a file management application, or an application icon in a fixed bar, etc.

[0094] When the terminal device receives a long press operation of the user or the stylus on the note card 401, the terminal device displays the following Figure 4 The interface shown in b in FIG. 4 may display a card 402, and the card 402 may display: a control for removing a card, a control for viewing more note cards, and a control for editing a card.

[0095] When the terminal device receives a click operation from the user or the stylus on the control for editing the card, the terminal device displays the following Figure 4 The interface shown in c in FIG. 4 shows a window 403 . The window 403 is used to edit the content displayed on the note card. The window 403 may display a control 404 for viewing all notes.

[0096] When the terminal device receives a click operation on the control 404 by the user or the stylus, the terminal device can pop up a target window 405 from the bottom of the interface, and the target window 405 can display: a control for closing the window (located in the top middle position of the target window 405), at least one note allowed to be displayed in the note card, such as unclassified notes, travel notes, personal notes, etc., which is not limited to this in the embodiments of the present application.

[0097] When the terminal device displays the target window 405, in response to a downward sliding operation of the stylus pen in the target window 405, the terminal device can close the target window 405, or in response to a click operation of the stylus pen on any control in the target window 405, the terminal device can select the control corresponding to the click operation.

[0098] In another implementation, Figure 5 A schematic diagram of another interface for pulling up a target window provided in an embodiment of the present application.

[0099] The terminal device displays Figure 5The interface shown in a in the figure may be the desktop of the terminal device, and the interface may display a file management card 501. Other contents displayed in the interface may refer to Figure 4 The interface shown in a in FIG. 1 is not described in detail here.

[0100] When the terminal device receives a long press operation of the user or the stylus on the file management card 501, the terminal device displays the following Figure 5 The interface shown in b in the figure may display a card 502, and the card 502 may display: a control for removing a card, a control for viewing more note cards, and a control for editing a card.

[0101] When the terminal device receives a click operation from the user or the stylus on the control for editing the card, the terminal device displays the following Figure 5 The interface shown in c in the figure shows a window 503, which is used to edit the content displayed in the file management card. The window 503 may display: a control for displaying folders intelligently recommended by the terminal device in the file management card, a card for displaying a specified folder in the file management card, and a control 504 for selecting a folder, which may be a control displayed as "Download Manager", which may be one of the folders in the file management application, or a control displayed as "Share", which may be one of the folders in the file management application.

[0102] When the terminal device receives a click operation on the control 504 by the user or the stylus, the terminal device can pop up a target window 505 from the bottom of the interface, and the target window 505 can display: a control for closing the window (located in the top middle position of the target window 505), at least one control corresponding to a folder allowed to be displayed in the file management card, such as my folder control, my tablet folder control, favorite folder control, download manager folder control, shared folder control, recorder folder control, browser folder control, WLAN direct connection folder control, and print assistant folder control, etc., which are not limited in the embodiments of the present application. Figure 4 In the interface shown in d, the download manager folder control is selected.

[0103] When the terminal device displays the target window 505, in response to a downward sliding operation of the stylus pen in the target window 505, the terminal device can close the target window 505, or in response to a click operation of the stylus pen on any control in the target window 505, the terminal device can select the control corresponding to the click operation.

[0104] In another implementation, Figure 6 A schematic diagram of another interface for pulling up a target window provided in an embodiment of the present application.

[0105] The terminal device displays Figure 6 The interface shown in a in the figure may be the desktop of the terminal device, and the file management card 601 may be displayed in the interface. Other contents displayed in the interface may be referred to in Figure 4 The interface shown in a in FIG. 1 is not described in detail here.

[0106] When the terminal device receives a click operation of the user or the stylus on the file management card 601, the terminal device displays the following Figure 6 The interface shown in b in the figure may be an interface in a file management application. The content displayed in the interface may be referred to in Figure 1 The interface shown in a in FIG. 1 is not described in detail here.

[0107] When the terminal device receives a long press operation of the user or the stylus on the location of the document 1, the terminal device displays the following Figure 6 The interface shown in c in FIG. 6 may display a mobile control 602. Figure 6 The contents displayed in the interface shown in c can be found in Figure 1 The interface shown in b will not be described here.

[0108] When the terminal device receives a click operation from the user or the stylus on the mobile control 101, the terminal device can pop up a target window 604 from the bottom of the display screen and display the following: Figure 6 In the interface shown in d, the Figure 6 The contents displayed in the interface shown in d can be found in Figure 1 The interface shown in c will not be described here.

[0109] In possible implementations, Figure 6 In the case where the document 1 in the interface shown in c is selected, when the terminal device receives a click operation from the user or the stylus pen on the control 603 for opening more functions, the terminal device displays the following Figure 6 The interface shown in e. Figure 6 The interface shown in e in FIG. 5 may include at least one functional control for processing files or folders, for example: a control 605 for copying files or folders, a control 606 for compressing files or folders, a collection control, or a rename control, etc.

[0110] When the terminal device receives a click operation on the control 605 by the user, the terminal device may pop up a target window 607 from the bottom of the display screen and display the following: Figure 6In the interface shown in f, the target window 607 is used to determine the path to copy the file or folder.

[0111] Alternatively, when the terminal device receives a click operation on the control 606 by the user, the terminal device may pop up a target window for compressing the file or folder from the bottom of the display screen, and the target window for compressing the file or folder may display one or more of the following: a text box for setting a compressed package name, a control for setting a compression format, or a control for setting a compressed package storage location, etc. Figure 6 Not shown.

[0112] When the terminal device displays the target window 604 (or the target window 607, or the target window for compressing files or folders), in response to a downward sliding operation of the stylus pen in the target window 604, the terminal device can close the target window 604, or in response to a click operation of the stylus pen on any control in the target window 604, the terminal device can select the control corresponding to the click operation.

[0113] It is understandable that the method of pulling up the target window in the operation identification method provided in the embodiment of the present application is not limited to Figure 4-Figure 6 Corresponding embodiments, the embodiments of the present application do not make specific limitations on this.

[0114] In a possible implementation, the operation recognition method provided in the embodiment of the present application can also be applied to a scenario where a terminal device switches pen types in a note-taking application, so that the terminal device can accurately recognize the triggering operation of the stylus in the note-taking application.

[0115] exist Figure 4-Figure 6 In a corresponding embodiment, on the basis of the terminal device displaying the target window, the terminal device may, upon receiving a trigger operation of the stylus pen on the target window, Figure 7 A corresponding embodiment determines whether to close the target window.

[0116] For example, Figure 7 The following is a flow chart of an operation identification method provided in an embodiment of the present application. Figure 7 As shown, the operation identification method may include the following steps:

[0117] S701: A terminal device receives a first trigger operation for a target window.

[0118] The first trigger operation may be any operation of the stylus on the target window, such as a press (down) operation of the stylus on the target window.

[0119] S702: The terminal device determines whether the first trigger operation is a pressing operation.

[0120] The terminal device can use the operation information in the first trigger operation to determine whether the first trigger operation is a pressing operation. For example, the operation information of the first trigger operation may include: the trigger time of the first trigger operation, the coordinates of the first trigger operation, and the operation type of the first trigger operation. The operation type may include: down type, slide (move) type and lift (up) type.

[0121] When the terminal device determines that the first trigger operation is of the down type based on the operation information of the first trigger operation, the terminal device may determine that the first trigger operation is a press operation. When the first trigger operation is a press operation, the terminal device executes the steps shown in S703, or when the first trigger operation is not a press operation, the terminal device does not execute the operation identification method provided in the embodiment of the present application.

[0122] S703: The terminal device initializes the operation start position and operation start time.

[0123] The operation starting position described in S703 can be the vertical coordinate in the coordinates of the first trigger operation, for example, the terminal device can determine the operation starting position lastYPos through event.getRawY(); the operation starting time described in S703 can be the trigger time of the first trigger operation, for example, the terminal device can determine the operation starting time lastTime through event.getEventTime().

[0124] S704: The terminal device receives a second trigger operation for the target window.

[0125] The second trigger operation may be any operation of the stylus on the target window, such as a sliding (move) operation of the stylus on the target window.

[0126] S705. The terminal device determines whether the second trigger operation is a sliding operation.

[0127] The operation information of the second trigger operation may include: the trigger time of the second trigger operation, the coordinates of the second trigger operation, and the operation type of the second trigger operation.

[0128] When the terminal device determines that the second trigger operation is a move type in the operation information based on the second trigger operation, the terminal device can determine that the second trigger operation is a sliding operation. When the second trigger operation is a sliding operation, the terminal device executes the steps shown in S706, or when the second trigger operation is not a sliding operation, the terminal device executes the steps shown in S713.

[0129] S706: The terminal device determines whether the first sliding distance is greater than a third threshold.

[0130] The third threshold may be determined based on the screen size of the terminal device, and the third threshold is positively correlated with the screen size, that is, the larger the screen size, the larger the value of the third threshold.

[0131] In a possible implementation, the third threshold may also be determined based on the screen resolution of the terminal device, and the third threshold is positively correlated with the screen resolution.

[0132] The first sliding distance may be determined based on lastYPos and the ordinate in the coordinates of the second trigger operation, that is, the first sliding distance may be the value obtained by subtracting lastYPos from the ordinate in the coordinates of the second trigger operation. The terminal device may use the upper left corner of the display screen as the starting position of the coordinates (0,0), and the ordinate value gradually increases when sliding down, and gradually decreases when sliding up.

[0133] When the first sliding distance is greater than the third threshold, the terminal device executes the step shown in S710; or, when the first sliding distance is less than or equal to the third threshold, the terminal device executes the step shown in S707.

[0134] S707: The terminal device determines whether the first duration is greater than the second threshold.

[0135] The first duration may be determined based on lastTime and the trigger time of the second trigger operation, that is, the first duration may be a value obtained by taking the absolute value of the trigger time of the second trigger operation minus lastTime. When the first duration is greater than the second threshold, the terminal device executes the step shown in S708; or, when the first duration is less than or equal to the second threshold, the terminal device executes the step shown in S709.

[0136] The second threshold value may be determined by the terminal device based on the operation duration of the mobile phone simulating the sliding operation.

[0137] It can be understood that when the sliding distance of the operation is short and the operation duration is short, the operation is more likely to be a click operation.

[0138] S708. The terminal device determines whether the second sliding distance is greater than the first threshold.

[0139] The first threshold may be determined based on the screen resolution of the terminal device, that is, the higher the screen resolution is, the larger the value of the first threshold is. The first threshold may be smaller than the third threshold.

[0140] In a possible implementation, in combination with the steps shown in S706 and S708, when the first threshold is less than the third threshold, the value of the third threshold can be positively correlated with the screen size (or screen resolution), and the value of the first threshold can also be positively correlated with the screen size (or screen resolution), which is not limited in the embodiments of the present application.

[0141] It can be understood that the larger the screen resolution, the more obvious the jitter of the point reporting uploaded by the stylus during the same operation. Therefore, in order to achieve better recognition effects in devices with different screen resolutions, the terminal device can match different first thresholds for devices with different screen resolutions.

[0142] The second sliding distance may be determined based on lastYPos and the ordinate in the coordinates of the second trigger operation, that is, the second sliding distance may be a value obtained by subtracting lastYPos from the ordinate in the coordinates of the second trigger operation. When the second sliding distance is greater than the first threshold, the terminal device executes the step shown in S710; or, when the second sliding distance is less than or equal to the first threshold, the terminal device executes the step shown in S709.

[0143] It can be understood that when the sliding distance of the operation is longer and the operation duration is longer, the operation is more likely to be a sliding operation.

[0144] S709: The terminal device determines that it is a click event.

[0145] After the terminal device determines that it is a click event, the terminal device can respond to the control corresponding to the click event after detecting the lift operation, and the terminal device can continue to display the target window.

[0146] S710: The terminal device determines that the event is a sliding event.

[0147] After the terminal device determines that it is a sliding event, the terminal device can close the target window.

[0148] S711. The terminal device updates the operation start position and operation start time.

[0149] The updated operation starting position described in S711 can be the vertical coordinate in the coordinates of the second trigger operation, and the terminal device can use the updated operation starting position as the lastYPos when performing the next sliding operation judgment; the updated operation starting time described in S711 can be the trigger time of the second trigger operation, and the terminal device can use the updated operation starting time as the lastTime when performing the next sliding operation judgment.

[0150] Furthermore, when the terminal device detects a new move operation, the terminal device can determine whether the new move operation is a sliding operation based on the updated operation starting position and updated operation starting time described in S711 and the operation information in the new move operation. The process is similar to the steps shown in S705-S711 and will not be repeated here.

[0151] S712: The terminal device receives a third trigger operation for the target window.

[0152] The third trigger operation may be any operation of the stylus pen on the target window, such as a lifting (up) operation of the stylus pen on the target window.

[0153] S713: The terminal device determines whether the third trigger operation is a lifting operation.

[0154] When the terminal device determines that the third trigger operation is of the up type based on the operation information of the third trigger operation, the terminal device may determine that the third trigger operation is a press operation. When the third trigger operation is a press operation, the terminal device does not perform the operation identification method provided in the embodiment of the present application, or when the third trigger operation is not a press operation, the terminal device performs the steps shown in S705.

[0155] It is understandable that, combined with Figure 4-Figure 7 In a corresponding embodiment, when the terminal device pops up a non-full-screen first window from the bottom of the interface, the terminal device can determine whether to close the first window based on the sliding distance of the stylus in the operation on the first window and the duration of the operation, so as to reduce the situation where the sliding operation is recognized as a click operation and the first window cannot be closed, thereby improving the accuracy of operation recognition.

[0156] exist Figure 7 On the basis of the corresponding embodiment, the terminal device may include: a file management application, a UIkit, and an input module. Based on the above modules in the terminal device, Figure 8 A schematic diagram of module interaction of an operation identification method provided in an embodiment of the present application.

[0157] like Figure 8 As shown, the operation identification method may include the following steps:

[0158] S801: In response to a user operation of opening a target window, the input module sends a fourth trigger event to the file management application.

[0159] The target window and the operation of the user opening the target window can be found in Figure 4-Figure 6 The description in the corresponding embodiments will not be repeated here.

[0160] The fourth trigger event may include: a down event generated in the operation of opening the target window, and an up event generated in the operation of opening the target window.

[0161] S802: The file management application calls startactivity() to open a target window.

[0162] Startactivity() is a function for starting an activity. In the step shown in S802, the file manager can start the activity of the target window by calling startactivity(). The activity of the target window can be pickpathactivity.

[0163] S803: The file management application calls oncreate() to initialize the target window.

[0164] oncreate() is a life cycle method of activity. Its main function is to instantiate the required objects for the activity and perform necessary initialization operations, such as loading layout files and starting corresponding services.

[0165] S804. UIkit returns the HwBottomsheet object to the file management application.

[0166] The HwBottomsheet object may include the display information of the target window, for example, the HwBottomsheet object may include: the context information of the window, the layout information of the window, the style attributes of the window, etc. Among them, the context information may include the relevant content for accessing system resources and starting acitivity, the layout information may include: the size of the window, the size of the controls in the window, and the display position of the controls, etc., and the style attributes are used to characterize the window as a rectangle, or other shapes such as a rounded rectangle.

[0167] S805: The file management application sets the HwBottomsheet object to be visible.

[0168] After the file management application sets the state of the HwBottomsheet object to visible, the user can see the target window on the terminal device.

[0169] S806: In response to a first trigger operation of the user on the target window, the input module sends a first trigger event to the file management application.

[0170] The first trigger event may be a down event for the target window.

[0171] S807: The file management application initializes the operation start position and operation start time.

[0172] S808: In response to a second trigger operation of the user on the target window, the input module sends a second trigger event to the file management application.

[0173] The second trigger event may be a move event for the target window.

[0174] S809: The file management application calls onInterceptTouchEvent() to determine whether to intercept the second trigger event.

[0175] onInterceptTouchEvent() is a method for intercepting touch events. For example, when a touch event occurs, it is first passed to the dispatchTouchEvent() of the first parent view (view), and then the first parent view decides whether to intercept the event.

[0176] If the onInterceptTouchEvent() of the first parent view returns true, it means that the first parent view will intercept the event and pass the event to its own onTouchEvent() for processing. If onInterceptTouchEvent() returns false, it means that the first parent view does not intercept the event and the event will continue to be passed to the child view.

[0177] If onInterceptTouchEvent() returns true, the first parent view will receive all subsequent touch events, including move events and up events. If it returns false, the first parent view will only receive down events, and subsequent events will be passed directly to the child view.

[0178] Exemplary, combined Fig. 9 In the corresponding embodiment, the first parent view and the child view described in S809 are illustrated by way of example. Fig. 9 A schematic diagram of an interface illustrating a view provided in an embodiment of the present application.

[0179] Fig. 9 The interface shown in a in the figure may include a target window, any element in the target window may correspond to a view, and the view in the window may constitute Fig. 9The view tree described in the interface shown in b. The view tree can be seen as a tree structure, and the view tree corresponds to the content displayed in the interface. A view in the view tree represents a drawable space block of the user interface component. Each view occupies a rectangular area on the display screen, and in this rectangular area, the view object is responsible for graphics drawing and event processing.

[0180] like Fig. 9 In the interface shown in a, the target window may correspond to a largest view, namely view901, which may be the first parent view described in S809, and the rectangular area where view901 is located may contain all display contents in the target window.

[0181] The subviews of view901 may be view902 and view903. View903 may be the view corresponding to the control for closing the window, and the rectangular area corresponding to view902 may be the rectangular area other than view903 in the rectangular area where view901 is located.

[0182] The subviews of view902 may be view904, view905, view906, and view907. view905 may be a view corresponding to a control for closing the current window, view906 may be a view corresponding to a control for creating a new folder, view907 may be a view corresponding to a control for completing a move (or a control displayed as "√"), and the rectangular area corresponding to view904 may be the rectangular area other than view904, view905, and view906 in the rectangular area corresponding to view902.

[0183] View 904 may also include other subviews, which will not be described here. The tree structure formed by each view can be found in Fig. 9 As shown in b.

[0184] Exemplarily, the specific steps when the file management application calls onInterceptTouchEvent() to determine whether to intercept the second trigger event can be referred to the steps shown in S705-S711, which will not be repeated here. For example, the file management application calls onInterceptTouchEvent() to determine to intercept the second trigger event, which can be understood as the file management application determines that the current operation is a sliding operation based on the second trigger event and the first trigger event, so the onInterceptTouchEvent() of the first parent view returns true, indicating that the first parent view wants to intercept the event and execute the steps shown in S810.

[0185] The file manager may execute the step shown in S810 when determining to intercept the second trigger event, or execute the step shown in S811 when determining not to intercept the second trigger event.

[0186] S810: The file management application determines that the first parent view calls onTouchEvent() to process the second trigger event.

[0187] The file management application can close the target window through smoothSlideto(), which may include one or more of the following information, for example: sliding position, sliding speed, or animation type, etc. The sliding position may be the coordinates of the second trigger operation, the sliding speed may be calculated based on the coordinates of the first trigger operation, the trigger time of the first trigger operation, the coordinates of the second trigger operation, and the triggering event of the second trigger operation, and the animation type may be understood as the specific animation called when closing the target window.

[0188] Among them, the smoothSlideto() can be set in the onTouchEvent() described in S810, or can also be called separately, which is not limited in the embodiments of the present application.

[0189] S811. The file management application determines to distribute the second trigger event to the child view of the first parent view for processing.

[0190] Suitably, the child view of the first parent view can further determine whether to intercept the second trigger event. For example, when it is determined that the coordinates of the second trigger event are in the area where the child view of the first parent view is located, the child view of the first parent view determines to intercept the second trigger event and calls onTouchEvent() to process the second trigger event.

[0191] Among them, when the child view of the first parent view is the list view (listview) in the target window, the child view calls onTouchEvent() to process the second trigger event, and the terminal device can slide the list in the target window; or, when the child view of the first parent view is the view corresponding to a control in the target window, the child view calls onTouchEvent() to process the second trigger event, and does not respond to the trigger of the control at this time, and responds to the control after receiving the up operation.

[0192] In a possible implementation, S812, in response to a third trigger operation of the user on the target window (such as an up operation on the target window), the input module may send the third trigger event to the file management application.

[0193] S813: The file management application determines that the third trigger event is processed by the child view of the first parent view.

[0194] When the file management application determines in steps S809-S811 that the child view of the first parent view intercepts the second trigger event, the child view of the first parent view will receive other trigger events, such as the third trigger event. In this scenario, the terminal device can perform the steps after the trigger control in response to the third trigger event.

[0195] It should be understood that the interface provided in the embodiment of the present application is merely an example and does not constitute a limitation on the embodiment of the present application.

[0196] Combination Figure 8 Corresponding to the embodiment, the embodiment of the present application also provides an operation identification method, which may include the following steps:

[0197] S1. The terminal device displays a first interface, which includes a first control.

[0198] When the first interface is Figure 4 When the interface is shown in c, the first control is control 404; when the first interface is Figure 5 When the interface is shown in c, the first control is control 504; when the first interface is Figure 6 When the interface is shown in c, the first control is control 602; when the first interface is Figure 6 In the interface shown in e, the first control is control 605 or control 606.

[0199] It is understandable that the first interface may be an interface on which no target window is displayed, the first interface may be an interface displayed in an application, or may be a desktop interface, which is not limited in the embodiments of the present application.

[0200] S2. The terminal device receives a first operation for a first control.

[0201] S3. In response to the first operation, the terminal device displays a first window on an upper layer of the first interface, where the first window is a non-full-screen window.

[0202] The first window can be Figure 4 405 in the interface shown in d, or Figure 5 505 in the interface shown in d, or Figure 6 604 in the interface shown in d, or Figure 6 Window 607 in the interface shown in f.

[0203] S4. When the terminal device receives a second operation of the stylus on the first window, if the sliding distance in the second operation is less than the first threshold and the duration of the second operation is greater than the second threshold, the terminal device continues to display the first window.

[0204] The second operation may be a click operation of the stylus on the first window, or an upward slide operation, a left slide operation, or a right slide operation on the first window. In this scenario, the terminal device may continue to display the first window.

[0205] S5. When the terminal device receives the third operation of the stylus on the first window, if the sliding distance in the third operation is greater than the first threshold and the duration of the third operation is greater than the second threshold, the terminal device closes the first window and displays the first interface.

[0206] The third threshold may be a downward sliding operation of the stylus on the first window. In this scenario, the terminal device may close the first window when recognizing the downward sliding operation of the first window. After closing the first window, the terminal device may continue to display the first interface.

[0207] In a possible implementation manner, the first threshold is positively correlated with the screen size of the terminal device, or the first threshold is positively correlated with the screen resolution of the terminal device.

[0208] In one possible implementation, the first interface is an interface in a file management application, the first interface includes at least one file or folder, the at least one file or folder may include a first file, and the terminal device receives a first operation for the first control, including: when the first file is selected, the terminal device receives the first operation for the first control.

[0209] The first interface can be Figure 6 The interface shown in c or Figure 6 The interface shown in e.

[0210] In one possible implementation, when the first control is a control for moving files or / folders, the path information of the moved files or folders is displayed in the first window; or, when the first control is a control for copying files or / folders, the path information of the copied files or folders is displayed in the first window; when the first control is a control for compressing files or folders, the first window displays one or more of the following: a text box for setting the compressed package name, a control for setting the compression format, or a control for setting the compressed package storage location, etc.

[0211] In one possible implementation, a terminal device displays a first interface, including: the terminal device displays a second interface, in which a card of a file management application is displayed; when the terminal device receives an operation on the card of the file management application, the terminal device displays a second window in the second interface, and the second window includes a control for editing the card; when the terminal device receives an operation on the control for editing the card, the terminal device displays the first interface, the first control is a control for selecting a folder, and at least one folder in the file management application is displayed in the first window.

[0212] The second interface can be Figure 5 The interface shown in a in the figure, the second window can be Figure 5 In the window in the interface shown in b, the first control in this scenario may be control 504.

[0213] In one possible implementation, the terminal device displays a first interface, including: the terminal device displays a third interface, and a card of a note application is displayed in the third interface; when the terminal device receives an operation on a card of the note application, the terminal device displays a third window in the third interface, and the third window includes a control for editing the card; when the terminal device receives an operation on a control for editing the card, the terminal device displays the first interface, the first control is a control for selecting a note, and at least one note in the note application is displayed in the first window.

[0214] The third interface can be Figure 4 The interface shown in a in the figure, the third window can be Figure 4 In the window in the interface shown in b, the first control in this scenario may be control 404.

[0215] In a possible implementation, when the second operation includes: a pressing operation of the stylus pen on the first window and a sliding operation of the stylus pen on the first window, the sliding distance is the distance between the pressing operation and the sliding operation, and the duration of the second operation is the difference between the time of the pressing operation and the time of the sliding operation.

[0216] The pressing operation may be the first trigger operation described in the embodiment of the present application, and the sliding operation may be the second trigger operation described in the embodiment of the present application.

[0217] In a possible implementation, a file management application is provided in the terminal device. Before the terminal device closes the first window, the method further includes: the file management application determines that the first parent view view in the first window handles the sliding operation, and the first parent view is the largest view in the first window.

[0218] In a possible implementation, the first parent view includes at least one child view, the at least one child view includes a first child view, and before the terminal device continues to display the first window, the method further includes: the file management application determines that the first child view handles the sliding operation.

[0219] In a possible implementation, the terminal device is further provided with: a UIkit and an input module. After responding to the first operation, the method further includes: the input module sends an event corresponding to the first operation to the file management application; the file management application calls the first instruction to pull up the first window based on the event corresponding to the first operation; the file management application calls the second instruction to obtain a HwBottomsheet object from the UIkit, and the HwBottomsheet object includes the layout information of the first window, the context information of the first window, and the style attribute information of the first window; the file management application sets the state of the HwBottomsheet object to visible.

[0220] Combined with the above Figure 4-Figure 9 , the method provided in the embodiment of the present application is described, and the device for executing the above method provided in the embodiment of the present application is described below. Fig.10 As shown, Fig.10 A schematic diagram of the structure of an operation identification device provided in an embodiment of the present application. The operation identification device may be a terminal device in an embodiment of the present application, or a chip or chip system in the terminal device.

[0221] like Fig.10 As shown, the operation recognition device 1000 can be used in a communication device, a circuit, a hardware component or a chip, and the operation recognition device 1000 includes: a display unit 1001 and a processing unit 1002. The display unit 1001 is used to support the display step performed by the operation recognition method; the processing unit 1002 is used to support the operation recognition device 1000 to perform the information processing step.

[0222] In a possible implementation, the operation identification device 1000 may further include a communication unit 1003, and the communication unit 1003 is used to support the operation identification device 1000 to perform steps such as receiving or sending a message.

[0223] The operation identification device described in the embodiments of the present application may include Fig.10 The units described in the corresponding embodiments.

[0224] Specifically, the processing unit 1002 and the display unit 1001 may be integrated together, and the processing unit 1002 and the display unit 1001 may communicate with each other.

[0225] In a possible implementation, the operation identification device 1000 may further include: a storage unit 1004. The storage unit 1004 may include one or more memories, and the memory may be a device in one or more devices or circuits for storing programs or data.

[0226] The storage unit 1004 may exist independently and be connected to the processing unit 1002 via a communication bus. The storage unit 1004 may also be integrated with the processing unit 1002.

[0227] Taking the operation identification device 1000 as an example, which can be a chip or chip system of a terminal device in an embodiment of the present application, the storage unit 1004 can store computer execution instructions of the method of the terminal device, so that the processing unit 1002 executes the method of the terminal device in the above embodiment. The storage unit 1004 can be a register, a cache, or a random access memory (RAM), etc. The storage unit 1004 can be integrated with the processing unit 1002. The storage unit 1004 can be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, and the storage unit 1004 can be independent of the processing unit 1002.

[0228] In a possible implementation, the operation identification device 1000 may further include: a communication unit 1003. The communication unit 1003 is used to support the operation identification device 1000 to interact with other devices. Exemplarily, when the operation identification device 1000 is a terminal device, the communication unit 1003 may be a communication interface or an interface circuit. When the operation identification device 1000 is a chip or a chip system in a terminal device, the communication unit 1003 may be a communication interface. For example, the communication interface may be an input / output interface, a pin or a circuit, etc.

[0229] The device of this embodiment can be used to execute the steps executed in the above method embodiment. Its implementation principle and technical effects are similar and will not be described in detail here.

[0230] Fig.11 A schematic diagram of the hardware structure of another terminal device provided in an embodiment of the present application.

[0231] The terminal device includes a processor 1101, a communication line 1104 and at least one communication interface ( Fig.11 The communication interface 1103 is used as an example for explanation).

[0232] The processor 1101 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application.

[0233] Communications link 1104 may include circuitry to transmit information between the above-described components.

[0234] The communication interface 1103 uses any transceiver or other device for communicating with other devices or communication networks, such as Ethernet, wireless local area networks (WLAN), etc.

[0235] Possibly, the terminal device may further include a memory 1102 .

[0236] The memory 1102 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory may exist independently and be connected to the processor via a communication line 1104. The memory may also be integrated with the processor.

[0237] The memory 1102 is used to store computer-executable instructions for executing the solution of the present application, and the execution is controlled by the processor 1101. The processor 1101 is used to execute the computer-executable instructions stored in the memory 1102, thereby implementing the method provided by the embodiment of the present application.

[0238] Possibly, the computer-executable instructions in the embodiments of the present application may also be referred to as application code, and the embodiments of the present application do not specifically limit this.

[0239] In a specific implementation, as an embodiment, the processor 1101 may include one or more CPUs, such as Fig.11 CPU0 and CPU1 in.

[0240] In a specific implementation, as an embodiment, the terminal device may include multiple processors, such as Fig.11 1 and 1105. Each of these processors may be a single-CPU processor or a multi-CPU processor. A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).

[0241] In the above embodiments, the instructions stored in the memory for execution by the processor may be implemented in the form of a computer program product, wherein the computer program product may be pre-written in the memory, or may be downloaded and installed in the memory in the form of software.

[0242] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a server or data center that includes one or more available media integrated. For example, the available medium can include a magnetic medium (e.g., a floppy disk, a hard disk or a tape), an optical medium (e.g., a digital versatile disc (digital versatiledisc, DVD)), or a semiconductor medium (e.g., a solid state drive (solid state disk, SSD)), etc.

[0243] The embodiments of the present application also provide a computer-readable storage medium. The methods described in the above embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. Computer-readable media may include computer storage media and communication media, and may also include any medium that can transfer a computer program from one place to another. The storage medium may be any target medium that can be accessed by a computer.

[0244] As a possible design, the computer readable medium may include a compact disc read-only memory (CD-ROM), RAM, ROM, EEPROM or other optical disc storage; the computer readable medium may include a magnetic disk storage or other magnetic disk storage device. Moreover, any connection line may also be appropriately referred to as a computer readable medium. For example, if the software is transmitted from a website, server or other remote source using a coaxial cable, fiber optic cable, twisted pair, DSL or wireless technology (such as infrared, radio and microwave), the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technology such as infrared, radio and microwave are included in the definition of medium. Disk and disc as used herein include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray disc, where disks usually reproduce data magnetically, while optical discs reproduce data optically using lasers.

[0245] The above combinations should also be included in the scope of computer-readable media. The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

[0246] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards, and provide corresponding operation entrances for users to choose to authorize or refuse.

Claims

1. An operation identification method, It is characterized in that The method comprises: The terminal device displays a first interface, wherein the first interface includes a first control; The terminal device receives a first operation on a first control; In response to the first operation, the device displays a first window on an upper layer of the first interface, where the first window is a non-full-screen window; When the terminal device receives a second operation of the stylus on the first window, if the sliding distance in the second operation is less than a third threshold and the duration of the second operation is less than the second threshold, or the duration of the second operation is greater than the second threshold and the sliding distance in the second operation is less than the first threshold, the terminal device determines it as a click event, continues to display the first window, and the first threshold is less than the third threshold; When the terminal device receives the third operation of the stylus on the first window, if the sliding distance in the third operation is greater than a third threshold, or the sliding distance in the third operation is less than the third threshold, the duration of the third operation is greater than the second threshold, and the sliding distance in the third operation is greater than the first threshold, the terminal device determines it as a sliding event, and closes the first window; The sliding distance in the second operation is a value obtained by subtracting the operation start position from the ordinate in the coordinates of the second operation, and the sliding distance in the third operation is a value obtained by subtracting the operation start position from the ordinate in the coordinates of the third operation; the first threshold and the third threshold are positively correlated with the screen size of the terminal device, or the first threshold and the third threshold are positively correlated with the screen resolution of the terminal device; The terminal device displays the first interface, including: The terminal device displays a second interface, wherein the second interface displays a card of the file management application; When the terminal device receives an operation on a card of the file management application, the terminal device displays a second window in the second interface, wherein the second window includes a control for editing a card; When the terminal device receives an operation on the control for editing a card, the terminal device displays the first interface, the first control is a control for selecting a folder, and at least one folder in the file management application is displayed in the first window; or, The terminal device displays a third interface, wherein the third interface displays a card of the note application; When the terminal device receives an operation on a card of the note application, the terminal device displays a third window in the third interface, wherein the third window includes a control for editing a card; When the terminal device receives an operation on the control for editing a card, the terminal device displays the first interface, the first control is a control for selecting a note, and at least one note in the note application is displayed in the first window.

2. The method according to claim 1, It is characterized in that The first interface is an interface in a file management application, the first interface includes at least one file or folder, and the at least one file or folder includes a first file, The terminal device receives a first operation on a first control, comprising: when the first file is selected, the terminal device receives the first operation on the first control.

3. The method according to claim 2, It is characterized in that When the first control is a control for moving a file or / folder, the first window displays path information for moving the file or folder; or, when the first control is a control for copying a file or / folder, the first window displays path information for copying the file or folder; when the first control is a control for compressing a file or folder, the first window displays one or more of the following: a text box for setting a compressed package name, a control for setting a compression format, or a control for setting a compressed package storage location.

4. The method according to any one of claims 1 to 3, It is characterized in that When the second operation includes: a pressing operation of the stylus pen on the first window and a sliding operation of the stylus pen on the first window, the sliding distance is the distance between the pressing operation and the sliding operation, and the duration of the second operation is the difference between the time of the pressing operation and the time of the sliding operation.

5. The method according to claim 4, It is characterized in that The terminal device is provided with a file management application. Before the terminal device closes the first window, the method further includes: The file management application determines that the sliding operation is processed by a first parent view in the first window, where the first parent view is the largest view in the first window.

6. The method according to claim 5, It is characterized in that The first parent view includes at least one subview, and the at least one subview includes a first subview. Before the terminal device continues to display the first window, the method further includes: The file management application determines that the first sub-view processes the sliding operation.

7. The method according to claim 5 or 6, It is characterized in that The terminal device is further provided with: a user interface tool UIkit and an input module. After responding to the first operation, the method further includes: The input module sends an event corresponding to the first operation to the file management application; The file management application calls a first instruction to open the first window based on the event corresponding to the first operation; The file management application calls the second instruction to obtain a HwBottomsheet object from the UIkit, where the HwBottomsheet object includes layout information of the first window, context information of the first window, and style attribute information of the first window; The file management application sets the state of the HwBottomsheet object to visible.

8. A terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the terminal device executes the method according to any one of claims 1 to 7.

9. A computer-readable storage medium storing a computer program. It is characterized in that When the computer program is executed by a processor, the computer is caused to perform the method according to any one of claims 1 to 7.