Display device and touch data processing method
By loading a preset acceleration library in the display device, the touch data processing process is simplified, and the problem of the touch data processing speed and view display frequency is solved, improving the user experience.
Patent Information
- Application Number
- CN202411524598.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-02-25
AI Technical Summary
In the display device of the Android operating system, the touch data processing process is complex, resulting in the touch data processing speed that does not match the refresh frequency of the view display, affecting the user experience.
By loading a preset acceleration library in the display device, only the second touch data is read and processed, reducing system resource usage and improving data processing efficiency.
The speed of displaying touch tracks is improved, matching it with the speed of user touch actions, and improving user experience.
Smart Images

Figure CN119512397A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of touch control technology, and in particular to a display device and a touch data processing method. Background Art
[0002] With the development of touch technology, applications that support touch input functions such as whiteboards, drawings, and notes in display devices are widely used in education, meetings, offices, and creative expression to meet the different needs of users.
[0003] Taking the display device of the Android operating system as an example, during the touch data processing process, after the touch screen generates touch data, the Input subsystem reads the touch data through the device node, processes the touch data to determine the corresponding touch event, and then distributes the touch event to the main thread of the application for processing, so that the display device displays the corresponding touch data.
[0004] However, in the above process of processing touch data, the input subsystem's touch data processing flow and the application's input data processing flow are complex, resulting in a mismatch between the touch data processing speed and the refresh frequency of the view display, which in turn causes the speed of displaying the touch trajectory to be mismatched with the speed of the user's touch action, causing an adverse impact on the user's experience. Summary of the invention
[0005] The present application provides a display device and a touch data processing method, which can reduce the data processing flow of touch data, improve the processing efficiency of touch data, and thereby increase the speed of displaying touch tracks, so that the speed of displaying touch tracks matches the speed of user touch actions, thereby improving user experience.
[0006] In a first aspect, a display device is provided, including a touch screen and a controller, wherein the touch screen includes a touch component and a display component, the touch component is used to receive a user touch action, the display component is used to present an interface, and the controller is configured to perform the following steps:
[0007] In response to a user's touch action within an interface presented by a target application, second touch data is generated; when the second touch data meets a preset acceleration condition, a preset acceleration library is loaded, wherein the preset acceleration condition is used to filter the event type of the second touch data, and the preset acceleration library is used to provide the target application with an interface for reading and processing the second touch data; based on the preset acceleration library, the second touch data is read and processed to obtain a target touch event corresponding to the second touch data, and the target touch event is transmitted back to the target application.
[0008] The present application only reads and processes the second touch data by calling the local function in the preset acceleration library; while in the related art, the second touch data is read, processed and distributed through the Input subsystem; the preset acceleration library only focuses on the reading and processing tasks of touch data, avoiding unnecessary functions and complexity, reducing the occupation of system resources, and also improving the efficiency of data processing.
[0009] In addition, for the target touch events obtained by calling the preset acceleration library, the present application can directly pass the target touch events back to the target application for display through JNI. There is no need to process the touch events like the Input subsystem, and the touch events in a unified format need to be distributed according to the needs of the upper-level application. The touch events are sent to the main thread of the application through the communication method between the Input subsystem and the application, and then the trajectory view corresponding to the touch event is displayed on the touch screen, thereby reducing the touch data processing process and improving the efficiency of touch data processing.
[0010] In one possible implementation, when the second touch data meets the preset acceleration condition, the controller loads the preset acceleration library and is configured to: monitor the second touch data; if the event type of the second touch data is sliding, call the local function in the preset acceleration library based on the preset interface.
[0011] Touch actions such as sliding are continuously generated when users move their fingers or stylus on the touch screen. They frequently appear in the usage scenarios of applications that support touch input functions, such as whiteboards. Such touch actions have high requirements for smoothness due to their continuity and dynamism. Therefore, it is necessary to identify the event type of the second touch data and load the preset acceleration library when the event type of the second touch data is sliding. Since the system code is different from the code of the local function in the preset acceleration library, the local function in the preset acceleration library can be loaded through the preset interface to realize the interaction between the preset acceleration library and the system.
[0012] In one possible implementation, when the second touch data meets the preset acceleration condition, the controller loads the preset acceleration library and is configured to: monitor the second touch data; if the event type of the second touch data is pressing, adjust the state of the first identifier to the on state; if the event type of the second touch data is sliding and the state of the first identifier is the on state, call the local function in the preset acceleration library based on the preset interface.
[0013] Touch actions such as sliding are continuously generated when users move their fingers or stylus on the touch screen. They frequently appear in the usage scenarios of applications that support touch input functions, such as whiteboards. Such touch actions have high requirements for smoothness due to their continuity and dynamism. Therefore, it is necessary to identify the event type of the second touch data and load the preset acceleration library when the event type of the second touch data is sliding. Since the system code is different from the code of the local function in the preset acceleration library, the local function in the preset acceleration library can be loaded through the preset interface to realize the interaction between the preset acceleration library and the system.
[0014] It is also necessary to understand that in the touch scene corresponding to the target application, each time the user uses a finger or a touch pen to perform a touch action, pressing is the first event to be triggered and is the starting signal for the triggering operation. Therefore, a first flag can be set for such event types as pressing, and the processing flow of subsequent events can be determined by the state of the first flag, that is, when the first flag is turned on, subsequent events will be processed by the preset acceleration library.
[0015] In a possible implementation, after the controller adjusts the state of the first identifier to the on state, the controller is further configured to: cause the input subsystem in the display device to stop reading, processing, and distributing the second touch data.
[0016] In the process of determining the processing flow of subsequent events by the state of the first identifier, in order to prevent the system from processing the touch data, the Input subsystem in the system will not process subsequent events based on the first identifier in the turned-on state, so as to prevent the current processing resource performance from being occupied or possible conflicts from occurring, thereby ensuring that the system runs stably according to preset rules under specific conditions.
[0017] In a possible implementation, after adjusting the state of the first indicator to the on state, the controller is further configured to: when the event type of the second touch data is lift, adjust the state of the first indicator to the off state.
[0018] The state of the first identifier is adjusted to be on and off, so that if there is a sliding event type during each touch action, the processing flow of subsequent events can be determined by the state of the first identifier. That is to say, when the first identifier is in the on state, subsequent events will be processed by the preset acceleration library, and when the first identifier is in the off state, subsequent events will be processed by the Input subsystem.
[0019] In one possible implementation, the controller, in response to a user's touch action within an interface presented by a target application, is further configured, before generating second touch data, to: obtain first touch data, where the first touch data is data generated by a touch action before entering the target application, and the first touch data includes the size of a first touch area; and process the first touch data based on an operating system in a display device to obtain the size of the first touch area in an initial touch event, wherein the encapsulation structure of the initial touch event is the same as the encapsulation structure of the target touch event.
[0020] It should be understood that there is a binding dependency between the target application and the preset acceleration library. The preset acceleration library can only be loaded and initialized during the use of the target application. Therefore, during the use of the target application, the touch data processing process needs to be switched. During the switching process, the size of the first touch area in the initial touch event may be called. Therefore, it is necessary to obtain the first touch data generated by the user's touch action before entering the target application.
[0021] In one possible implementation, after the controller transmits the target touch event back to the target application, it is also configured to: transmit the size of the first touch area to the target application when the size of the second touch area in the target touch event is an initial value; and determine the contact area size of the touch track corresponding to the target touch event based on the size of the first touch area.
[0022] It should be understood that there is a binding dependency between the target application and the preset acceleration library. The preset acceleration library can only be loaded and initialized when the target application is in use, and the initialization value in the preset acceleration library is zero. That is to say, if there is no parameter representing the touch area size in the target touch event corresponding to the second touch data, only the initialization value can be used, and the initialization value cannot complete the drawing of the touch trajectory. Therefore, it is necessary to call the size of the first touch area as the size of the touch area of the target touch event, and then obtain the contact area size of the touch trajectory.
[0023] In one possible implementation, after the controller transmits the target touch event back to the target application, it is also configured to: when the size of the second touch area in the target touch event is updated, determine the contact area size of the touch track corresponding to the target touch event based on the updated size of the second touch area.
[0024] It should be understood that when the touch pressure changes, the corresponding touch data will include the size parameters of the touch area, while in other cases, the size parameters of the touch area will not be transmitted. Therefore, after the size of the second touch area is updated, the size of the second touch area is non-zero, that is, the size of the second touch area is a modified value. At this time, the touch trajectory is drawn directly through the parameter data in the target touch event.
[0025] In one possible implementation, the preset acceleration library is a dynamic link library file, and the controller reads and processes the second touch data based on the preset acceleration library to obtain a target touch event corresponding to the second touch data, and is configured as follows: based on the preset acceleration library and the device node, the second touch data is read, wherein the device node is used for the controller to interact with the touch screen, and the device node is stored in the display device in the form of a file; the second touch data is parsed, filtered, and de-jittered to obtain a target touch event.
[0026] By processing the second touch data through a preset acceleration library, a target touch event corresponding to the same structure as the motion event can be obtained. For a target application, data conversion is not required and the target touch event can be used directly.
[0027] In a possible implementation, after the controller transmits the target touch event back to the target application, the controller is further configured to: draw a touch track based on the target touch event, and present the touch track on the display component.
[0028] It should be understood that the touch trajectory can be directly drawn and displayed based on the target touch event with the same structure as the motion event, thereby reducing the process of target touch event processing and improving data processing efficiency, thereby increasing the speed of touch trajectory presentation. During use, the speed of touch trajectory presentation felt by the user matches the speed of the user's touch action.
[0029] In a second aspect, a touch data processing method is provided, which is applied to the display device of the first aspect, the method comprising: generating touch data in response to a user's touch action in an interface presented by a target application; loading a preset acceleration library when second touch data meets a preset acceleration condition, wherein the preset acceleration condition is used to filter the event type of the second touch data, and the preset acceleration library is used to provide the target application with an interface for reading and processing the second touch data; reading and processing the second touch data based on the preset acceleration library to obtain a target touch event corresponding to the second touch data, and transmitting the target touch event back to the target application.
[0030] According to a third aspect, a touch data processing device is provided, comprising a unit for executing the touch data processing method according to the second aspect.
[0031] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program. When the computer program is executed by a display device, the display device executes the touch data processing method in the second aspect.
[0032] In a fifth aspect, a computer program product is provided, the computer program product comprising: a computer program, when the computer program is executed by a display device, the display device executes the touch data processing method in the second aspect.
[0033] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 A schematic diagram showing an operation scenario between a display device and a control device provided in some embodiments of the present application;
[0035] Figure 2 exemplarily shows a block diagram of a configuration of a display device 200 according to an exemplary embodiment;
[0036] Figure 3 exemplarily shows a system block diagram in a display device 200 according to an exemplary embodiment;
[0037] Figure 4 A schematic diagram showing a flow chart of a touch data processing method provided by the related art;
[0038] Figure 5 A schematic diagram showing an application scenario applicable to an embodiment of the present application;
[0039] Figure 6 A flow chart of a touch data processing method in a display device in some embodiments of the present application is shown;
[0040] Figure 7 A flowchart showing another touch data processing method in a display device in some embodiments of the present application is shown;
[0041] Figure 8 A flowchart showing another touch data processing method in a display device in some embodiments of the present application is shown;
[0042] Fig. 9 A schematic diagram showing the result of a display device checking a touch event in an embodiment of the present application is shown;
[0043] Fig.10 A flowchart showing another touch data processing method in a display device in some embodiments of the present application is shown;
[0044] Fig.11A schematic diagram showing an application scenario applicable to an embodiment of the present application;
[0045] Fig.12 is a schematic diagram of a touch data processing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0046] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0047] In the following, the terms "first", "second", and "third" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first", "second", and "third" may explicitly or implicitly include one or more of the features.
[0048] The display device in the embodiment of the present application may be a television, a smart television, an electronic whiteboard (electronic bulletin board), an electronic table (electronic table), etc. Figure 1 This is a specific implementation of the display device of the present application.
[0049] Figure 1 FIG. 1 is a schematic diagram of an operation scenario between a display device and a control device according to an embodiment. Figure 1 As shown, the user can operate the display device 200 through the smart device 300 or the control apparatus 100 .
[0050] In some embodiments, the control device 100 may be a remote controller, and the communication between the remote controller and the display device includes infrared protocol communication or Bluetooth protocol communication, and other short-range communication methods, and the display device 200 is controlled wirelessly or wired. The user may control the display device 200 by inputting user commands through buttons on the remote controller, voice input, control panel input, etc.
[0051] In some embodiments, a smart device 300 (such as a mobile terminal, a tablet computer, a computer, a laptop computer, etc.) may also be used to control the display device 200. For example, the display device 200 is controlled using an application running on the smart device.
[0052] In some embodiments, the display device 200 may not only use the above-mentioned smart device 300 or the control apparatus 100 to receive instructions, but also receive information input by the user through a finger or other objects through a touch screen.
[0053] In some embodiments, the display device 200 can also be controlled in a manner other than the control device 100 and the smart device 300. For example, the user's voice command control can be directly received through a module for obtaining voice commands configured inside the display device 200, or the user's voice command control can be received through a voice control device set outside the display device 200.
[0054] In some embodiments, the display device 200 also communicates data with the server 400. The display device 200 may be allowed to communicate via a local area network (LAN), a wireless local area network (WLAN), and other networks. The server 400 may provide various content and interactions to the display device 200. The server 400 may be one cluster or multiple clusters, and may include one or more types of servers.
[0055] like Figure 2 The display device 200 includes at least one of a tuner and demodulator 210, a communicator 220, a detector 230, an external device interface 240, a controller 250, a touch screen 260, an audio output interface 270, a memory, a power supply, and a user interface.
[0056] In some embodiments, the controller includes a processor, a video processor, an audio processor, a graphics processor, a RAM, a ROM, and a first interface to an nth interface for input / output.
[0057] The touch screen 260 includes a display component for presenting images and a driving component for driving image display, and is used to receive image signals output from a controller, and display video content, image content, and a menu control interface component and a user control UI interface.
[0058] The display component can be a liquid crystal display, an OLED display, and a projection display, and can also be a projection device and a projection screen.
[0059] The touch screen 260 also includes a touch component for receiving user touch actions, for sensing the user's touch operations, such as touch position, touch pressure (if pressure sensing is supported), touch gestures (such as pressing, moving, lifting, double-clicking, etc.), etc., and converting this information into electrical signals and sending them to the controller 250 of the display device.
[0060] The touch components include touch sensors, which detect the touch action when the user touches the touch screen. These sensors can be based on different technologies, such as resistive, capacitive, infrared, etc.
[0061] Among them, the resistive touch screen detects the touch position by using pressure to make the upper and lower conductive films of the screen come into contact, and can be touched with fingers, touch pens, etc.; the capacitive touch screen uses the electric field induction of the human body to detect touch, it supports multi-touch, and has high sensitivity and response speed; the infrared touch screen determines the touch position by blocking infrared rays, and is suitable for larger screens.
[0062] It should also be understood that if the touch screen is an infrared touch screen, its touch component includes a touch frame, and the touch frame arranges infrared transmitting tubes and infrared receiving tubes in a rectangular frame, and these transmitting tubes and receiving tubes form a horizontally and vertically crossed infrared matrix.
[0063] In some embodiments, the touch frame includes two infrared sensing edge groups, each infrared sensing edge group includes a transmitting edge and a receiving edge, wherein the transmitting edge includes a plurality of transmitting tubes, and the corresponding receiving edge includes a plurality of receiving tubes.
[0064] For ease of description, in the embodiment of the present application, the original data of user input received by the touch screen is referred to as touch data.
[0065] The communicator 220 is a component for communicating with an external device or server according to various communication protocol types. For example, the communicator may include at least one of a Wifi module, a Bluetooth module, a wired Ethernet module, and other network communication protocol chips or near field communication protocol chips, and an infrared receiver. The display device 200 can establish transmission and reception of control signals and data signals with the control device 100 or the server 400 through the communicator 220.
[0066] The user interface can be used to receive control signals from the control device 100 (such as an infrared remote controller, etc.).
[0067] The detector 230 is used to collect signals from the external environment or the external interaction. For example, the detector 230 includes a light receiver, a sensor for collecting the intensity of ambient light; or, the detector 230 includes an image collector, such as a camera, which can be used to collect external environment scenes, user attributes or user interaction gestures; or, the detector 230 includes a sound collector, such as a microphone, etc., for receiving external sounds.
[0068] The external device interface 240 may include, but is not limited to, any one or more of the following interfaces: a high-definition multimedia interface (HDMI), an analog or digital high-definition component input interface (component), a composite video input interface (CVBS), a USB input interface (USB), an RGB port, etc. It may also be a composite input / output interface formed by the above multiple interfaces.
[0069] The tuner-demodulator 210 receives broadcast television signals via wired or wireless reception, and demodulates audio and video signals, such as EPG data signals, from a plurality of wireless or wired broadcast television signals.
[0070] In some embodiments, the controller 250 and the tuner-demodulator 210 may be located in different separate devices, that is, the tuner-demodulator 210 may also be located in an external device of the main device where the controller 250 is located, such as an external set-top box.
[0071] The controller 250 controls the operation of the display device and responds to user operations through various software control programs stored in the memory. The controller 250 controls the overall operation of the display device 200. For example, in response to receiving a user command for selecting a UI object to be displayed on the touch screen 260, the controller 250 can perform operations related to the object selected by the user command.
[0072] In some embodiments, the controller includes at least one of a central processing unit (CPU), a video processor, an audio processor, a graphics processing unit (GPU), a random access memory (RAM), a read-only memory (ROM), a first interface to an nth interface for input / output, a communication bus, etc.
[0073] The user may input a user command in a graphical user interface (GUI) displayed on the touch screen 260, and the user input interface receives the user input command through the graphical user interface (GUI). Alternatively, the user may input a user command by inputting a specific sound or gesture, and the user input interface receives the user input command by recognizing the sound or gesture through a sensor.
[0074] It should be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the display device 200. The display device may have more or fewer components than those shown in the figure, may combine two or more components, or may have different component configurations.
[0075] An operating system runs on the above hardware. The operating system can be any one or more computer operating systems that implement business processing through processes, such as the Linux operating system, Android operating system, etc. Applications can be installed and run on the operating system.
[0076] The operating system of the display device 200 may adopt a layered architecture, an event-driven architecture, etc. The embodiment of the present application takes the Android operating system of the layered architecture as an example to illustrate the software architecture of the display device. Figure 3 Schematically shows a system block diagram of a display device 200 according to an exemplary embodiment. Figure 3 , the operating system is divided into four layers, from top to bottom: the application layer (Applications layer), the application framework layer (Application Framework layer), the Android runtime and system library layer (System runtime layer), and the kernel layer.
[0077] At least one application is running in the application layer, and these applications can be window programs, system settings programs, clock programs, etc. that come with the operating system; they can also be applications developed by third-party developers. The applications in the embodiments of the present application include whiteboard applications, drawing applications, and / or note applications, etc. that support touch input functions. In specific implementation, the application packages in the application layer are not limited to the above examples.
[0078] The framework layer provides application programming interfaces (APIs) and programming frameworks for applications. The application framework layer includes some predefined functions. The application framework layer is equivalent to a processing center that determines the actions that applications in the application layer take. Through the API interface, applications can access system resources and obtain system services during execution.
[0079] like Figure 3As shown, in the embodiment of the present application, the application framework layer includes managers, content providers, etc., wherein the managers include: an activity manager for interacting with all activities running in the system, for example, the activity management service (ActivityManagerService, AMS for short) is the life cycle of the Activity of all applications of the Android operating system, including the transition of states such as start, pause, resume and destroy; an input manager for managing the input devices of the system (such as touch screens, etc.), coordinating touch events obtained from the driver layer, and distributing these touch events to appropriate applications for processing, for example, the input management service (InputManagerService, IMS for short); a window manager for managing icons, windows, toolbars, wallpapers and desktop components on the user interface, for example, the window management service (WindowManagerService, WMS for short).
[0080] The manager may also include: a location manager for providing system services or applications with access to system location services; a package manager for retrieving various information related to the application packages currently installed on the device; and a notification manager for controlling the display and clearing of notification messages.
[0081] In some embodiments, the system runtime layer provides support for the upper layer (ie, the framework layer). When the framework layer is used, the Android operating system will run the C / C++ library contained in the system runtime layer to implement the functions to be implemented by the framework layer.
[0082] The kernel layer is the layer between hardware and software. Figure 3 As shown, the kernel layer includes touch driver, which mainly converts the electrical signal generated by contact into digital information for use by the operating system. It can also include: audio driver, display driver, Bluetooth driver, camera driver, WIFI driver, USB driver, HDMI driver, sensor driver (such as fingerprint sensor, temperature sensor, pressure sensor, etc.), and power driver, etc.
[0083] It should be understood that for different types of touch screens, the corresponding touch drivers are different. For example, if the touch screen is an infrared touch screen, the corresponding touch driver is an infrared receiving driver.
[0084] The display device uses the touch screen as a key component to achieve efficient and convenient touch input function. Users can directly use their fingers or stylus to perform operations such as inputting text and drawing graphics on the touch screen, thus bringing users an intuitive and smooth interactive experience.
[0085] At the same time, applications that support touch input functions, such as whiteboard applications, drawing applications, and note-taking applications in display devices, play an important role in multiple fields and meet the needs of different users.
[0086] For example, in the field of education, it provides teachers and students with a wealth of teaching and learning tools. Teachers can use whiteboard applications to teach online, drawing applications to create materials, and note applications to organize materials and share them with students. Students can use note applications to record learning content and whiteboard applications for group collaboration. In the field of meetings, whiteboard applications are convenient for presenting plans, recording key points, and brainstorming. Drawing applications assist in drawing charts to express ideas. Note applications are conducive to recording meeting content and organizing minutes. In the office field, note applications can efficiently record work content and organize ideas. Drawing applications can be used for design work, and whiteboard applications facilitate team discussions and decision-making. In the field of creative expression, it provides creators with a broad space. Drawing applications meet professional creation needs, note applications can record creative inspiration, and whiteboard applications facilitate joint creation and communication among multiple people.
[0087] Taking the display device of the Android operating system as an example, the touch events generated by the input device (such as the touch screen) are processed by the input subsystem (i.e., the Input subsystem), the touch data of the touch screen is converted into events that the system can understand, and these events are passed to the application for processing, thereby realizing the interaction between the user and the display device.
[0088] In the related technology, in the Android operating system, the Input subsystem reads touch data through device nodes, processes and converts the touch data, and generates touch events in a unified format. After that, the touch events can be filtered and distributed according to the needs of the application, and the touch events can be distributed to the upper-level application.
[0089] After determining the application in the upper layer, the touch event is sent to the application's main thread, which is used to handle view updates and user interactions.
[0090] The user taps the application icon on the touch screen with a stylus or finger to enter the application. The application here refers to applications that support touch input functions such as whiteboard, drawing, and note taking. Figure 4 A schematic diagram of a touch data processing method provided by the related art is shown. Figure 4 As shown, the method includes the following steps.
[0091] S510: When the user clicks the touch screen, a device node is created.
[0092] Device nodes, also known as character device nodes, exist in the form of files under the system target. Applications can interact with the touch screen by opening, reading, and writing the files.
[0093] For example, the device node may be a / dev / input / eventX file, where X is a number representing the number of the input device. In the embodiment of the present application, the device node corresponding to the touch screen is event0.
[0094] S520 , reading touch data through the device node.
[0095] S530: Process and convert the touch data to generate touch events in a unified format.
[0096] It should be understood that a touch event refers to a motion event (MotionEvent) related to touch, such as pressing, sliding, and lifting a finger on a touch screen. It contains rich information, such as the location coordinates of the event (x and y axis coordinates), event type (press, move, lift, etc.), timestamp of the event, etc.
[0097] Among them, MotionEvent includes: ACTION_DOWN represents the event generated when the finger first touches the touch screen, indicating the start of the touch action; ACTION_MOVE represents the event continuously generated when the finger moves on the touch screen, which is used to track the change of the touch position; ACTION_UP represents the event generated when the finger is lifted from the touch screen, indicating the end of the touch action.
[0098] The Input subsystem will parse, filter, and debounce the touch data according to the type and configuration of the input device to improve the accuracy and stability of touch events.
[0099] S540: Determine an application corresponding to the touch event distribution according to a requirement of an upper-layer application.
[0100] It should be understood that the process from step 520 to step 540 is completed by the Input subsystem in the Android operating system.
[0101] In some examples, the Input subsystem includes an Input driver layer, an Input core layer, and an Input event processing layer, wherein when a user operates through the touch screen, the touch screen generates touch data; the Input driver layer reads the touch data generated by the touch screen in real time and passes it to the Input core layer; the Input core layer processes and converts the touch data to generate touch events in a unified format; the Input core layer parses, filters, and debounces the touch data according to the type and configuration of the touch screen; the Input event processing layer distributes the touch events to the upper-level application; the Input event processing layer can filter and distribute the touch events according to the needs of the application.
[0102] It should be understood that the Input subsystem provides a unified input interface for upper-layer applications, allowing applications to easily handle various types of input devices. Whether the user uses a touch screen, voice input device, or remote control, the application can receive touch events through the same interface. In other words, the input devices involved in the display device are all processed by the Input subsystem to generate touch events. For the touch screen, each motion event needs to be acquired, processed, and distributed by the Input subsystem.
[0103] S550: Send the touch event to the main thread of the application program, and display the track view corresponding to the touch event on the touch screen.
[0104] In an application on the Android operating system, the main thread is also called the UI thread. The main thread maintains an event queue. When touch events are received, these touch events will be placed in the event queue and wait for processing in the order in which they are received.
[0105] The management of the event queue affects the response speed of the application. For example, the refresh rate of the view display is 60 Hz, which is equivalent to refreshing the interface of the current view approximately every 16 milliseconds. If the corresponding touch event has not been processed in the event queue when the view is refreshed, the touch event processing speed will not match the refresh rate of the view display.
[0106] It should also be understood that in some embodiments, after receiving the touch data, the Android operating system will perform a series of scheduling and distribution according to the current system status. If the system is in a high-load state, such as running multiple large applications at the same time or performing complex background tasks, the priority of processing the touch data will be affected, resulting in delays in the processing of the touch data.
[0107] That is to say, in the entire process of processing touch data, the Input subsystem processing process in the operating system and the process of distributing touch events to corresponding applications are complicated, resulting in a mismatch between the touch event processing speed and the refresh frequency of the view display, causing delayed response and a mismatch between the speed of displaying the touch trajectory and the speed of the user's touch action, which makes the user feel the illusion of touch lag, affecting the user's usage experience.
[0108] In view of this, the embodiments of the present application provide a display device and a touch data processing method. By judging the second touch data, when the second touch data meets the preset acceleration condition, the second touch data can be processed by loading the preset acceleration library, and the processed target touch event is directly transmitted back to the target application. Compared with the touch data processing method in the related art, the data processing process is reduced, the efficiency of touch data processing is improved, and the speed of displaying the touch trajectory is increased, so that the speed of displaying the touch trajectory matches the speed of the user's touch action, thereby improving the user's intuitive feeling and interactive experience during the operation.
[0109] In order to facilitate further understanding of the technical solutions in some embodiments of the present application, the technical solutions of the display device and the touch data processing method, as well as how the technical solutions solve the above-mentioned technical problems are described in detail below in combination with some specific embodiments and drawings. The various embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. Obviously, the described embodiments are part of the embodiments of the present application, not all of them.
[0110] The display device includes a touch screen and a controller, wherein the controller is connected to the touch screen; wherein the touch screen includes a display component and a touch component, and the touch component is configured to receive a user's touch action.
[0111] After the target application is started on the display device, the touch screen presents the touch input interface of the target application. For example, the target application may be a whiteboard application, a drawing application, a note application, etc. Taking the whiteboard application as an example, the user clicks the icon of the whiteboard application in the system homepage with a touch pen or a finger, such as Figure 5 As shown in (a) of FIG. 1 ; Enter the touch input interface of the whiteboard application, such as Figure 5 As shown in (b) Figure 4 In the related technology shown in the whiteboard application, when touch input is performed in the touch input interface, the following will appear: Figure 5 In the case shown in (c), the speed of the touch track does not match the speed of the user's touch action.
[0112] It should be understood that when the icon of the whiteboard application is clicked, the touch data generated on the touch screen is obtained, and the touch data is sent to the kernel layer through the touch driver corresponding to the touch screen, and the file / dev / input / event0 is created in the system directory. This file is the interface file corresponding to the touch screen in the display device. It should be understood that the touch screen is an input device, and the touch events (such as pressing, sliding, lifting, etc.) generated by it will send these event data to the / dev / input / event0 device node through the corresponding driver.
[0113] After entering the Whiteboard application, Figure 6 A flow chart of a touch data processing method in a display device in some embodiments of the present application is shown. Figure 6 As shown, the controller is configured to perform the following steps:
[0114] S610, generating second touch data in response to a touch action of a user in an interface presented by a target application;
[0115] For example, the user interface presented by the target application is as follows: Figure 5 As shown in (b) in the figure, in this interface, the user can perform touch actions, such as pressing, sliding, lifting, etc., using a finger or a touch pen.
[0116] It should be understood that pressing in a touch action may refer to pressing in a click action, or the starting point of a sliding touch action, etc.; lifting may refer to raising the hand in a click action, or the end point of a sliding touch action.
[0117] The touch screen converts the detected physical signal corresponding to the touch action into a digital signal, that is, generates touch data corresponding to the touch action. The touch data includes information such as the position, size, and pressure of the touch point, where the touch point can also be expressed as a touch area.
[0118] The position of the touch area can be expressed by the x and y coordinates in the screen coordinate system; the size of the touch area can be expressed by the following parameters: ABS_MT_TOUCH_MAJOR and ABS_MT_TOUCH_MINOR.
[0119] Among them, ABS_MT_TOUCH_MAJOR represents the major axis size of the touch area, and ABS_MT_TOUCH_MINOR represents the minor axis size of the touch area. When the user touches the touch screen with a finger, the area where the finger and the touch screen contact is approximately an ellipse. The major axis length of this ellipse is represented by ABS_MT_TOUCH_MAJOR, and the minor axis length of this ellipse is represented by ABS_MT_TOUCH_MINOR.
[0120] S620: When the second touch data meets a preset acceleration condition, load a preset acceleration library.
[0121] It should be understood that touch actions such as pressing and lifting are short-lived and have clear start and end points. Figure 4 The processing flow of the input subsystem and the main thread of the application in the related technology shown in the figure processes the touch data of event types such as pressing and lifting.
[0122] Touch actions such as sliding are continuously generated when users move their fingers or stylus on the touch screen. They frequently appear in the use scenarios of applications that support touch input functions, such as whiteboards. Due to their continuity and dynamism, these touch actions have high requirements for smoothness.
[0123] In actual applications, there is a problem that the speed of displaying the touch trajectory does not match the speed of the user's touch action. Specifically, when the user writes or draws quickly, the display of the touch trajectory may be delayed, stuck, or cannot keep up with the speed of the user's finger or touch pen movement, which seriously affects the user's intuitive feeling and interactive experience during the operation. Therefore, the embodiment of the present application optimizes the processing flow of the second touch data by setting a preset acceleration condition related to the event type of the second touch data.
[0124] The preset acceleration condition is used to screen the event type of the second touch data, and when the event type of the second touch data meets the preset acceleration condition, the preset acceleration library is loaded.
[0125] It can be known from the above analysis that the preset acceleration condition can be limited to that the event type of the second touch data is sliding, that is, when the event type of the second touch data is sliding, the second touch data meets the preset acceleration condition.
[0126] It should be understood that other event types of the second touch data, such as pressing, lifting, etc., can also be set to meet the preset acceleration conditions. That is, when the event type of the second touch data is pressing or lifting, the preset acceleration library can also be loaded to implement corresponding event processing.
[0127] The preset acceleration library is used to provide the target application with an interface for reading and processing the second touch data. The preset acceleration library is a dynamic link library file, which contains specific code, data or other resources required by the application when running, and is used to implement specific functions. It should be understood that the dynamic link library file can be shared by multiple applications, and its main purpose is to achieve code reuse and modular design of the program, so as to improve the utilization of system resources and reduce the workload of repeated development.
[0128] The required dynamic link library file will be called only when the application corresponding to the dynamic link library file is running. During the application development process, the developer needs to declare the application's dependence on a specific dynamic link library file, that is, only record the information of the required dynamic link library file instead of directly compiling the code in the library into the executable file. This can reduce the size of the executable file, save disk space, and dynamically load and unload the dynamic link library file as needed at runtime.
[0129] On the platform corresponding to the Android operating system, the suffix of the dynamic link library file is usually .so (SharedObject), which can be called a so file, and usually contains code written in C or C++. Taking the preset acceleration library as a so file as an example, during the operation of the target application, if the second touch data meets the preset acceleration condition, the preset acceleration library is loaded to call the local function therein.
[0130] In order to identify the event type of the second touch data, in some embodiments, the second touch data can be monitored, and the event type of the second touch data can be determined during the monitoring process; during the running of the target application, the second touch data can be monitored, and if the event type of the second touch data is sliding, based on the preset interface, the local function in the preset acceleration library is loaded.
[0131] It should be understood that the main programming language for Android application development is Java. For the preset acceleration library containing native functions written in C or C++, the corresponding preset interface refers to the Java Native Interface (JNI) to achieve interaction between Java code and C or C++ code, that is, to achieve interaction between the target application and the preset acceleration library.
[0132] It should be understood that in the touch scene corresponding to the target application, each time the user uses a finger or a stylus to perform a touch action, pressing is the first event to be triggered and is the starting signal for the triggering operation. When the stylus clicks the canvas displayed on the interface, ACTION_DOWN is triggered first. This event can be used to determine the starting position of the touch, and it can be used to locate which drawing view (SurfaceView) the current touch action occurs on. In other words, based on ACTION_DOWN marking a starting point, subsequent touch actions will be based on this to determine the relative position and action type.
[0133] When the ACTION_DOWN event is triggered, Figure 4 The touch event corresponding to ACTION_DOWN is obtained in the manner shown, a first flag may be set, and the processing flow of subsequent events is determined by the state of the first flag.
[0134] It should be understood that usually in an interactive scenario, ACTION_DOWN and ACTION_UP will appear correspondingly. For example, the user presses the finger to trigger ACTION_DOWN, and then lifts the finger to trigger ACTION_UP. This is a completed click action.
[0135] Therefore, when the ACTION_DOWN event type is detected, the state of the first flag is adjusted to the on state, and when the ACTION_UP event type is detected, the state of the first flag is adjusted to the off state.
[0136] It should be understood that when the system or program is abnormal, the state of the first identification is also adjusted to the closed state.
[0137] Among them, when the first flag is in the on state, subsequent events will be processed by the preset acceleration library, and the Input subsystem will not process subsequent events according to the first flag of the on state to prevent occupying the current processing resource performance.
[0138] Figure 7 A flowchart of another touch data processing method in a display device in some embodiments of the present application is shown. Figure 7 As shown, the second touch data is monitored; if the event type of the second touch data is pressing, the state of the first identifier is adjusted to the on state; if the event type of the second touch data is sliding and the first identifier is in the on state, based on the preset interface, the local function in the preset acceleration library is loaded, and the Input subsystem stops reading, processing and distributing the second touch data.
[0139] It should be understood that for each touch action of the user, when the event type of the second touch data monitored is press, the state of the first identifier is adjusted to the on state, and when the event type of the second touch data monitored is lift, the state of the first identifier is adjusted to the off state.
[0140] It should also be understood that no matter whether the event type of the second touch data is pressing, sliding or lifting, as long as the first identifier is in the on state, the Input subsystem will stop reading, processing and distributing the second touch data. That is to say, when the first identifier is in the on state, no matter whether the specific touch action corresponding to the second touch data is a pressing action of a finger or a touch pen just touching the touch screen, a sliding action of moving on the screen, or a lifting action of a finger or a touch pen leaving the touch screen, the Input subsystem will no longer perform processing procedures such as data reading, processing and distribution to avoid unnecessary resource consumption or possible conflicts, and ensure that the system runs stably according to preset rules under specific conditions.
[0141] S630: Read and process the second touch data based on a preset acceleration library to obtain a target touch event corresponding to the second touch data.
[0142] It should be understood that in the embodiment of the present application, the second touch data is read and processed by calling a local function in a preset acceleration library; Figure 4 In the related technology shown, the process of reading and processing the second touch data through the Input subsystem is performed by different execution entities. In the embodiment of the present application, the second touch data is read and processed by calling the preset acceleration library through the target application, while in the related technology, the second touch data is read, processed and distributed through the Input subsystem.
[0143] in, Figure 8 A flowchart of another touch data processing method in a display device in some embodiments of the present application is shown. Figure 8 As shown, the controller is configured to perform the following steps in the process of reading and processing the second touch data based on the preset acceleration library:
[0144] S631 . Read second touch data based on a preset acceleration library and a device node.
[0145] It should be understood that the device node is used for the controller to interact with the touch screen, and the device node is stored in the display device in the form of a file; for example, the device node corresponding to the touch screen is the / dev / input / event0 file.
[0146] S632: Analyze, filter, and debounce the second touch data to obtain a target touch event.
[0147] It should be understood that the structure of a target touch event is the same as that of a motion event.
[0148] The second touch data is processed by a preset acceleration library, and a target touch event corresponding to the same structure as the motion event is obtained. For the target application, data conversion is not required, and the target touch event can be directly used.
[0149] like Figure 6 As shown, the process further includes S640, transmitting the target touch event back to the target application.
[0150] For a target touch event obtained by calling a preset acceleration library, the target touch event can be directly transmitted back to a target application through JNI for display.
[0151] It is no longer necessary to process touch events like the Input subsystem. The touch events in a unified format need to be distributed according to the needs of the upper-level application. The touch events are sent to the main thread of the application through the communication between the Input subsystem and the application. Then the track view corresponding to the touch event is displayed on the touch screen, such as Figure 4 Steps 540 and 550 shown in the figure, that is, the touch data processing method provided in the embodiment of the present application can Figure 4 Steps 540 and 550 in the embodiment are optimized to reduce the touch data processing flow and improve the touch data processing efficiency.
[0152] It should also be understood that compared with the data processing process of the Input subsystem in the system, the preset acceleration library only focuses on the reading and processing tasks of touch data, avoiding unnecessary functions and complexity, reducing the occupation of system resources, and improving the efficiency of data processing. In the embodiment of the present application, a series of specific functions of reading and processing touch data are encapsulated into a preset acceleration library, so that when applications such as whiteboards need to use the preset acceleration library function, they can directly open the device node corresponding to the touch screen through the preset acceleration library to read and process the touch data, and encapsulate it into a target touch event with the same motion event structure as the Input subsystem, thereby improving the touch data processing efficiency.
[0153] It should also be understood that after the target touch event is transmitted back to the target application, a touch track can be drawn according to the target touch event, and the touch track can be presented on the display component of the touch screen, and the speed of presenting the touch track matches the speed of the user's touch action.
[0154] Therefore, the embodiment of the present application provides a touch data processing method applied to a display device. By judging the second touch data, when the second touch data meets the preset acceleration condition, the second touch data can be processed by loading the preset acceleration library, and the processed target touch event is directly transmitted back to the target application. Compared with the touch data processing method in the related art, the touch data processing process is reduced, the efficiency of touch data processing is improved, and the speed of displaying the touch trajectory is increased, so that the speed of displaying the touch trajectory matches the speed of the user's touch action, thereby improving the user's intuitive feeling and interactive experience during the operation.
[0155] The above embodiments focus on how the display device reduces the touch data processing process and improves the touch data processing efficiency. The following embodiments describe in detail how to switch the touch data processing process during the use of the target application.
[0156] Fig. 9The schematic diagram of the result of the display device viewing the touch event in the embodiment of the present application is shown. When the touch pressure remains unchanged, it can be seen by viewing the command of the touch event that there is no parameter indicating the size of the touch area in the target touch event corresponding to the second touch data, such as Fig. 9 As shown in (a); or the touch area remains unchanged, by viewing the command of the touch event, it can be seen that there is no parameter indicating the size of the touch area in the target touch event corresponding to the second touch data, such as Fig. 9 As shown in (b); when the size parameter is set to a fixed value, by viewing the command of the touch event, it can be seen that there is no parameter representing the size of the touch area in the target touch event corresponding to the second touch data, such as Fig. 9 As shown in (c) in FIG. 1 , the parameters of the touch area size refer to ABS_MT_TOUCH_MAJOR and ABS_MT_TOUCH_MINOR.
[0157] However, in the case where the touch pressure changes, it can be known by looking at the command of the touch event that there are parameters indicating the size of the touch area in the target touch event corresponding to the second touch data, such as Fig. 9 As shown in (d) in .
[0158] In addition, there is a binding dependency between the target application and the preset acceleration library. The preset acceleration library can only be loaded and initialized when the target application is in use, and the initialization value in the preset acceleration library is zero. That is to say, if there is no parameter representing the touch area size in the target touch event corresponding to the second touch data, only the initialization value can be used, which will affect the display of the touch data.
[0159] Fig.10 A flowchart of another touch data processing method in a display device in some embodiments of the present application is shown. Fig.10 As shown, the controller is further configured to perform the following steps before acquiring the second touch data in response to the user's touch action in the interface presented by the target application:
[0160] S710: Acquire first touch data.
[0161] It should be understood that the first touch data is data generated by a touch action before entering the target application, and the data includes the size of the first touch area.
[0162] It should also be understood that during the use of the display device, the strength of the user's touch action varies. After the display device is turned on, when the user touches the display device for the first time, or when the strength of the touch action changes, the corresponding touch data generated includes the size of the touch area, that is, these data can all become the first touch data.
[0163] exist Fig. 9 (a) Fig. 9 (b) Fig. 9 In cases such as (c) in the figure, the size data of the touch area stops being reported.
[0164] For example, Figure 5 As shown in (a), the user clicks the icon of the whiteboard application in the system homepage with a touch pen or a finger. At this time, the data generated by the touch action is the first touch data. The first touch data includes information such as the position, size, and pressure of the touch area. The position of the touch area can be represented by the x and y coordinates in the screen coordinate system; the size of the touch area is represented by the parameters ABS_MT_TOUCH_MAJOR and ABS_MT_TOUCH_MINOR.
[0165] It should be understood that the Input subsystem writes the first touch data into the corresponding event0 file, which includes information such as the position, size, and pressure of the touch point. That is, the event0 file contains size parameters ABS_MT_TOUCH_MAJOR and ABS_MT_TOUCH_MINOR of the touch area corresponding to the first touch data.
[0166] S720: Process the first touch data based on the operating system in the display device to obtain the size of the first touch area in the initial touch event.
[0167] The encapsulation structure of the initial touch event and the encapsulation structure of the target touch event are the same as the encapsulation structure of the motion event.
[0168] It should be understood that the parameters ABS_MT_TOUCH_MAJOR and ABS_MT_TOUCH_MINOR corresponding to the size of the first touch area in the initial touch event have data.
[0169] Furthermore, after S640, that is, during the use of the target application, the controller is further configured to perform the following steps:
[0170] S730: When the size of the second touch area in the target touch event is an initial value, transmit the size of the first touch area to the target application.
[0171] S740: Determine the size of the contact area of the touch track corresponding to the target touch event based on the size of the first touch area.
[0172] It should be understood that the initial value of the size of the second touch area in the target touch event here is zero, and the touch trajectory cannot be drawn. Therefore, the size of the first touch area can be obtained from the device node so that the target touch event can draw the touch trajectory based on the size of the first touch area.
[0173] S750: When the size of the second touch area in the target touch event is updated, determine the size of the contact area of the touch track corresponding to the target touch event based on the updated size of the second touch area.
[0174] It should be understood that after the size of the second touch area in the target touch event is updated, the size of the second touch area is non-zero, that is, the size of the second touch area is a modified value. At this time, the touch track is drawn directly according to the parameter data in the target touch event.
[0175] It should also be understood that after the target touch event is transmitted back to the target application, a corresponding touch track can be drawn according to the target touch event, and the touch track can be presented on the display component of the touch screen. Since the process of processing the target touch event is reduced and the data processing efficiency is improved, the speed of presenting the touch track is increased. During the use process, the speed of presenting the touch track felt by the user matches the speed of the user's touch action, such as Fig.11 As shown, the user's intuitive feeling and interactive experience during the operation are improved.
[0176] Through the above embodiments, the size of the second touch area in the target touch event is the initial value or updated to the modified value as the basis for switching the touch event. By judging the size of the second touch area in the target touch event, the accuracy of drawing the touch track through the target touch event is improved.
[0177] Combination of the above Figures 6 to 11 , describes in detail the touch data processing method in the display device of the embodiment of the present application, and will be combined with Fig.12 It should be understood that the touch data processing device in the embodiment of the present application can execute various touch data processing methods in the aforementioned embodiment of the present application, that is, the specific working process of the following various products can refer to the corresponding process in the aforementioned method embodiment.
[0178] Fig.12 FIG. 8 is a schematic diagram of a touch data processing device provided in an embodiment of the present application. It should be understood that the touch data processing device 800 can execute Figures 6 to 11 The touch data processing method shown; the touch data processing device 800 includes a touch module 810, a loading module 820 and a processing module 830, wherein:
[0179] The touch module 810 is used to generate second touch data in response to a user's touch action within the interface presented by the target application.
[0180] The loading module 820 is used to load a preset acceleration library when the second touch data meets a preset acceleration condition, wherein the preset acceleration condition is used to filter the event type of the second touch data, and the preset acceleration library is used to provide an interface for the target application to read and process the second touch data.
[0181] The processing module 830 is used to read and process the second touch data based on a preset acceleration library, obtain a target touch event corresponding to the second touch data, and transmit the target touch event back to a target application.
[0182] Each unit module of the touch data processing device 800 can respectively execute the corresponding steps in the above method embodiment, so each unit module will not be described in detail here. Please refer to the description of the above corresponding steps for details.
[0183] It should be noted that the above touch data processing device 800 is embodied in the form of a functional unit. The term "unit" here can be implemented in the form of software and / or hardware, and is not specifically limited to this.
[0184] For example, a "unit" may be a software program, a hardware circuit, or a combination of the two that implements the above functions. The hardware circuit may include an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a dedicated processor, or a group processor, etc.) and a memory for executing one or more software or firmware programs, a combined logic circuit, and / or other suitable components that support the described functions.
[0185] Therefore, the units of each example described in the embodiments of the present application can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.
[0186] like Figure 1 , Figure 2 As shown, the display device 200 can be used to implement the display control method described in the above method embodiment.
[0187] The display device 200 may include one or more memories on which programs are stored. The programs can be executed by the controller 250 to generate instructions, so that the controller 250 executes the display control method described in the above method embodiment according to the instructions.
[0188] Optionally, data may be stored in the memory. Optionally, the controller 250 may read data stored in the memory, and the data may be stored in the same storage address as the program, or may be stored in a different storage address than the program.
[0189] The controller 250 and the memory may be provided separately or integrated together; for example, integrated on a system on chip (SOC) of the terminal device.
[0190] The present application also provides a computer program product, which, when executed by the controller 250, implements the display control method of any method embodiment in the present application.
[0191] The computer program product may be stored in a memory, for example, a program, which is finally converted into an executable target file that can be executed by the controller 250 after preprocessing, compiling, assembling and linking.
[0192] The present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a computer, the display control method of any method embodiment of the present application is implemented. The computer program can be a high-level language program or an executable target program.
[0193] The computer-readable storage medium is, for example, a memory. The memory may be a volatile memory or a nonvolatile memory, or the memory may include both a volatile memory and a nonvolatile memory. Among them, the nonvolatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).
[0194] In this application, "at least one" means one or more, and "plurality" means two or more. "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, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0195] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0196] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0197] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0198] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic; for example, the division of units is only a logical function division, and there may be other division methods in actual implementation; for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0199] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0200] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0201] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A display device, characterized in that: include: A touch screen, the touch screen comprising a touch component and a display component, the touch component is used to receive a user's touch action, and the display component is used to present an interface; A controller, the controller being configured to: In response to a touch action of a user within an interface presented by a target application, generating second touch data; When the second touch data meets a preset acceleration condition, loading a preset acceleration library, wherein the preset acceleration condition is used to filter the event type of the second touch data, and the preset acceleration library is used to provide the target application with an interface for reading and processing the second touch data; The second touch data is read and processed based on the preset acceleration library to obtain a target touch event corresponding to the second touch data, and the target touch event is transmitted back to the target application.
2. The display device according to claim 1, characterized in that When the second touch data meets the preset acceleration condition, the controller loads the preset acceleration library, and is configured as follows: monitoring the second touch data; If the event type of the second touch data is sliding, a local function in the preset acceleration library is called based on a preset interface.
3. The display device according to claim 1, characterized in that When the second touch data meets the preset acceleration condition, the controller loads the preset acceleration library, and is configured as follows: monitoring the second touch data; When the event type of the second touch data is pressing, adjusting the state of the first indicator to an on state; When the event type of the second touch data is sliding and the state of the first flag is on, a local function in the preset acceleration library is called based on a preset interface.
4. The display device according to claim 3, characterized in that After the controller adjusts the state of the first indicator to the on state, the controller is further configured to: The input subsystem in the display device stops reading, processing, and distributing the second touch data.
5. The display device according to claim 3, characterized in that After the controller adjusts the state of the first indicator to the on state, the controller is further configured to: When the event type of the second touch data is lift, the state of the first indicator is adjusted to a closed state.
6. The display device according to any one of claims 1 to 5, characterized in that: The controller is further configured to: Acquire first touch data, where the first touch data is data generated by a touch action before entering the target application, and the first touch data includes a size of a first touch area; The first touch data is processed based on an operating system in the display device to obtain a size of the first touch area in an initial touch event, wherein an encapsulation structure of the initial touch event is the same as an encapsulation structure of the target touch event.
7. The display device according to claim 6, characterized in that After the controller transmits the target touch event back to the target application, the controller is further configured to: When the size of the second touch area in the target touch event is an initial value, transmitting the size of the first touch area to the target application; Based on the size of the first touch area, a contact area size of the touch track corresponding to the target touch event is determined.
8. The display device according to claim 6, characterized in that After the controller transmits the target touch event back to the target application, the controller is further configured to: In a case where the size of the second touch area in the target touch event is updated, the size of the contact area of the touch track corresponding to the target touch event is determined based on the updated size of the second touch area.
9. The display device according to claim 1, characterized in that: The preset acceleration library is a dynamic link library file, and the controller reads and processes the second touch data based on the preset acceleration library to obtain a target touch event corresponding to the second touch data, and is configured as follows: Reading the second touch data based on the preset acceleration library and the device node, wherein the device node is used for the controller to interact with the touch screen, and the device node is stored in the display device in the form of a file; The second touch data is parsed, filtered, and debounced to obtain the target touch event.
10. A touch data processing method, characterized in that: Applied to the display device according to any one of claims 1 to 9, the touch data processing method comprises: In response to a user's touch action within an interface presented by a target application, generating touch data; When the second touch data meets a preset acceleration condition, loading a preset acceleration library, wherein the preset acceleration condition is used to filter the event type of the second touch data, and the preset acceleration library is used to provide the target application with an interface for reading and processing the second touch data; The second touch data is read and processed based on the preset acceleration library to obtain a target touch event corresponding to the second touch data, and the target touch event is transmitted back to the target application.