Identification method, device and equipment for specific touchpad equipment and storage medium

By modifying the device name and properties at the kernel driver level, registering the data bus interface, and generating and displaying the control interface, the problem of difficulty in identifying and accessing PS/2 interface protocol touchpad devices on laptops was solved, and normal control interface display was achieved.

CN120653313APending Publication Date: 2025-09-16ZHONGKE FANGDE SOFTWARE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510567805.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-30
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

In the prior art, a touchpad device using the PS/2 interface protocol is often identified as an ordinary mouse on a notebook computer, resulting in difficulty in identification and access, and an inability to display a normal control interface.

Method used

By improving the kernel driver level, the device name of the touchpad device is changed to Touchpad, and the target identification attribute is added to the attribute information. The data bus interface is registered and the device information is encapsulated to generate and display the control interface.

Benefits of technology

Ensure that the operating system kernel can normally identify the touchpad device of the PS/2 interface protocol and display a control interface that can be operated normally, solving the problem of difficulty in identification and access.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120653313A_ABST
    Figure CN120653313A_ABST
Patent Text Reader

Abstract

The invention provides an identification method and device of a specific touchpad device, an electronic device and a computer readable storage medium, which are applied to the technical field of computers, and comprise the following steps: traversing information of all access devices accessed to the electronic device, and when a target access device with a target device name and a target identification attribute is traversed, identifying the target access device; acquiring equipment information of target access equipment; the target identification attribute is used for representing the touchpad device based on the target interface protocol; registering a data bus interface and packaging equipment information; and in response to calling of the data bus interface, generating and displaying a control interface of the target access equipment based on the equipment information packaged by the data bus interface. According to the method and the device, the support defect of a bottom layer of an operating system on the touch panel equipment based on the target interface protocol in the related technology can be made up, and the condition that the kernel of the operating system can normally identify the touch panel equipment based on the target interface protocol and display a correct control interface capable of normally operating is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method and apparatus for identifying a specific touchpad device, an electronic device, and a computer-readable storage medium. Background Art

[0002] The touchpad device is an important external device of a notebook computer, which can facilitate the execution of many operations.

[0003] Currently, the touchpad device needs to be properly recognized and connected to the laptop computer. In addition, after connection, the laptop computer needs to display a corresponding control interface to control relevant parameters of the touchpad device.

[0004] However, in the current solution, due to challenges in hardware compatibility and driver support, the performance of the touchpad with PS / 2 interface protocol on laptops is not very ideal, resulting in frequent difficulties in identification and access. Even if it can be accessed normally, it is unable to display a control interface that can be operated normally. Summary of the Invention

[0005] The embodiments of the present application provide a method and apparatus for identifying a specific touch panel device to solve the problems in the prior art.

[0006] In a first aspect, an embodiment of the present application provides a method for identifying a specific touchpad device, the method comprising:

[0007] Traversing information of all access devices connected to the electronic device, and upon traversing to a target access device having a target device name and a target identification attribute, obtaining device information of the target access device; the target device name is a name of a touchpad device based on a target interface protocol, and the target identification attribute is used to represent the touchpad device based on the target interface protocol;

[0008] Registering the data bus interface and encapsulating the device information;

[0009] In response to the call to the data bus interface, a control interface of the target access device is generated and displayed based on the device information encapsulated by the data bus interface.

[0010] In a second aspect, an embodiment of the present application provides a device for identifying a specific touch panel device, the device comprising:

[0011] a traversal module, configured to traverse information of all access devices connected to the electronic device, and upon traversing to a target access device having a target device name and a target identification attribute, obtain device information of the target access device; the target device name is the name of a touchpad device based on a target interface protocol, and the target identification attribute is used to represent the touchpad device based on the target interface protocol;

[0012] A registration module, used for registering the data bus interface and encapsulating the device information;

[0013] A display module is used to generate and display the control interface of the target access device in response to the call of the data bus interface and based on the device information encapsulated by the data bus interface.

[0014] In a third aspect, an embodiment of the present application further provides an electronic device, including a processor;

[0015] a memory for storing instructions executable by the processor;

[0016] The processor is configured to execute the instructions to implement the method of the first aspect.

[0017] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which, when instructions in the computer-readable storage medium are executed by a processor of an electronic device, enables the electronic device to execute the method of the first aspect.

