TV device mouse control method, device, TV device and medium
By installing a mouse control software package in a smart TV device, connecting to the TV device using communication methods such as LAN and Bluetooth, and displaying the mouse logo according to the page type, the problem that smart TV devices cannot support mouse operation is solved, diversified user control needs are achieved and application stability and user experience are improved.
Patent Information
- Application Number
- CN202410217783.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-27
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2044-02-27
AI Technical Summary
Existing smart TV devices cannot support mouse operation, resulting in limited user operation capabilities when using complex application software.
By installing a mouse control software package in the TV device, using local area network, Bluetooth, infrared and other communication methods to establish a connection between the mouse terminal and the TV device, display the mouse logo according to the page type, and parse the mouse operation instructions to perform the corresponding operations.
It supports mouse operation on smart TV devices, meets users' diverse control needs, and improves application stability and user experience.
Smart Images

Figure CN118138817B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and particularly to a method and device for controlling a mouse of a television device, a television device, and a medium. Background Art
[0002] With the development of smart TV technology, smart TVs can not only receive TV broadcasts like ordinary TVs, but also install various application software to meet other application needs of users in addition to watching TV broadcasts.
[0003] Specifically, in order to meet the diverse usage needs of users, smart TVs often need to provide users with diverse operation capabilities. Conventional TVs usually only support remote control, but the operation capabilities supported by the remote control are limited and far less than those of mouse operations. Therefore, a solution that can meet the mouse control requirements on the TV side is needed. Summary of the Invention
[0004] Embodiments of this application provide a method and device for controlling a mouse of a television device, a smart television device, and a medium, to provide a solution that can meet the mouse control requirements of a television device.
[0005] In a first aspect, an embodiment of this application provides a method for controlling a mouse of a television device, which is applied to a television device. The method includes:
[0006] Obtain and install a mouse control software package;
[0007] Establish a connection relationship between the mouse end and the television device through a specified communication method supported by the mouse control software package;
[0008] When the connection relationship is successfully established through the specified communication method, display a mouse icon based on the current displayed page in a mode matching the page type, so that after receiving a mouse operation instruction, corresponding operations can be performed on the television device through the mouse control software.
[0009] Optionally, the step of "when the connection relationship is successfully established through the specified communication method, display a mouse icon based on the current displayed page in a mode matching the page type" includes:
[0010] After the connection relationship is successfully established through the specified communication method, if the page type of the current displayed page is a global page, display the mouse icon in the global mouse mode on the current displayed page; where the global mouse mode means that the mouse icon supports display, movement, and operation in the overall TV interface;
[0011] If the page type of the current display page is a partial page, the mouse identifier is displayed on the current display page in a partial mouse mode; wherein, the partial mouse mode means that the mouse identifier supports display, movement, and operation on a partial page or a specified application page.
[0012] Optionally, it further includes:
[0013] When performing a page switch on the current display page, if the page switch is a partial page switch, the first mouse information corresponding to the mouse identifier on the current display page is destroyed;
[0014] After switching to the new partial page, the second mouse information corresponding to the new partial page is created, and the mouse identifier is displayed on the new partial page; wherein, the mouse display attributes in the first mouse information and the second mouse information remain unchanged.
[0015] Optionally, it further includes:
[0016] When performing a page switch on the current display page, if the page switch is a global page switch, the first mouse information corresponding to the mouse identifier on the current display page is not destroyed.
[0017] Optionally, establishing a connection relationship between the mouse end and the TV device through the specified communication method supported by the mouse control software package includes:
[0018] If the specified communication method supported by the mouse control software package includes at least one of a local area network communication method, a Bluetooth communication method, and an infrared communication method, then select one of the specified communication methods to establish the connection relationship between the mouse end and the TV device.
[0019] Optionally, when the connection relationship is successfully established through the specified communication method, displaying the mouse identifier based on the current display page in a mode matching the page type includes:
[0020] When one of the selected specified communication methods is the local area network communication method, detect whether the local area network communication method is successfully established; if not, do not display the mouse identifier and display a prompt message indicating that the communication connection fails; or,
[0021] When one of the selected specified communication methods is other than the local area network communication method, do not detect whether the local area network communication method is successfully established and display the mouse identifier.
[0022] Optionally, after receiving a mouse operation instruction, performing a corresponding operation on the TV device through the mouse control software includes:
[0023] Register the mouse hardware monitoring event;
[0024] After receiving the mouse operation instruction provided by the mouse end, parse the mouse operation instruction through the mouse monitoring software;
[0025] Determine the mouse coordinate information and mouse button type carried by the mouse operation instruction; wherein, the mouse button type includes at least one of: single click, right click, double click, move, drag, slide;
[0026] Execute corresponding operations on the TV device based on the mouse coordinate information and the mouse button type.
[0027] Optionally, it further includes: when the mouse display attribute of the mouse identifier is set to disappear upon exit, if exiting the local page or the global page, the mouse identifier disappears;
[0028] When the mouse display attribute of the mouse identifier is set to not disappear upon exit, if exiting the local page, the mouse identifier does not disappear; if exiting the global page, the mouse identifier disappears.
[0029] In a second aspect, an embodiment of the present application provides a mouse control device for a TV device, and the device includes:
[0030] An acquisition module, configured to acquire and install a mouse control software package;
[0031] A relationship establishment module, configured to establish a connection relationship between the mouse end and the TV device through a specified communication method supported by the mouse control software package;
[0032] A display module, configured to when the connection relationship is successfully established through the specified communication method, display a mouse identifier based on the current display page in a mode matching the page type, so as to execute corresponding operations on the TV device through the mouse control software after receiving a mouse operation instruction.
[0033] In a third aspect, an embodiment of the present application provides a TV device, including: a memory, a processor; wherein, an executable code is stored on the memory, and when the executable code is executed by the processor, the processor executes the method described in the first aspect.
[0034] In a fourth aspect, an embodiment of the present application provides a computer-readable medium, on which at least one instruction, at least one segment of program, code set or instruction set is stored, and the at least one instruction, at least one segment of program, code set or instruction set is loaded and executed by a processor to implement the method described in the first aspect.
[0035] In the solution of the present application, a television device acquires and installs a mouse control software package; establishes a connection relationship between a mouse end and the television device through a specified communication method supported by the mouse control software package; when the connection relationship is successfully established through the specified communication method, a mouse identifier is displayed based on the currently displayed page in a mode matching the page type, so that after receiving a mouse operation instruction, corresponding operations can be performed on the television device through the mouse control software. Through the above solution, after installing the mouse control software package on the television side, with the support of the mouse control software, the mouse end can establish a connection relationship with the television device. Furthermore, a mouse identifier is displayed on the currently displayed page, and this mouse identifier can be manipulated with the help of the mouse control software, that is, it is possible to perform corresponding control on the television device using the mouse end. It can meet the user's control operations for various applications in the television device and meet the user's diverse operation requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0037] Figure 1a Schematic diagram of a system for direct connection between a mouse end and a television device provided by an embodiment of the present application;
[0038] Figure 1b Schematic diagram of a system for indirect connection between a mouse end and a television device provided by an embodiment of the present application;
[0039] Figure 2 Schematic flowchart of a method for controlling a mouse of a television device provided by an embodiment of the present application;
[0040] Figure 3 Schematic structural diagram of a device for controlling a mouse of a television device provided by an embodiment of the present application;
[0041] Figure 4 Schematic flowchart of the implementation of the mouse control process of a television device illustrated by an embodiment of the present application;
[0042] Figure 5a Schematic page diagram of the global mouse mode provided by an embodiment of the present application;
[0043] Figure 5b Schematic page diagram of the local mouse mode provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0044] The content of the present application will now be discussed with reference to several exemplary embodiments. It should be understood that these embodiments are discussed only to enable those of ordinary skill in the art to better understand and thus implement the content of the present application, rather than implying any limitation on the scope of the present application.
[0045] As used herein, the term "comprising" and its variants are to be construed as open-ended terms meaning "including but not limited to". The term "based on" is to be construed as "at least partially based on". The terms "one embodiment" and "an embodiment" are to be construed as "at least one embodiment". The term "another embodiment" is to be construed as "at least one other embodiment".
[0046] In addition, the sequence of steps in the following method embodiments is only an example and is not strictly limited.
[0047] With the development of smart TV related technologies, in order to meet the diverse needs of users, users are allowed to install various application software on smart TV devices. For example, users can install browsers, live broadcast software, and game software on the smart TV side. The operations of these application software are relatively complex and require support for various selections, drags, etc. Some users hope that the TV side can use a mouse operation like the computer side. However, existing TV devices do not support mouse operations. Therefore, a solution that enables TV devices to support mouse control is needed.
[0048] It should be noted that a smart TV specifically refers to a smart TV developed based on a certain operating system, and this operating system is the same as the operating system supported by mobile devices.
[0049] In the solution of the present application, hardware device support matching the mouse control software package is required. This hardware device can be a device independent of the mouse side, or can be integrated in the mouse side, or a hardware device integrated in the TV side. Through this hardware device, it can be connected to the mouse (including wired connection and wireless connection). As Figure 1a is a schematic diagram of a system in which the mouse side is directly connected to the TV device provided by an embodiment of the present application. As can be seen from Figure 1a it, assuming that the mouse side integrates a hardware device (or the TV integrates a hardware device), the mouse side can be directly connected to the TV device. After a connection relationship is successfully established, the applications in the TV device can be directly controlled through the mouse side. In addition, as Figure 1b is a schematic diagram of a system in which the mouse side is indirectly connected to the TV device provided by an embodiment of the present application. As can be seen from Figure 1bAs can be seen, the hardware device is an independent device. When it is necessary to use a mouse to control the TV, the hardware device is connected to the TV device, and the mouse end can indirectly control the TV device. The control operations of the mouse end on the TV device include clicking, moving, and dragging. Furthermore, using the mouse, control methods such as painting and game dragging can be realized on the TV device. The mouse control software mentioned here can be, for example, KTHard SDK.
[0050] Figure 2 FIG. 4 is a schematic flowchart of a method for controlling a TV device with a mouse according to an embodiment of the present application. This method is applied to a TV device. The mouse end mentioned here can be understood as a mouse, a graphics tablet, or other end devices that can be used as a mouse. Through these end devices, users can realize the mouse function on the TV device. In addition, based on the same idea (that is, by adding an SDK), the connection relationship between the TV device and end devices such as audio and video can also be established. As Figure 2 shown, the method includes the following steps:
[0051] Step 201: Obtain and install a mouse control software package.
[0052] Step 202: Establish a connection relationship between the mouse end and the TV device through a specified communication method supported by the mouse control software package.
[0053] Step 203: When the connection relationship is successfully established through the specified communication method, display a mouse identifier based on the current displayed page in a mode matching the page type, so that after receiving a mouse operation instruction, corresponding operations can be performed on the TV device through the mouse control software.
[0054] In practical applications, after software development, a mouse control software package that supports the mouse control ability of a TV device is obtained. The TV device installed with this software package can be connected to the mouse end and supports various mouse control capabilities.
[0055] The specified communication methods mentioned here include: Bluetooth, local area network, infrared, USB, and other communication methods. It is easy to understand that different communication methods require corresponding hardware support on both the mouse end and the TV device. For example, if connected through the Bluetooth mode, Bluetooth modules need to be installed on both the mouse end and the TV device end. Of course, in practical applications, multiple hardware can be installed at the same time. For example, Bluetooth modules, local area network modules, infrared modules, and USB modules are installed on both the mouse end and the TV device at the same time.
[0056] The establishment of the connection relationship needs to be detected through the corresponding hardware status detection function. For example, define a hardware detection function: KTHardEnv.getInstance().connect(35882, SystemUtils.getInstance().getLocalIp()); Using this function will obtain the current connected WI-FI IP + 35882 port number to send a UDP broadcast. Scan the hardware devices started within the local area network.
[0057] In the technical solution of this application, when different page types display the mouse icon, different display modes are used. The page types mentioned here can include the global page and the local page. Among them, the global page can be understood as the mouse execution mode being the global mouse mode, that is, the software package SDK controlled by the mouse will simulate a global mouse mode, and mouse operations such as clicking, moving, and dragging can be performed on the entire screen. The local page can be understood as the mouse execution mode being the local mouse mode, that is, the software package SDK controlled by the mouse simulates the local mouse mode within a specific application or page, that is, mouse operations such as moving, clicking, and dragging can only be performed within a specific application or page; in actual applications, the local page is usually the page of the currently used application, while the global page is not limited to the page of a current application, and may be the pages of multiple different applications in the global page.
[0058] In actual applications, in order to facilitate the distinction between different mouse modes (that is, to distinguish between the global mouse mode and the local mouse mode), it can be distinguished when displaying the mouse icon. For example, the size of the mouse icon displaying the global mouse mode in the global page is different from the size of the mouse icon displaying the local mouse mode in the local page. For another example, different mouse modes can be distinguished by setting different colors, or different shapes can also be used to distinguish different mouse modes.
[0059] To avoid misoperation by the user, the mouse icon will only be displayed on the TV device after the connection relationship between the mouse end and the TV device is successfully established. When the user sees the mouse icon, it means that the user can use the mouse to perform corresponding operations on the TV device. If there is a problem with the connection relationship between the mouse end and the TV device, for example, the local area network is disconnected, resulting in the inability to connect the mouse end to the TV device, then at this time, the mouse icon will disappear or be hidden, or the mouse icon will be displayed in a waiting or pending response state. For example, in the mouse control software package SDK, network detection can be performed by setting SDK parameters, set whether isDebug enables the debug mode, setIsNetworkEnable whether to enable network detection during transmission, and setIsPerformanceEnable whether to enable performance detection during device drawing.
[0060] In the above solution, by installing a mouse control software package SDK on a TV device, the control operation of the mouse on the TV device is realized. Moreover, when displaying the mouse icon, different mouse modes are specifically displayed according to different page types. Distinguishing these two modes helps developers select the appropriate mode according to actual needs to achieve more accurate and efficient mouse event processing. At the same time, it also helps to reduce potential conflicts with other applications or system components and improve the stability and user experience of the application.
[0061] In one or more embodiments of the present application, when the connection relationship is successfully established through the specified communication method, the mouse icon is displayed in a mode matching the page type based on the currently displayed page, including: after the connection relationship is successfully established through the specified communication method, if the page type of the currently displayed page is a global page, the mouse icon is displayed in the global mouse mode on the currently displayed page; wherein, the global mouse mode means that the mouse icon can be displayed, moved, and operated in the overall TV interface;
[0062] if the page type of the currently displayed page is a local page, the mouse icon is displayed in the local mouse mode on the currently displayed page; wherein, the local mouse mode means that the mouse icon can be displayed, moved, and operated in a local page or a specified application page.
[0063] As described above, when the mouse is displayed, the mouse display modes in different page types are different, and the operating capabilities of the mouse are different. Specifically, in the global page, the mouse is supported to display the mouse icon in the global mouse mode. There may be only a main page in this global page, and any operable control displayed on the page allows the user to manipulate it with the mouse, and any operable control has the possibility of being selected and manipulated by the user. Therefore, in the global page, the user can select and control the control content in the operating system. For example, the user can choose to open a certain application or perform system-related operations in the operating system. If the user opens a certain application and needs to perform related operations within the application page, the mouse mode needs to be switched and adjusted.
[0064] In the local page, the mouse icon can only be manipulated within the current page. That is, the control authority of the mouse is limited. For example, if the current page only occupies a part of the display screen of the TV device, the moving range of the mouse icon cannot exceed the display range of the current page and can only move near the boundary of the current application window, allowing operations such as selection, manipulation, editing, and painting of the internal controls of the application window that the mouse can achieve. When the user closes the application window, the local page is exited, and the mouse mode also exits the local mouse mode. The specific page switching method will be described in detail in the following embodiments and will not be repeated here.
[0065] For example, the mouse mode can be selected and set using SDK parameters. setMouseHover is used to set the mouse selection mode.
KTHardEngine.Mouse_Hover_NOTE
KTHardEngine.Mouse_Hover_Global
KTHardEngine.Mouse_Hover_Internal
[0066] Internal Page Mouse Mode (Local Mouse Mode): Monitoring Range: The internal page mouse mode (i.e., the local mouse mode) only monitors mouse events for the views or windows within the SDK or application. This means that the handling of mouse events is limited to the current interface of the SDK or application. Usage Scenarios: This mode is usually used in situations where precise control of mouse behavior is required within the SDK or application. For example, in a custom drawing application or game, developers may need to precisely capture and respond to mouse movement and click events. Characteristics: The internal page mouse mode does not affect the mouse behavior of other parts of the system, so special permissions are not required. It focuses on event handling within the SDK or application and usually does not conflict with other system components or applications.
[0067] Through the above method, different mouse modes can be set for different pages in the TV device, so that while meeting the user's need to control applications in the TV device using the mouse, potential conflicts with other applications or system components can also be reduced, improving the stability of the application and the user experience.
[0068] In one or more embodiments of the present application, a schematic diagram of a page switching method is further provided. Specifically, when performing a page switch on the currently displayed page, if the page switch is a partial page switch, the first mouse information corresponding to the mouse identifier in the currently displayed page is destroyed;
[0069] After switching to the new partial page, the second mouse information corresponding to the new partial page is created, and the mouse identifier is displayed in the new partial page; wherein, the mouse display attributes in the first mouse information and the second mouse information remain unchanged.
[0070] In practical applications, the creation and destruction of the mouse during page switching processing are mainly for resource management and performance optimization considerations. When the page in the application changes, it may mean that the user has navigated to a new section or view, which may cause the previous mouse event listeners or related resources to be no longer needed.
[0071] For example, on platforms such as Android of a television device, each Activity, Fragment, or Dialog has its own life cycle. When these components are paused or destroyed, the resources associated with them (such as mouse event listeners) should also be released accordingly. If the destruction operation of the mouse is not performed, it may cause memory leaks or other resource management problems. In addition, frequent event listening and callbacks may affect the performance of the application. When the page is no longer needed, removing unnecessary event listeners can reduce unnecessary calculations and processing, thereby improving the response speed and overall performance of the application.
[0072] If the new page or view has its own mouse event handling logic, then retaining the old listener may cause event conflicts or unpredictable behaviors. By destroying the old listener, it can be ensured that the event handling logic of the current page or view is clear and consistent. Timely cleaning and releasing of resources that are no longer used is good programming practice. This helps to keep the code clean and maintainable, and reduces potential problems and errors.
[0073] In the context of the SDK, these operations are usually automatically handled by the SDK, but developers need to ensure that relevant methods provided by the SDK are called at the correct stage of the life cycle of the page or view to trigger these operations. For example, call setMouseAttach(this) in the onStart() method of the Activity to initialize the mouse-related resources, and call setMouseDetach(this) in the onStop() method to release these resources. This can ensure that the resources are correctly managed at the appropriate time, thereby improving the performance and stability of the application.
[0074] In one or more embodiments of the present application, it further includes: when performing a page switch on the current display page, if the page switch is a global page switch, the first mouse information corresponding to the mouse identifier in the current display page is not destroyed.
[0075] The switching between the global mouse mode and the local mouse mode usually depends on the configuration of the SDK and API calls. The specific switching method may vary depending on the SDK version and specific implementation.
[0076] In some SDKs, it is possible to switch between these two modes by setting parameters or calling specific API functions. For example, in the configuration parameters of the SDK, there may be an option that allows you to select the mouse hover mode, which may include the global mouse mode and the local mouse mode.
[0077] The mouse hover mode can be set by calling the setMouseHover() method. You can pass different parameters to select different modes. For example, passing KTHardEngine.Mouse_Hover_Global to select the global mouse mode, or passing KTHardEngine.Mouse_Hover_Internal to select the local mouse mode.
[0078] KTHardEngine.Mouse_Hover_Global (global mouse mode) does not need to be called, which usually means that this mode is the default behavior of the SDK or this mode has been automatically set during the SDK initialization. The SDK may be designed to automatically enter the global mouse mode when loaded, without the developer having to explicitly call any method.
[0079] The global mouse mode usually means that mouse events are not limited to the views or windows within the SDK, but can affect the entire screen or other parts of the operating system. In this mode, the SDK will listen for and handle mouse events from any location, not just mouse movements and clicks within the SDK interface. In addition, the SDK may provide some configuration options that allow developers to select different mouse modes during initialization, but if the developer does not specify, the SDK will default to the global mouse mode, which is the most common use case or it conforms to the default behavior of most applications.
[0080] In one or more embodiments of the present application, establishing the connection relationship between the mouse end and the television device through the specified communication method supported by the mouse control software package includes:
[0081] If at least one of the specified communication methods supported by the mouse control software package includes a local area network communication method, a Bluetooth communication method, and an infrared communication method, then select one of the specified communication methods to establish a connection relationship between the mouse end and the TV device.
[0082] In practical applications, in order to enable the mouse end to have a wider range of usage capabilities, modules of various different types of communication methods can be integrated at the mouse end. For example, a WiFi module, a Bluetooth module, an infrared module, a USB module, etc. can be integrated at the same time. As long as the TV device supports any one of these communication methods, the mouse end can establish a connection relationship with the TV device, and then realize mouse control on the TV device installed with the mouse control software SDK. When the TV device also supports multiple communication methods at the same time, the local area network (for example, WiFi) can be preferentially selected to establish a connection relationship. Through the above solution, the mouse end has multiple optional communication connection capabilities, meeting the needs of establishing connection relationships with different TV devices.
[0083] In addition, when the connection relationship is successfully established through the specified communication method, the mouse identifier is displayed based on the current display page in a mode matching the page type, including:
[0084] When one of the selected specified communication methods is the local area network communication method, detect whether the local area network communication method is successfully established; if not, do not display the mouse identifier and display a prompt message indicating that the communication connection fails; or,
[0085] When one of the selected specified communication methods is a method other than the local area network communication method, do not detect whether the local area network communication method is successfully established and display the mouse identifier.
[0086] When the user, the TV device, or the mouse end selects the local area network communication method as the specified communication method, before executing mouse-related control instructions, a local area network detection needs to be performed first. After the TV device is turned on, the local area network detection is automatically started. The purpose of starting the network detection for the local area network is to ensure the stability and reliability of the network connection during data transmission. This may not be necessary for realizing the mouse function of non-local area network connection methods, but if the SDK needs to communicate with the TV device through the local area network, then the quality and stability of the local area network connection become very important.
[0087] In some cases, the implementation of mouse functions may not directly depend on a continuous network connection. For example, if the SDK uses local Bluetooth or USB connections to communicate with hardware devices, then the stability of the network connection may not be a critical factor. However, if the SDK is designed to rely on the network to transmit mouse events or receive input from the hardware, then the quality and stability of the network connection become crucial.
[0088] Enabling network detection can help users identify network problems and provide appropriate feedback or handling mechanisms when the network is poor or disconnected. This can ensure that users have a consistent and reliable experience when using mouse functions. In practical applications, whether to rely on a network connection to implement mouse functions depends on the specific design and implementation of the SDK. If the SDK is designed to communicate via the network, then a network connection is required, and enabling network detection can help ensure the stability and reliability of the communication. If the SDK uses other connection methods (such as Bluetooth or USB), then the stability of the network connection may not be necessary, but it is still recommended to perform network detection to ensure the best user experience.
[0089] In one or more embodiments of the present application, after receiving a mouse operation instruction, the corresponding operation is executed on the TV device through the mouse control software, including: registering a mouse hardware monitoring event; when receiving the mouse operation instruction provided by the mouse end, parsing the mouse operation instruction through the mouse monitoring software; determining the mouse coordinate information and mouse button type carried by the mouse operation instruction; wherein, the mouse button type includes at least one of: single click, right click, double click, move, drag, and slide; and performing the corresponding operation on the TV device based on the mouse coordinate information and the mouse button type.
[0090] In practical applications, in the specific solution for implementing mouse control using the SDK in a TV device, registering a mouse hardware monitoring event is a core step. This usually involves calling specific functions or methods in the SDK so that the system can identify and respond to operation instructions sent by the mouse hardware. This process usually occurs after the SDK is initialized to ensure smooth communication between the mouse hardware and the TV device. Once the registration is successful, the system can start monitoring operation instructions sent by the mouse hardware. These instructions may be generated by various operations performed by the user through the mouse, such as single click, right click, double click, move, drag, and slide. When these instructions are received, the mouse monitoring software will immediately intervene and process them.
[0091] The main task of the mouse monitoring software is to parse the received mouse operation instructions. This involves identifying the various components in the instructions, such as mouse coordinate information and mouse button types. The coordinate information usually includes the horizontal and vertical positions of the mouse on the screen, which is crucial for determining the specific location where the user clicks or moves the mouse. The mouse button type tells the system how the user operates the mouse, such as a single click or a drag.
[0092] After parsing the mouse operation instructions, the system will perform corresponding operations on the TV device according to the coordinate information and button types in the instructions. These operations may include but are not limited to opening applications, selecting menu items, adjusting the volume, browsing the web, etc. Since the interface and operation logic of the TV device may be different from those of traditional computers, the SDK may need to provide a dedicated mapping mechanism to convert the mouse operation instructions into commands or actions that the TV device can understand.
[0093] In an alternative solution, the SDK may provide a series of APIs or callback functions that allow developers to customize the processing logic when receiving mouse operation instructions. In this way, developers can flexibly implement various control functions of the mouse on the TV device according to their own needs.
[0094] In addition, to ensure the smoothness and accuracy of mouse control, the SDK may also provide some optimization measures, such as anti-jitter processing, coordinate conversion, etc. These measures can help reduce misoperations and improve the user experience. Implementing mouse control using the SDK in a TV device requires comprehensive consideration of the compatibility of the mouse hardware, the accuracy of instruction parsing, and the operation characteristics of the TV device. Through reasonable design and implementation, efficient and convenient control of the mouse on the TV device can be achieved.
[0095] In one or more embodiments of the present application, it further includes: when the mouse display attribute of the mouse identifier is set to disappear upon exit, if exiting the local page or the global page, the mouse identifier disappears; when the mouse display attribute of the mouse identifier is set to not disappear upon exit, if exiting the local page, the mouse identifier does not disappear; if exiting the global page, the mouse identifier disappears.
[0096] When implementing mouse control using the SDK in a TV device, regarding the display attributes of the mouse identifier (usually referring to the mouse cursor or pointer) in different types of pages (local pages and global pages), especially the specific implementation of whether the mouse identifier disappears when exiting these pages, a detailed description is required.
[0097] It is necessary to clarify two types of pages and their corresponding mouse modes: Local Page: This usually refers to a specific view or interface within an application. It has its own lifecycle and event handling mechanism. In this local mouse mode, the operating range of the mouse is limited to within this page and will not affect other applications or the system interface.
[0098] Global Page: This refers to the mode that covers the entire system interface. The operating range of the mouse covers the entire screen and may even affect other running applications. In this global mouse mode, the behavior of the mouse is usually more system-level and requires higher permissions.
[0099] When the display property of the mouse identifier is set to "disappear when exiting", regardless of whether it is currently in a local page or a global page: When the user exits the current page (whether by navigating to other pages, closing the application, or other means), the mouse identifier will disappear accordingly. This setting is applicable to scenarios where one hopes to keep the screen clean and reduce interference when not using the mouse.
[0100] When the display property of the mouse identifier is set to "not disappear when exiting": If currently in a local page, when the user exits the page, the mouse identifier will not disappear. This means that even if the user leaves the current application or view, the mouse identifier will still be displayed on the screen until the user explicitly closes it or performs other relevant operations. If currently in a global page, when the user exits the page (usually returns to the desktop or another application), the mouse identifier will disappear. This is because the global mode is usually regarded as a special state, and after exiting this state, the mouse identifier no longer needs to be displayed.
[0101] Specifically, in actual implementation, the SDK may need to provide the following functions or APIs to support the above behaviors: Setting mouse display properties: Developers can call the APIs provided by the SDK to set the display properties of the mouse identifier, such as setMouseVisibilityOnExit(boolean disappear), where the disappear parameter indicates whether to make the mouse identifier disappear when exiting the page. Page lifecycle listening: Developers need to call the corresponding SDK methods in the page lifecycle callbacks of the application (such as onPause(), onResume(), onStop(), etc.) to handle the display and hiding of the mouse identifier. Switching between global and local modes: The SDK should provide methods to allow developers to switch different mouse modes within the application. This usually involves calling functions such as switchToGlobalMode() or switchToLocalMode(). Display and hiding of the mouse identifier: The SDK should provide functions to directly control the display and hiding of the mouse identifier, such as showMouse() and hideMouse(). By reasonably combining the use of these APIs and mechanisms, developers can implement flexible mouse control logic that meets the application requirements. At the same time, to ensure the consistency and smoothness of the user experience, the design and implementation of the SDK should be as simple and intuitive as possible, and sufficient documentation and sample code should be provided for developers to refer to.
[0102] Figure 3 FIG. 4 is a schematic structural diagram of a mouse control device for a television device provided by an embodiment of the present application. The device may include:
[0103] An acquisition module 31, configured to acquire and install a mouse control software package.
[0104] A relationship establishment module 32, configured to establish a connection relationship between the mouse end and the television device through a specified communication method supported by the mouse control software package.
[0105] A display module 33, configured to, when the connection relationship is successfully established through the specified communication method, display a mouse identifier in a mode matching the page type based on the current display page, so as to execute corresponding operations on the television device through the mouse control software after receiving a mouse operation instruction.
[0106] The display module 33 is further configured to, when the connection relationship is successfully established through the specified communication method, if the page type of the current display page is a global page, display the mouse identifier in a global mouse mode on the current display page; wherein, the global mouse mode means that the mouse identifier can be displayed, moved, and operated on the overall television interface;
[0107] If the page type of the current display page is a partial page, the mouse identifier is displayed in the current display page in a partial mouse mode; wherein, the partial mouse mode means that the mouse identifier can be displayed, moved, and operated in a partial page or a specified application page.
[0108] The display module 33 is configured to, when a page switch is performed on the current display page, if the page switch is a partial page switch, destroy the first mouse information corresponding to the mouse identifier in the current display page;
[0109] After switching to a new partial page, create second mouse information corresponding to the new partial page, and display the mouse identifier in the new partial page; wherein, the mouse display attributes in the first mouse information and the second mouse information remain unchanged.
[0110] The display module 33 is configured to, when a page switch is performed on the current display page, if the page switch is a global page switch, do not destroy the first mouse information corresponding to the mouse identifier in the current display page.
[0111] The relationship establishment module 32 is configured to, if at least one of the specified communication methods supported by the mouse control software package includes a local area network communication method, a Bluetooth communication method, and an infrared communication method, select one of the specified communication methods to establish a connection relationship between the mouse end and the TV device.
[0112] The relationship establishment module 32 is configured to, when one of the selected specified communication methods is the local area network communication method, detect whether the local area network communication method is successfully established; if not, do not display the mouse identifier, and display a prompt message indicating that the communication connection fails; or,
[0113] When one of the selected specified communication methods is a method other than the local area network communication method, do not detect whether the local area network communication method is successfully established, and display the mouse identifier.
[0114] The display module 33 is configured to register a mouse hardware monitoring event;
[0115] After receiving the mouse operation instruction provided by the mouse end, parse the mouse operation instruction through the mouse monitoring software;
[0116] Determine the mouse coordinate information and the mouse button type carried in the mouse operation instruction; wherein, the mouse button type includes at least one of: single click, right click, double click, move, drag, and slide;
[0117] Perform corresponding operations on the TV device based on the mouse coordinate information and the mouse button type.
[0118] A display module 33, which is configured to make the mouse identifier disappear when exiting the local page or the global page if the mouse display attribute of the mouse identifier is set to disappear upon exit.
[0119] When the mouse display attribute of the mouse identifier is set to not disappear upon exit, the mouse identifier does not disappear when exiting the local page; when exiting the global page, the mouse identifier disappears.
[0120] For ease of understanding, the implementation of the technical solution of the present application will be described in detail below through specific embodiments. As Figure 4 FIG. is a schematic diagram of the mouse control process for implementing a TV device in an example of an embodiment of the present application. The mouse control software package KThard SDK proposed by the present application is to enable the TV side to support mouse click or painting capabilities. It can be paired with proprietary hardware or developers can connect it themselves. Quickly implement manipulation functions (click, move, drag).
[0121] The SDK has two control modules: the global mouse mode and the local mouse mode. Among them, Figure 5a FIG. is a schematic diagram of a page in the global mouse mode, Figure 5b FIG. is a schematic diagram of a page in the local mouse mode.
[0122] SDK parameter description:
[0123]
[0124]
[0125] Among them, isDebug indicates whether to enable the debug mode;
[0126] setIsNetworkEnable indicates whether to enable network detection during transmission;
[0127] setIsPerformanceEnable indicates whether to enable performance detection during device drawing;
[0128] setMouseHover sets the mouse selection mode [KTHardEngine.Mouse_Hover_NOTE default]; [KTHardEngine.Mouse_Hover_Global global mouse mode] (as Figure 5a shown); [KTHardEngine.Mouse_Hover_Internal local mouse mode] (as Figure 5b shown);
[0129] setDefaultPen(R.drawable.cursor_press, 32, 32) The image and display width and height of the mouse movement style.
[0130] setDefaultPointer(R.drawable.cursor_hover, 32, 32) The image and display width and height of the mouse press style.
[0131] setAppId(App.appid) The APPID assigned by the TV device is used to verify the SDK authorization.
[0132] .setPointerMode() Set the drawing method [HardPointerMode.faster for surfaceview drawing (faster)] [HardPointerMode.stable for view drawing (more stable)].
[0133] setMouseMoveQuickParams(5.0f) Set the mouse movement acceleration [e.g., 5.0f moves one position and increases the distance by 5 positions].
[0134] 3. KTHardEnv.getInstance().connect(35882, SystemUtils.getInstance().getLocalIp()); It will obtain the current connected WI-FI IP + 35882 port number and send a UDP broadcast. Scan for hardware devices started within the local area network.
[0135] 4. KTHardEnv.getInstance().setHardConnectListener() After successful connection, setHardConnectListener will return the information of successful or failed connection. At the same time, if the hardware is disconnected midway, it will also return to this interface method.
[0136] 5. KTHardEnv.getInstance().setUnregisterGetWiFiBatteryLevel. Register the battery level information of the connected hardware. The battery status of the digital tablet.
[0137] 6. KTHardEnv.getInstance().setKeyTapListener() Key information [2 volume down, 3 volume up, 4, custom key (can be set as raise hand in live broadcast scenario), 5, back key].
[0138] 7. KTHardEnv.getInstance().setMouseAttach(this); Call this method inside the onStart() of activity, fragment, and dialog when the page is switched.
Used to handle mouse creation when the page is switched
KTHardEngine.Mouse_Hover_Global global mouse mode
[0139] 8. KTHardEnv.getInstance().setMouseDetach(this); Call this method inside the onStop() of activity, fragment, and dialog when the page is switched.
Used to handle mouse destruction when the page is switched
KTHardEngine.Mouse_Hover_Global global mouse mode
[0140] 9. KTHardEnv.getInstance().setHardDeviceEventListener; Obtain the real-time coordinates sent when controlling the hardware to get the position coordinate callback.
[0141] 10. KTHardEnv.getInstance().setOnGetWiFiDataPos; Set the coordinate position of the mouse for external devices
Used when there are other external hardware
[0142] 11. KTHardEnv.getInstance().disConnect(); Method to close the hardware connection
Can directly control the hardware to shut down, usually used when exiting the app
[0143] 12. KTHardEnv.getInstance().setMouseViewAllShow; Set whether the pointer disappears when exiting the app, true means it does not disappear, false means it disappears
In the global mode, it generally disappears only after the system shuts down. This is mainly used for the KTHardEngine.Mouse_Hover_Internal internal page mouse mode
[0144] 13. When using in the App, first call the initialization
Step 2
Step 3
Step 4
Steps 5 - 12
[0145] 14. After successful connection, it may be necessary to call [Step 7] and [Step 8] in the onStart() and onStop of the page.
[0146] 15. Call [Step 9] when it is necessary to turn off the hardware.
[0147] This application also provides a television device, including: a memory and a processor; wherein, an executable code is stored on the memory, and when the executable code is executed by the processor, the processor executes the aforementioned mouse control method for the television device.
[0148] It should be supplemented here that the technical solution of this application can not only be applied to controlling a television through a mouse, but also can establish a connection relationship between other various types of hardware such as a drawing board, audio and video devices, etc. and the television device according to the same idea, so as to realize the corresponding control functions.
[0149] This application also provides a system, including a processor and a memory, wherein at least one instruction, at least one program, a code set or an instruction set is stored in the memory, and the at least one instruction, at least one program, the code set or the instruction set is loaded and executed by the processor to execute the aforementioned mouse control method for the television device.
[0150] This application also provides a computer-readable medium, on which at least one instruction, at least one program, a code set or an instruction set is stored, and the at least one instruction, at least one program, the code set or the instruction set is loaded and executed by a processor to implement the mouse control method for the television device according to the aforementioned.
[0151] The device embodiments described above are merely illustrative, and the various modules described as separate components may or may not be physically separated. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without creative labor.
[0152] According to needs, the systems, methods and devices of the various embodiments of this application can be implemented as pure software (for example, a software program written in Java), can also be implemented as pure hardware according to needs (for example, a dedicated ASIC chip or an FPGA chip), and can also be implemented as a system combining software and hardware (for example, a firmware system storing fixed code or a system with a general memory and a processor).
[0153] The embodiments of the present application have been described above. The above description is exemplary and not exhaustive, and is also not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The scope of the claimed subject matter is defined only by the appended claims.
Claims
1. A method for controlling a mouse of a television device, characterized in that, Applied to a television device, the method includes: Obtain and install a mouse control software package; If at least one of the specified communication methods supported by the mouse control software package includes a local area network communication method, a Bluetooth communication method, and an infrared communication method, select one of the specified communication methods to establish a connection relationship between the mouse end and the television device; When the connection relationship is successfully established through the specified communication method, display a mouse icon based on the current display page in a mode matching the page type, so that after receiving a mouse operation instruction, corresponding operations can be performed on the television device through the mouse control software; Among them, the step of "when the connection relationship is successfully established through the specified communication method, display a mouse icon based on the current display page in a mode matching the page type" includes: When one of the selected specified communication methods is the local area network communication method, detect whether the local area network communication method is successfully established; if not, do not display the mouse icon and display a prompt message indicating that the communication connection fails; or, When one of the selected specified communication methods is other than the local area network communication method, do not detect whether the local area network communication method is successfully established and display the mouse icon; Among them, the step of "when the connection relationship is successfully established through the specified communication method, display a mouse icon based on the current display page in a mode matching the page type" includes: After the connection relationship is successfully established through the specified communication method, if the page type of the current display page is a global page, display the mouse icon in the global mouse mode on the current display page; wherein, the global mouse mode means that the mouse icon supports display, movement, and operation in the overall television interface; the global mouse mode is used for capturing mouse events across applications or interfaces; the global mouse mode listens for mouse events on the entire screen of the television device or the entire operating system; If the page type of the current display page is a local page, display the mouse icon in the local mouse mode on the current display page; wherein, the local mouse mode means that the mouse icon supports display, movement, and operation in a local page or a specified application page; the local mouse mode is used for accurately controlling mouse behavior within the SDK or application, and the local mouse mode only listens for mouse events on the views or windows within the SDK or application; When the page of the current display page is switched, if the page switch is a local page switch, destroy the first mouse information corresponding to the mouse icon on the current display page; After switching to the new local page, create the second mouse information corresponding to the new local page and display the mouse icon on the new local page; wherein, the mouse display attributes in the first mouse information and the second mouse information remain unchanged; When the page of the current display page is switched, if the page switch is a global page switch, do not destroy the first mouse information corresponding to the mouse icon on the current display page; When the mouse display attribute of the mouse identifier is set to disappear upon exit, if exiting the local page or the global page, the mouse identifier disappears; when the mouse display attribute of the mouse identifier is set to not disappear upon exit, if exiting the local page, the mouse identifier does not disappear; if exiting the global page, the mouse identifier disappears.
2. The method according to claim 1, wherein After receiving a mouse operation instruction, perform corresponding operations on the TV device through the mouse control software, including: Register a mouse hardware monitoring event; When receiving the mouse operation instruction provided by the mouse end, parse the mouse operation instruction through the mouse monitoring software; Determine the mouse coordinate information and mouse button type carried by the mouse operation instruction; wherein, the mouse button type includes at least one of click, right click, double click, move, drag, and slide; Perform corresponding operations on the TV device based on the mouse coordinate information and the mouse button type.
3. A mouse control device for a television apparatus, characterized in that, The device includes: An acquisition module, configured to acquire and install a mouse control software package; A relationship establishment module, configured to, if the specified communication method supported by the mouse control software package includes at least one of a local area network communication method, a Bluetooth communication method, and an infrared communication method, select one of the specified communication methods to establish a connection relationship between the mouse end and the TV device; A display module, configured to, when the connection relationship is successfully established through the specified communication method, display a mouse identifier based on the current display page in a mode matching the page type, so as to perform corresponding operations on the TV device through the mouse control software after receiving a mouse operation instruction; Among them, the step of, when the connection relationship is successfully established through the specified communication method, displaying a mouse identifier based on the current display page in a mode matching the page type includes: When one of the specified communication methods selected is the local area network communication method, detect whether the local area network communication method is successfully established; if not, do not display the mouse identifier and display a prompt message indicating that the communication connection fails; or, When one of the specified communication methods selected is a method other than the local area network communication method, do not detect whether the local area network communication method is successfully established and display the mouse identifier; Among them, the step of, when the connection relationship is successfully established through the specified communication method, displaying a mouse identifier based on the current display page in a mode matching the page type includes: After successfully establishing the connection relationship through the specified communication method, if the page type of the current display page is a global page, the mouse identifier is displayed in the global mouse mode on the current display page; wherein, the global mouse mode means that the mouse identifier supports display, movement, and operation in the overall TV interface; if the page type of the current display page is a local page, the mouse identifier is displayed in the local mouse mode on the current display page; wherein, the local mouse mode means that the mouse identifier supports display, movement, and operation in a local page or a specified application page; when performing a page switch on the current display page, if the page switch is a local page switch, the first mouse information corresponding to the mouse identifier in the current display page is destroyed; after switching to the new local page, the second mouse information corresponding to the new local page is created, and the mouse identifier is displayed in the new local page; wherein, the mouse display attributes in the first mouse information and the second mouse information remain unchanged; when performing a page switch on the current display page, if the page switch is a global page switch, the first mouse information corresponding to the mouse identifier in the current display page is not destroyed; when the mouse display attribute of the mouse identifier is set to disappear upon exit, if exiting the local page or the global page, the mouse identifier disappears; when the mouse display attribute of the mouse identifier is set to not disappear upon exit, if exiting the local page, the mouse identifier does not disappear; if exiting the global page, the mouse identifier disappears; the global mouse mode is used for capturing mouse events that need to cross applications or interfaces; the global mouse mode listens for mouse events on the entire screen of the TV device or the entire operating system; the local mouse mode is used for precise control of mouse behavior within the SDK or application, and the local mouse mode only listens for mouse events on the views or windows within the SDK or application.
4. A television device, comprising: A memory and a processor; wherein, executable code is stored on the memory, and when the executable code is executed by the processor, the processor executes the method according to any one of claims 1 to 2.
5. A computer-readable medium, on which at least one instruction, at least one program, a code set, or an instruction set is stored, and the at least one instruction, at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the method according to any one of claims 1 to 2.
Citation Information
Patent Citations
Wireless keyboard and operation method of digital television receiving terminal
CN101950202A
Method for controlling mouse modules and electronic device
CN102637127A
Display device and cursor control method
CN115185414A