[0018] The embodiment of the present application can change the device name of the touchpad device based on the target interface protocol identified by the kernel to the name of the touchpad device, and add a target identification attribute for representing the touchpad device based on the target interface protocol in its attribute information. In this way, when the electronic device traverses the information of all access devices, the target access device with the target device name and the target identification attribute can be confirmed as a touchpad device based on the target interface protocol. Subsequently, the data bus interface is registered and the device information is encapsulated. The front end can call the data bus interface, and based on the device information encapsulated by the data bus interface, generate and display the control interface of the target access device. The embodiment of the present application can make up for the support defects of the underlying operating system for touchpad devices based on the target interface protocol in the related technology, and ensure that the operating system kernel can normally identify the touchpad device based on the target interface protocol, and display the correct control interface that can operate normally.

[0019] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 This is a flowchart of a method for identifying a specific touch panel device provided by an embodiment of the present application;

[0021] Figure 2 This is an interface diagram provided by an embodiment of the present application;

[0022] Figure 3 This is a flowchart of the specific steps of a method for identifying a specific touch panel device provided in an embodiment of the present application;

[0023] Figure 4 This is a workflow diagram of a touchpad recognition service provided by an embodiment of the present application;

[0024] Figure 5 This is a flowchart of starting a service of an electronic device provided by an embodiment of the present application;

[0025] Figure 6 This is an execution flow chart of a desktop control center service provided by an embodiment of the present application;

[0026] Figure 7 This is a flowchart of the execution of a kernel service provided by an embodiment of the present application;

[0027] Figure 8 This is a block diagram of an identification device for a specific touch panel device provided in an embodiment of the present application;

[0028] Figure 9 is a block diagram of an apparatus of the present application;

[0029] Figure 10 It is a schematic diagram of the structure of the server in some embodiments of the present application. DETAILED DESCRIPTION

[0030] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0031] The terms "first", "second", etc. in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, the term "and / or" in the specification and claims is used to describe the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. In the embodiments of this application, the term "multiple" refers to two or more, and other quantifiers are similar.

[0032] Figure 1 , is a flowchart of a method for identifying a specific touch panel device provided by an embodiment of the present application, such as Figure 1 As shown, the method may include:

[0033] Step 101: traverse information of all access devices connected to the electronic device, and when a target access device having a target device name and a target identification attribute is traversed, obtain device information of the target access device.

[0034] The target device name is the name of a touch panel device based on a target interface protocol, and the target identification attribute is used to indicate the touch panel device based on the target interface protocol.

[0035] In the related art, the core problem faced is that on laptops with Linux operating systems, touchpad devices with PS / 2 interfaces are often identified as ordinary mice, resulting in the inability to display and control the touchpad devices normally in the system settings. This is due to incompatible driver versions of the Linux operating system, conflicts in the psmouse modules, and incompatible control interfaces. Specifically, different Linux distributions in the related art may use different versions of drivers, and some versions of drivers have weak support for the PS / 2 interface and cannot fully report some features of the touchpad device. Even if the touchpad device itself can work normally, compatibility issues at the driver layer will still affect its performance in the system settings. In addition, the Linux operating system supports the input of touchpad devices with PS / 2 interfaces through the psmouse module, and modern input frameworks (such as libinput) sometimes conflict with the psmouse module. Libinput is responsible for processing newer input devices, but for touchpad devices with PS / 2 interfaces, it may not correctly identify certain hardware features, resulting in the inability to display or control in the settings interface. Furthermore, the touchpad setting interface of some Linux distributions or desktop environments may not fully support PS / 2 interface touchpad devices, resulting in the interface being unable to correctly identify or display the touchpad.

[0036] The embodiments of the present application solve these problems through improvements at the kernel driver level, application level, and interface display level, thereby ensuring that the touchpad device based on the target interface protocol can be normally identified and accessed on a laptop computer with a Linux operating system, and can be normally controlled through the control interface.

[0037] Among them, psmouse is a device driver for the PS / 2 port controller of the Linux operating system. In the embodiment of the present application, the target interface protocol can be a PS / 2 interface protocol. The PS / 2 interface is an interface on a compatible computer system that can be used to connect external devices such as a keyboard and a mouse. The PS / 2 interface protocol is a serial communication protocol used to connect a computer to a keyboard or a mouse.

[0038] In an embodiment of the present application, improvements can be implemented at the kernel driver level. For a touchpad device based on a target interface protocol identified by the kernel, its device name can be changed to the name of the touchpad device (such as Touchpad), and a target identification attribute (such as INPUT_PROP_BUTTONPAD) for representing a touchpad device based on a target interface protocol is added to its attribute information. In this step, when the electronic device is started, the information of all access devices connected to the electronic device can be traversed through the newly added touchpad identification service. When a target access device with a target device name (such as Touchpad) and a target identification attribute (such as INPUT_PROP_BUTTONPAD) is traversed, it can be confirmed that the target access device is a touchpad device based on the target interface protocol. At this time, the device information of the target access device can be obtained, such as the enable / disable status, pointer speed, natural scrolling status, etc. of the touchpad device.

[0039] Through the above improvements to the kernel driver level, the defects in the underlying operating system's support for touchpad devices based on the target interface protocol in the related technology can be compensated, ensuring that the operating system kernel can normally identify the touchpad device based on the target interface protocol and successfully obtain the device information of the touchpad device based on the target interface protocol, thereby avoiding the misidentification of the touchpad device based on the target interface protocol (such as identifying it as a mouse device).

[0040] Step 102: Register the data bus interface and encapsulate the device information.

[0041] In an embodiment of the present application, after obtaining the device information of the target access device, a DBUS (data bus) interface can be registered, and the obtained device information can be encapsulated through the DBUS interface. The DBUS interface can implement a method of inter-process communication, the purpose of which is to pass kernel events to the process as messages. After the process is registered with the DBUS interface, it can receive or pass messages through the bus, and the process can also wait for kernel event responses after registration. In an embodiment of the present invention, the touchpad identification service can add the obtained device information of the target access device (touchpad device based on the target interface protocol) as a message into the DBUS interface, and the subsequent desktop control center service can obtain the device information required for interface rendering by calling the DBUS interface.

[0042] Specifically, in one example, for DBUS interface design, the interface definition includes:

[0043] Service name: org.ps.TouchpadConfig

[0044] Object path: / org / ps / TouchpadConfig / Manager

[0045] Interface name: org.ps.TouchpadConfig.Manager

[0046] The interface methods include:

[0047] GetDevice / / Get device

[0048] GetDeviceProperties / / Get device properties

[0049] Interface attributes need to encapsulate device information including device type (touchpad), hardware identification, supported configuration items (such as sensitivity adjustment, whether to support tap click), etc.:

[0050] DeviceType / / Type

[0051] HardwareID / / Hardware ID

[0052] SensitivitySupport / / Sensitivity adjustment is supported

[0053] TapToClickSupport / / Touch to click support

[0054] Step 103: In response to the call to the data bus interface, a control interface of the target access device is generated and displayed based on the device information encapsulated by the data bus interface.

[0055] In an embodiment of the present application, the desktop control center service at the front end of the electronic device can be used to render and display the control interface of each connected device. Therefore, after the electronic device correctly identifies the connected touchpad device based on the target interface protocol, the desktop control center service can call the data bus interface to obtain the device information of the touchpad device based on the target interface protocol. The desktop control center service can then render and generate the corresponding control interface based on the device information of the touchpad device and display it.

[0056] For example, refer to Figure 2 , which shows an interface diagram. Assuming that the device information of a touchpad device includes the enabled state, pointer speed, and natural scrolling state, when rendering and generating the control interface, control 10 can be generated for the enabled state, control 20 for the pointer speed, and control 30 for the natural scrolling state. Controls 10 and 30 are toggle buttons that can be enabled or disabled; control 20 is a drag progress bar control, and the pointer speed can be adjusted by dragging the slider.

[0057] In summary, the embodiment of the present application can change the device name of the touchpad device based on the target interface protocol identified by the kernel to the name of the touchpad device, and add a target identification attribute for representing the touchpad device based on the target interface protocol in its attribute information. In this way, when the electronic device traverses the information of all access devices, the target access device with the target device name and the target identification attribute can be confirmed as a touchpad device based on the target interface protocol. Subsequently, the data bus interface is registered and the device information is encapsulated. The front end can call the data bus interface, and based on the device information encapsulated by the data bus interface, generate and display the control interface of the target access device. The embodiment of the present application can make up for the support defects of the underlying operating system for touchpad devices based on the target interface protocol in the related art, ensure that the operating system kernel can normally identify the touchpad device based on the target interface protocol, and display the correct control interface that can operate normally.

[0058] Figure 3 , is a flowchart of the specific steps of a method for identifying a specific touch panel device provided in an embodiment of the present application, such as Figure 3 As shown, the method may include:

[0059] Step 201: traverse the information of all access devices connected to the electronic device through the identification process of the touchpad identification service, and when traversing to a target access device with a target device name and a target identification attribute, call the libinput interface to obtain the device information of the target access device.

[0060] Optionally, the device information includes the activation status, pointer speed, and natural scrolling status of the target access device; and the control interface includes control controls for each piece of device information.

[0061] In an embodiment of the present application, a touchpad identification service touchpad-config.service can be added to the electronic device. The touchpad identification service touchpad-config.service mainly focuses on the identification of touchpad devices based on the target interface protocol. The identification process touchpad-config of the touchpad identification service touchpad-config.service can traverse the information of all access devices connected to the electronic device, and when traversing to the target access device with the target device name and the target identification attribute, call the libinput interface to obtain the device information of the target access device. Among them, the libinput interface is the core component of the input subsystem of the operating system.

[0062] Specifically, refer to Figure 4 , which shows a workflow diagram of a touchpad recognition service, including:

[0063] S1. Obtain the device names of all connected devices through traversal operations.

[0064] S2. Determine whether the device name of the access device is the target device name (Generic PS2 Touchpad).

[0065] If not, the process ends. If yes, the process proceeds to S3, obtaining device attributes of the access device.

[0066] S4. Determine whether the device attribute is the target identification attribute (INPUT_PROP_BUTTONPAD).

[0067] If not, then the process ends. If yes, then S5 is executed to register the DBUS interface and encapsulate the device information of the access device.

[0068] Furthermore, the device information includes but is not limited to the activation state, pointer speed, and natural scrolling state of the target access device. These device information can be parameter information required for the subsequent control interface to control the touchpad device. Correspondingly, the control interface includes control controls for each device information. For example, referring to Figure 2 , a control 10 can be generated for the enabled state, a control 20 can be generated for the pointer speed, and a control 30 can be generated for the natural scrolling state. Among them, controls 10 and 30 are switch buttons that can be selected to be enabled or disabled; control 20 is a drag progress bar control, and the pointer speed can be adjusted by dragging the slider.

[0069] Step 202: Register the data bus interface and encapsulate the device information through the identification process.

[0070] The touchpad recognition service is automatically started when the computer is powered on, and the touchpad recognition service is started before the desktop control center service of the electronic device.

[0071] In an embodiment of the present application, the identification process touchpad-config of the touchpad identification service touchpad-config.service can register the data bus interface and encapsulate the device information. In addition, the touchpad identification service is a self-starting service at startup, and the touchpad identification service is started before the desktop control center service of the electronic device. This is because the desktop control center service is a service for rendering and displaying the control interface of each access device. If the touchpad identification service is started after the desktop control center service of the electronic device, the desktop control center service will not be able to obtain the required device information of the touchpad device when generating the control interface of the touchpad device, resulting in the inability to generate the control interface.

[0072] Reference Figure 5, which shows a service startup flow chart for an electronic device. After the electronic device is powered on, the process sequentially starts the Basic Input and Output System (BIOS), loads the kernel, initializes the system, and starts services. During the service startup process, the touchpad recognition service, touchpad-config.service, starts before the desktop control center service, touchpad-config.service.

[0073] Step 203: In response to the desktop control center service calling the data bus interface, the device information encapsulated by the data bus interface is filled into the preset interface template as a parameter.

[0074] Step 204: Render the filled interface template to obtain and display the control interface.

[0075] In an embodiment of the present application, for steps 203-204, the desktop control center service at the front end of the electronic device can be used to render and display the control interface of each connected device. In an embodiment of the present application, page template technology can be applied, that is, an interface template for the touchpad device is pre-set in advance, and when the desktop control center service calls the data bus interface, the device information encapsulated by the data bus interface is filled into the preset interface template as a parameter. The filled interface template is then rendered to obtain and display the control interface.

[0076] Optionally, step 203 may specifically include sub-steps 2031-2032:

[0077] Sub-step 2031: detecting touch panel devices of other interface protocols through the desktop control center service to obtain a detection result, where the other interface protocols are different from the target interface protocol.

[0078] Sub-step 2032: When the detection result is no detection, in response to the desktop control center service calling the data bus interface, the device information encapsulated by the data bus interface is filled into the preset interface template as a parameter.

[0079] In an embodiment of the present application, for sub-steps 2031-2032, the desktop control center service has native judgment logic. The judgment logic is used to detect whether the electronic device is connected to a touchpad device with an interface protocol other than the PS / 2 protocol. If it is detected that the electronic device is connected to a touchpad device with an interface protocol other than the PS / 2 protocol, the processing of the touchpad device based on the target interface protocol can be stopped, and the drawing process of the control interface of the touchpad device with the other interface protocol can be executed. If it is not detected that the electronic device is connected to a touchpad device with another interface protocol, in response to the desktop control center service's call to the data bus interface, the device information encapsulated by the data bus interface is filled into the preset interface template as a parameter. The embodiment of the present application uses the native judgment logic of the desktop control center service to process touchpad devices with other interface protocols normally, thereby preventing touchpad devices with other interface protocols from being unable to display the control interface normally.

[0080] Reference Figure 6 , which shows an execution flow chart of a desktop control center service, including:

[0081] M1. Determine whether a touch panel device with other interface protocols is detected.

[0082] If yes, the process ends; if no, M2 is executed, the DBUS interface is called, and the device information encapsulated by the DBUS interface is obtained.

[0083] M3. Determine whether the acquired device information is empty.

[0084] If yes, the process ends; if no, M4 is executed to draw the control interface according to the device information.

[0085] Optionally, the target interface protocol is a PS / 2 interface protocol; the method may further include:

[0086] Step 205: When the device driver based on the PS / 2 interface protocol is loaded, obtain the identification result of the access device and the device type of the electronic device.

[0087] Step 206: When it is determined that the access device is the touchpad device based on the PS / 2 interface protocol according to the identification result and the device type, a target device name is configured for the access device, and a target identification attribute is added to the attributes of the access device.

[0088] In this embodiment of the present application, regarding steps 205-206, the PS / 2 interface is an interface on a compatible computer system that can be used to connect external devices such as a keyboard and mouse. The PS / 2 interface protocol is a serial communication protocol used to connect a computer to a keyboard or mouse. This embodiment of the present application focuses on the normal recognition and access of a touchpad device using the PS / 2 interface protocol on a laptop computer and the display of the corresponding control interface.

[0089] Therefore, based on the above requirements, the embodiments of the present application need to implement improvements at the kernel driver level to add the function of accurately identifying the touchpad device of the PS / 2 interface protocol in the laptop, and modifying the device name and adding device attributes for the touchpad device of the PS / 2 interface protocol. Specifically, when the device driver based on the PS / 2 interface protocol (such as psmouse) is loaded, the kernel can directly obtain the kernel's recognition result of the access device and the device type of the electronic device.

[0090] Furthermore, based on the identification result and the device type, it can be determined whether the connected device is a touchpad device based on the PS / 2 interface protocol. Specifically, the logic is as follows: This embodiment of the application defines a device using the PS / 2 interface protocol connected to a laptop computer as a touchpad device. Based on this definition, if the identification result indicates that the connected device is a device using the PS / 2 interface protocol, and the device type of the electronic device is a laptop computer, the current connected device is determined to be a touchpad device based on the PS / 2 interface protocol.

[0091] When the currently connected device is determined to be a touchpad device based on the PS / 2 interface protocol, the embodiment of the present application can modify the name of the currently connected device to the target device name "Touchpad" and add a target identification property "INPUT_PROP_BUTTONPAD" when setting the device properties to indicate that the device is a touchpad device. This allows the touchpad identification service to subsequently find the touchpad device based on the target device name and target identification properties when traversing each connected device.

[0092] Optionally, step 205 may specifically include:

[0093] Sub-step 2051: Obtain the device type of the electronic device through the DMI interface of the kernel.

[0094] In an embodiment of the present application, the interface "chassis_types_is_notebook" for identifying a laptop computer can be encapsulated. This interface is mainly used to obtain the device type of the electronic device from the kernel's DMI interface "dmi_get_system_info". If the device type is 0x09 (notebook) or 0x0A (netbook), it is determined to be a laptop computer.

[0095] Optionally, step 206 may specifically include:

[0096] Sub-step 2061: When the identification result is that the access device is a device based on the PS / 2 interface protocol and the device type is a notebook device type, determine that the access device is a touchpad device based on the PS / 2 interface protocol.

[0097] This embodiment of the present application defines a device using the PS / 2 interface protocol connected to a laptop computer as a touchpad device. Based on this definition, if the identification result indicates that the connected device is a device using the PS / 2 interface protocol, and the device type of the electronic device is a laptop computer, it can be determined that the current connected device is a touchpad device using the PS / 2 interface protocol.

[0098] Reference Figure 7 , which shows an execution flow chart of a kernel service, including:

[0099] N1. The psmouse driver is loaded.

[0100] N2. Determine whether the device is a PS / 2 interface protocol device.

[0101] If not, the process ends; if so, execute N3 to determine whether the electronic device is a laptop computer.

[0102] If not, the process ends; if so, execute N4, add target identification attributes to the device attributes.

[0103] N5. Set the device name to the target device name.

[0104] In summary, the embodiment of the present application can change the device name of the touchpad device based on the target interface protocol identified by the kernel to the name of the touchpad device, and add a target identification attribute for representing the touchpad device based on the target interface protocol in its attribute information. In this way, when the electronic device traverses the information of all access devices, the target access device with the target device name and the target identification attribute can be confirmed as a touchpad device based on the target interface protocol. Subsequently, the data bus interface is registered and the device information is encapsulated. The front end can call the data bus interface, and based on the device information encapsulated by the data bus interface, generate and display the control interface of the target access device. The embodiment of the present application can make up for the support defects of the underlying operating system for touchpad devices based on the target interface protocol in the related art, ensure that the operating system kernel can normally identify the touchpad device based on the target interface protocol, and display the correct control interface that can operate normally.

[0105] Figure 8 : is a block diagram of a device for identifying a specific touch panel device provided in an embodiment of the present application, the device comprising:

[0106] A traversal module 301 is configured to traverse information of all access devices connected to the electronic device and, upon traversing to a target access device having a target device name and a target identification attribute, obtain device information of the target access device; the target device name is the name of a touchpad device based on a target interface protocol, and the target identification attribute is used to indicate the touchpad device based on the target interface protocol;

[0107] A registration module 302 is used to register the data bus interface and encapsulate the device information;

[0108] The display module 303 is configured to generate and display the control interface of the target access device in response to the call of the data bus interface and based on the device information encapsulated by the data bus interface.

[0109] Optionally, the target interface protocol is a PS / 2 interface protocol; and the device further comprises:

[0110] an acquisition submodule, configured to acquire, when a device driver based on the PS / 2 interface protocol is loaded, an identification result of an access device and a device type of the electronic device;

[0111] The configuration submodule is used to configure a target device name for the access device when it is determined that the access device is the touchpad device based on the PS / 2 interface protocol according to the identification result and the device type, and to add a target identification attribute to the attributes of the access device.

[0112] Optionally, the configuration submodule includes:

[0113] A determination unit is configured to determine that the access device is a touchpad device based on the PS / 2 interface protocol when the identification result shows that the access device is a device based on the PS / 2 interface protocol and the device type is a notebook device type.

[0114] Optionally, the acquisition submodule includes:

[0115] The acquiring unit is configured to acquire the device type of the electronic device through the DMI interface of the kernel.

[0116] Optionally, the traversal module 301 includes:

[0117] A calling submodule is used to traverse the information of all access devices connected to the electronic device through the identification process of the touchpad identification service, and when a target access device with a target device name and a target identification attribute is traversed, the libinput interface is called to obtain the device information of the target access device;

[0118] The registration module 302 includes:

[0119] An encapsulation submodule, configured to register a data bus interface through the identification process and encapsulate the device information;

[0120] The touchpad recognition service is automatically started when the computer is powered on, and the touchpad recognition service is started before the desktop control center service of the electronic device.

[0121] Optionally, the display module 303 includes:

[0122] A filling submodule, configured to, in response to a call to the data bus interface by the desktop control center service, fill the device information encapsulated by the data bus interface as a parameter into a preset interface template;

[0123] The rendering submodule is used to render the filled interface template to obtain and display the control interface.

[0124] Optionally, the display module 303 includes:

[0125] a detection submodule, configured to detect touch panel devices of other interface protocols through the desktop control center service and obtain a detection result, wherein the other interface protocols are different from the target interface protocol;

[0126] The parameter submodule is used to fill the device information encapsulated by the data bus interface as a parameter into the preset interface template in response to the call of the data bus interface by the desktop control center service when the detection result is not detected.

[0127] Optionally, the device information includes the activation status, pointer speed, and natural scrolling status of the target access device; and the control interface includes control controls for each piece of device information.

[0128] In summary, the embodiments of the present application can change the device name of the touchpad device based on the target interface protocol identified by the kernel to the name of the touchpad device, and add a target identification attribute for representing the touchpad device based on the target interface protocol in its attribute information. In this way, when the electronic device traverses the information of all access devices, the target access device with the target device name and the target identification attribute can be confirmed as a touchpad device based on the target interface protocol. Subsequently, the data bus interface is registered and the device information is encapsulated. The front end can call the data bus interface, and based on the device information encapsulated by the data bus interface, generate and display the control interface of the target access device. The embodiments of the present application can make up for the support defects of the underlying operating system for touchpad devices based on the target interface protocol in the related technology, and ensure that the operating system kernel can normally identify the touchpad device based on the target interface protocol, and display the correct control interface that can operate normally.

[0129] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0130] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0131] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0132] An embodiment of the present application provides an identification device for a specific touchpad device, comprising a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors to include methods for performing one or more of the above embodiments.

[0133] Figure 9 FIG8 is a block diagram of an apparatus 800 for identifying a specific touch panel device according to an exemplary embodiment. For example, the apparatus 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0134] Reference Figure 9, the device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .

[0135] The processing component 802 generally controls the overall operation of the device 800, such as operations associated with display, phone calls, data communications, camera operation, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to perform all or part of the steps of the above-described method. In addition, the processing component 802 may include one or more modules to facilitate interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.

[0136] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.

[0137] The power supply component 806 provides power to the various components of the device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device 800.

[0138] The multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensor can not only sense the boundaries of the touch or slide action, but also check the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have a focal length and optical zoom capability.

[0139] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), which is configured to receive external audio signals when the device 800 is in an operating mode, such as a call mode, a recording mode, and a voice information processing mode. The received audio signal can be further stored in the memory 804 or transmitted via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.

[0140] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as a keyboard, click wheel, buttons, etc. These buttons may include but are not limited to: a home button, volume buttons, a start button, and a lock button.

[0141] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the device 800. The sensor assembly 814 can also search for changes in the position of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration / deceleration of the device 800, and the temperature change of the device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0142] The communication component 816 is configured to facilitate wired or wireless communication between the device 800 and other devices. The device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency information processing (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0143] In an exemplary embodiment, the apparatus 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above-described method.

[0144] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by the processor 820 of the apparatus 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0145] Figure 10 19 is a schematic diagram of the structure of the server in some embodiments of the present application. The server 1900 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPUs) 1922 (for example, one or more processors) and memories 1932, and one or more storage media 1930 (for example, one or more mass storage devices) for storing application programs 1942 or data 1944. Among them, the memories 1932 and the storage media 1930 can be short-term storage or persistent storage. The program stored in the storage medium 1930 may include one or more modules, each of which may include a series of instruction operations on the server. Furthermore, the central processing unit 1922 can be configured to communicate with the storage medium 1930 to execute a series of instruction operations in the storage medium 1930 on the server 1900.

[0146] The server 1900 may also include one or more power supplies 1926, one or more wired or wireless network interfaces 1950, one or more input and output interfaces 1958, one or more keyboards 1956, and / or one or more operating systems 1941, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0147] A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a device (server or terminal), enables the device to perform the above-mentioned embodiment method.

[0148] A non-temporary computer-readable storage medium, when the instructions in the storage medium are executed by the processor of the device (server or terminal), enables the device to perform the description of the method of the above embodiment, so it will not be repeated here. In addition, the description of the beneficial effects of adopting the same method will not be repeated. For technical details not disclosed in the computer program product or computer program embodiment involved in this application, please refer to the description of the method embodiment of this application.

[0149] In addition, it should be noted that the embodiments of the present application also provide a computer program product or computer program, which may include computer instructions, which may be stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor may execute the computer instructions, so that the computer device performs the description of the method of the above embodiment, and therefore, it will not be repeated here. In addition, the description of the beneficial effects of adopting the same method will not be repeated. For technical details not disclosed in the computer program product or computer program embodiment involved in this application, please refer to the description of the method embodiment of this application.

[0150] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the application disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0151] It should be understood that the present application is not limited to the exact structures described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

[0152] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application.

[0153] The above is a detailed introduction to the identification method, device, electronic device and computer-readable storage medium of a specific touchpad device provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core ideas of the present application. At the same time, for those skilled in the art, according to the ideas of the present application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present application.

Claims

1. A method for identifying a specific touchpad device, characterized in that: The method comprises: Traversing information of all access devices connected to the electronic device, and upon traversing to a target access device having a target device name and a target identification attribute, obtaining device information of the target access device; the target device name is a name of a touchpad device based on a target interface protocol, and the target identification attribute is used to represent the touchpad device based on the target interface protocol; Registering the data bus interface and encapsulating the device information; In response to the call to the data bus interface, a control interface of the target access device is generated and displayed based on the device information encapsulated by the data bus interface.

2. The method for identifying a specific touch panel device according to claim 1, wherein: The target interface protocol is a PS / 2 interface protocol; the method further comprises: When a device driver based on the PS / 2 interface protocol is loaded, obtaining an identification result of the access device and a device type of the electronic device; When it is determined that the access device is the touch panel device based on the PS / 2 interface protocol according to the identification result and the device type, a target device name is configured for the access device, and a target identification attribute is added to the attributes of the access device.

3. The method for identifying a specific touch panel device according to claim 2, wherein: The step of determining, based on the identification result and the device type, that the access device is the touchpad device based on the PS / 2 interface protocol includes: When the identification result is that the access device is a device based on the PS / 2 interface protocol and the device type is a notebook device type, it is determined that the access device is a touchpad device based on the PS / 2 interface protocol.

4. The method for identifying a specific touch panel device according to claim 2, wherein: The obtaining the device type of the electronic device includes: The device type of the electronic device is obtained through the DMI interface of the kernel.

5. The method for identifying a specific touch panel device according to claim 1, wherein: The traversing information of all access devices connected to the electronic device and acquiring device information of the target access device when a target access device having a target device name and a target identification attribute is found, includes: Through the identification process of the touchpad identification service, traverse the information of all access devices connected to the electronic device, and when traversing to a target access device with a target device name and a target identification attribute, call the libinput interface to obtain the device information of the target access device; The registering data bus interface and encapsulating the device information includes: Registering a data bus interface and encapsulating the device information through the identification process; The touchpad recognition service is automatically started when the computer is powered on, and the touchpad recognition service is started before the desktop control center service of the electronic device.

6. The method for identifying a specific touch panel device according to claim 1, wherein: The step of generating and displaying a control interface of the target access device in response to the calling of the data bus interface and based on the device information encapsulated by the data bus interface includes: In response to the desktop control center service calling the data bus interface, the device information encapsulated by the data bus interface is filled into the preset interface template as a parameter; The filled interface template is rendered to obtain the control interface and display it.

7. The method for identifying a specific touch panel device according to claim 6, wherein: The step of responding to the desktop control center service calling the data bus interface and filling the device information encapsulated by the data bus interface as a parameter into a preset interface template includes: Detecting touch panel devices of other interface protocols through the desktop control center service to obtain a detection result, wherein the other interface protocols are different from the target interface protocol; When the detection result is that no device is detected, in response to the desktop control center service calling the data bus interface, the device information encapsulated by the data bus interface is used as a parameter to fill in the preset interface template.

8. The method for identifying a specific touch panel device according to claim 1, wherein: The device information includes the activation state, pointer speed, and natural scrolling state of the target access device; and the control interface includes control controls for each piece of device information.

9. A device for identifying a specific touch panel device, characterized in that: The device comprises: a traversal module, configured to traverse information of all access devices connected to the electronic device, and upon traversing to a target access device having a target device name and a target identification attribute, obtain device information of the target access device; the target device name is the name of a touchpad device based on a target interface protocol, and the target identification attribute is used to represent the touchpad device based on the target interface protocol; A registration module, used for registering the data bus interface and encapsulating the device information; A display module is used to generate and display the control interface of the target access device in response to the call of the data bus interface and based on the device information encapsulated by the data bus interface.

10. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the method according to any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Detection method and device of touchpad equipment, terminal equipment and computer medium

    CN117891358A

  • Electronic presentation repository and interface

    US20160092443A1