Display device and connection state acquisition method
By storing communication connection status and timestamp in the display device, and reducing query frequency using timestamp comparison, solving the wireless communication overhead and power consumption problems caused by frequent query to the remote control, ensuring the accuracy and real-timeness of the connection status.
Patent Information
- Application Number
- CN202510560916.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-29
- Publication Date
- 2025-08-15
AI Technical Summary
In the prior art, frequent query of communication connection status between the remote control and the television leads to an increase in wireless communication overhead and system power consumption, affecting real-time response performance.
By setting the memory storage communication connection status and updating the timestamp in the display device, the query frequency is reduced by using the timestamp comparison, and only when the difference is returned to the connection status within the preset time range, and a query command is generated when it is out of range to obtain the latest status.
Reduces the frequency of requests to the remote control to query the connection status, reduces wireless communication overhead and system power consumption, while ensuring the accuracy and real-timeness of the connection status.
Smart Images

Figure CN120499475A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of display devices, and in particular to a display device and a method for obtaining a connection status thereof. Background Art
[0002] Pointing remote controls provide users with a completely new way to interact with the TV. In the context of a pointing remote control, applications installed on the TV need to continuously monitor and obtain the connection status of the communication connection between the pointing remote control and the TV to ensure real-time and reliable interaction. In existing technical solutions, the TV typically frequently sends status query requests to the pointing remote control to obtain the connection status of the communication connection between the pointing remote control and the TV. While this implementation method can meet basic functional requirements, it has obvious problems: on the one hand, it causes unnecessary wireless communication overhead, and on the other hand, it may increase system power consumption. Furthermore, frequent status queries may also negatively impact the TV's real-time response performance. Summary of the Invention
[0003] The present application provides a display device and a method for obtaining a connection status, which can reduce the frequency of sending a request to query the connection status to a pointing remote control.
[0004] In a first aspect, a display device is provided, comprising:
[0005] a display for displaying a user interface;
[0006] a memory, configured to store a connection state of the communication connection between the control device and the display device and an update timestamp corresponding to the connection state;
[0007] A controller is communicatively connected to the memory and is configured to:
[0008] When query information of the application is obtained, a timestamp corresponding to the query information is obtained, wherein the query information is used to query the connection status of the communication connection between the control device and the display device; when the difference between the timestamp and the update timestamp is within a preset time range, the connection status is returned to the application, and the connection status can be obtained from the memory, reducing the frequency of sending requests for querying the connection status to the pointing remote control, thereby reducing wireless communication overhead and power consumption of the display device.
[0009] In some embodiments, the controller generates a query command when the difference between the timestamp and the update timestamp exceeds a preset time range, and is configured to:
[0010] generating a query command based on the timestamp if the difference between the timestamp and the update timestamp exceeds a preset time range;
[0011] The controller is configured to obtain the latest connection status of the communication connection between the control device and the display device based on the query command as follows:
[0012] The query command is sent to the control device to obtain response information from the control device, and the latest connection status between the control device and the display device is obtained based on the response information, wherein the response information carries the timestamp, which can ensure that the latest connection status is obtained when the connection status may change, thereby improving the accuracy of the obtained connection status.
[0013] In some embodiments, the controller is further configured to:
[0014] The connection status in the memory is updated based on the latest connection status, and the update timestamp is updated based on the time node of the current update of the connection status, thereby ensuring the real-time nature of the connection status and the update timestamp in the memory.
[0015] In some embodiments, when the difference between the timestamp and the update timestamp corresponding to the connection status in the cache exceeds a preset time range, the controller generates a query command and sends the query command to the control device to obtain the latest connection status between the control device and the display device from the control device, and is configured to:
[0016] When the difference between the timestamp and the update timestamp corresponding to the connection status in the cache exceeds a preset time range, a query command is generated based on the timestamp, and the query command is sent to the control device to obtain response information from the control device; based on the response information, the latest connection status between the control device and the display device is obtained, wherein the response information carries the timestamp, and a query command can be generated through the timestamp, and verification is performed through the timestamp.
[0017] In some embodiments, the controller is further configured to:
[0018] When it is detected that the control device disconnects the communication connection with the display device or establishes a communication connection with the display device, the connection status in the memory is updated, and the update timestamp is updated based on the time node of this update, which can ensure that the connection status in the memory is consistent with the actual status.
[0019] In some embodiments, obtaining a timestamp corresponding to the query information includes:
[0020] The timestamp corresponding to the query information is obtained based on the system time of the query information, or the query information is parsed to obtain the timestamp carried in the query information. The timestamp can be obtained in multiple ways to improve flexibility and applicability.
[0021] In some embodiments, the connection status in the memory is stored as a variable value, and different connection statuses correspond to different variable values. The connection status is represented by the variable value, which facilitates storage and query.
[0022] In some embodiments, the display device further includes: a display, and the controller is further configured to:
[0023] Updating the status indication signal displayed in the user interface based on the change in the connection status can provide the user with intuitive connection status feedback and improve the user experience.
[0024] In some embodiments, the controller is further configured to:
[0025] When a pairing request is obtained and the identification information in the pairing request matches the identification information of the pre-stored control device, pairing is performed with the control device, and when the pairing is successful, the connection status and the update timestamp in the memory are updated, thereby ensuring that the connection status is updated in time after the pairing is successful.
[0026] In a second aspect, a method for obtaining a connection status is provided, the method comprising:
[0027] In the case of obtaining query information of the application, obtaining a timestamp corresponding to the query information, wherein the query information is used to query the connection status of the communication connection between the control device and the display device;
[0028] When the difference between the timestamp and the update timestamp is within a preset time range, the connection status in the memory is returned to the application.
[0029] An embodiment of the present application provides a method for obtaining a display device and its connection status. The method obtains query information of an application by obtaining a timestamp corresponding to the query information, wherein the query information is used to query the connection status of the communication connection between a control device and the display device; when the difference between the timestamp and the update timestamp corresponding to the connection status in a memory is within a preset time range, the connection status in the memory is returned to the application, and the connection status can be obtained from the memory, thereby reducing the frequency of sending requests for querying the connection status to a pointing remote control, thereby reducing wireless communication overhead and power consumption of the display device. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 An operation scenario between a display device and a control apparatus according to some embodiments is shown;
[0031] Figure 2 shows a block diagram of a hardware configuration of a control device 100 according to some embodiments;
[0032] Figure 3 shows a hardware configuration block diagram of a display device 200 according to some embodiments;
[0033] Figure 4 shows a software configuration diagram in the display device 200 according to some embodiments;
[0034] Figure 5 A flowchart of a method for obtaining a connection status in a display device provided in an embodiment of the present application;
[0035] Figure 6 A flowchart illustrating an implementation of a method for obtaining a connection status provided in an embodiment of the present application. DETAILED DESCRIPTION
[0036] In order to make the purpose and implementation of this application clearer, the exemplary implementation of this application will be clearly and completely described below in conjunction with the drawings in the exemplary embodiments of this application. Obviously, the described exemplary embodiments are only part of the embodiments of this application, not all of the embodiments.
[0037] It should be noted that the brief descriptions of terms in this application are only for the purpose of facilitating the understanding of the embodiments described below, and are not intended to limit the embodiments of this application. Unless otherwise specified, these terms should be understood according to their ordinary and usual meanings.
[0038] In the specification and claims of this application and the accompanying drawings, the terms "first," "second," "third," etc. are used to distinguish similar or similar objects or entities, and are not necessarily intended to limit a particular order or sequence, unless otherwise noted. It should be understood that the terms used in this manner are interchangeable under appropriate circumstances.
[0039] The terms "comprise," "include," and "have," and any variations thereof, are intended to cover but not exclude inclusion; for example, a product or device comprising a list of components is not necessarily limited to all the components expressly listed but may include other components not expressly listed or inherent to such product or device.
[0040] The embodiment of the present application provides a method for obtaining a display device and its connection status to solve the problem of frequently sending status query requests to a pointing remote control.
[0041] The display device provided in the embodiments of the present application may have various implementation forms, for example, it may be a television, a smart TV, a laser projection device, a monitor, an electronic bulletin board, an electronic table, etc. Figure 1 and Figure 2 This is a specific implementation of the display device of the present application.
[0042] Figure 1 Schematic diagram of an operation scenario between a display device and a control device according to an embodiment. Figure 1 As shown, the user can operate the display device 200 through the smart device 300 or the control device 100 .
[0043] In some embodiments, the control device 100 may be a remote controller, and communication between the remote controller and the display device may include Star Flash communication or Bluetooth protocol communication, or other short-range communication methods, to control the display device 200 wirelessly or wired. The user may control the display device 200 by inputting user commands through buttons on the remote controller, voice input, control panel input, etc.
[0044] In some embodiments, a smart device 300 (such as a mobile terminal, tablet computer, computer, laptop computer, etc.) can also be used to control the display device 200. For example, the display device 200 can be controlled using an application running on the smart device.
[0045] In some embodiments, the display device may not use the aforementioned smart device or control device to receive instructions, but may receive user control through touch or gestures.
[0046] In some embodiments, the display device 200 can also be controlled in ways other than the control device 100 and the smart device 300. For example, the user's voice command control can be directly received through a module for obtaining voice commands configured inside the display device 200, or the user's voice command control can be received through a voice control device set outside the display device 200.
[0047] In some embodiments, the display device 200 also communicates data with the server 400. The display device 200 may be connected to a local area network (LAN), a wireless local area network (WLAN), or other networks. The server 400 may provide various content and interactions to the display device 200. The server 400 may be a single cluster or multiple clusters, and may include one or more types of servers.
[0048] Figure 2 FIG. 1 exemplarily shows a configuration block diagram of the control device 100 according to an exemplary embodiment. Figure 2 As shown, the control device 100 includes at least one of a controller 110, a communication interface 130, a user input / output interface 140, a memory, and a power supply. The control device 100 can receive user input operation commands and convert the operation commands into commands that the display device 200 can recognize and respond to, acting as an interaction medium between the user and the display device 200.
[0049] In the implementation of this application, the control device can be a remote control with a specific pointing function. Here, the control device can be called a pointing remote control. The pointing remote control introduces a new way of interaction, breaking away from the operational limitations of traditional remote controls. The control method is like using a laser pen, which can accurately point to the target control without switching icon selection step by step. It is efficient and convenient.
[0050] In some embodiments, the pointing remote control has a pointing switch. When the pointing switch is turned on, the remote control enters pointing mode, allowing the user to point, slide, and perform other operations on a displayed object (such as a cursor). When the pointing switch is turned off, the remote control switches from pointing mode to traditional button mode, in which operations such as up / down / left / right / confirm buttons can be used.
[0051] In some embodiments, after turning on the pointing switch and entering the pointing mode, it can coexist with the traditional button mode. The user can point, slide, click, and perform other operations through the displayed object (such as the cursor), or use the confirmation key, as well as the up / down / left / right / volume keys and other button operations.
[0052] In some embodiments, the remote control is in low-power mode in traditional button mode. However, when the pointing switch is turned on and the remote control enters pointing mode, the remote control is no longer in low-power mode. Therefore, in some embodiments, the remote control can be equipped with a charging port, such as a Type-C port.
[0053] In some embodiments, the pointing remote control is a remote control device capable of detecting its own position and direction in three-dimensional space. The pointing remote control has a built-in gyroscope for detecting the rotation angle of the remote control and detecting the movement acceleration of the remote control. Through the sensor, the pointing remote control can determine its own pointing position in three-dimensional space in real time. The pointing position may include position coordinates and pointing direction, where the position coordinates are the physical position of the remote control relative to the display device (for example, the horizontal distance from the display device, the vertical height, etc.). The pointing direction is the pointing angle of the remote control (for example, the horizontal angle and vertical angle relative to the display device).
[0054] In some embodiments, after obtaining its own pointing position in three-dimensional space, the pointing remote control can send the pointing position data to the display device, so that the display device obtains the pointing position. The display device can perform screen coordinate conversion based on the pointing position, thereby converting the pointing position of the pointing remote control into the screen coordinate system, completing the mapping of the pointing position of the pointing remote control. At this time, the display device updates the position of the displayed object (such as the cursor) based on the calculated screen coordinates. When the user moves the remote control, the remote control's sensor will continue to detect changes in position and direction and send the data to the display device. The display device updates the position of the displayed object in real time, and the cursor moves in the pointing direction of the pointing remote control.
[0055] like Figure 3 The display device 200 includes at least one of a tuner and demodulator 210, a communicator 220, a detector 230, an external device interface 240, a controller 250, a display 260, an audio output interface 270, a memory, a power supply, and a user interface.
[0056] In some embodiments, the controller includes a processor, a video processor, an audio processor, a graphics processor, RAM, ROM, and first to nth interfaces for input / output.
[0057] The display 260 includes a display screen component for presenting images, and a driving component for driving image display, a component for receiving image signals output from a controller, and a component for displaying video content, image content, and a menu control interface and a user control UI interface.
[0058] The display 260 may be a liquid crystal display, an OLED display, or a projection display, and may also be a projection device and a projection screen.
[0059] Communicator 220 is a component used to communicate with external devices or servers using various communication protocols. For example, the communicator may include at least one of a Wi-Fi module, a Bluetooth module, a wired Ethernet module, or other network communication protocol chip or a near-field communication protocol chip, as well as an infrared receiver. Display device 200 can use communicator 220 to send and receive control signals and data signals with external control device 100 or server 400.
[0060] The user interface can be used to receive a control signal from the control device 100 (such as a pointing remote control, etc.). The control signal here can include position information of the control device in three-dimensional space. When the control signal is the position information of the control device in three-dimensional space, the controller can convert the position information into coordinates to obtain position information in two-dimensional space, and display the display object on the user interface based on the position information in two-dimensional space. In some embodiments, the control signal can also include: position information in two-dimensional space. When the control signal includes position information in two-dimensional space, the control device has a coordinate conversion function. The control device converts the position information of the control device detected in three-dimensional space into coordinates to obtain position information in two-dimensional space, and sends the position information in two-dimensional space to the display device, so that the display device displays the display object on the user interface based on the position information in two-dimensional space.
[0061] Detector 230 is used to collect signals from the external environment or external interactions. For example, detector 230 includes a light receiver, a sensor for collecting ambient light intensity; or detector 230 includes an image collector, such as a camera, for collecting external environmental scenes, user attributes, or user interaction gestures; or detector 230 includes a sound collector, such as a microphone, for receiving external sounds.
[0062] The external device interface 240 may include, but is not limited to, any one or more of the following: a high-definition multimedia interface (HDMI), an analog or digital high-definition component input interface (component), a composite video input interface (CVBS), a USB input interface (USB), an RGB port, etc. It may also be a composite input / output interface formed by multiple of the above interfaces.
[0063] The tuner-demodulator 210 receives broadcast television signals via a wired or wireless reception method, and demodulates audio and video signals, such as EPG data signals, from a plurality of wireless or wired broadcast television signals.
[0064] In some embodiments, the controller 250 and the tuner 210 may be located in different separate devices, that is, the tuner 210 may also be located in an external device of the main device where the controller 250 is located, such as an external set-top box.
[0065] Controller 250 controls the operation of the display device and responds to user operations through various software control programs stored in memory. Controller 250 controls the overall operation of display device 200. For example, in response to receiving a user command to select a UI object for display on display 260, controller 250 may perform operations related to the object selected by the user command.
[0066] In some embodiments, the controller includes at least one of a central processing unit (CPU), a video processor, an audio processor, a graphics processing unit (GPU), RAM Random Access Memory (RAM), ROM (Read-Only Memory, ROM), a first interface to an nth interface for input / output, a communication bus (Bus), etc.
[0067] In the embodiment of the present application, the memory is further used to store the connection status of the communication connection between the control device and the display device and the update timestamp corresponding to the connection status.
[0068] The user may input a user command through a graphical user interface (GUI) displayed on the display 260, and the user input interface receives the user input command through the graphical user interface (GUI). Alternatively, the user may input a user command through a specific voice or gesture, and the user input interface may recognize the voice or gesture through a sensor to receive the user input command.
[0069] A user interface is the medium for interaction and information exchange between an application or operating system and the user. It converts information between its internal form and a user-friendly form. A common user interface is the graphical user interface (GUI), which refers to a graphical user interface related to computer operations. It can be an icon, window, control, view, or other interface element displayed on an electronic device's display. Controls can include visual interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets.
[0070] To facilitate user interaction, in some embodiments, the display device 200 may run an operating system. The operating system is a computer program used to manage and control the hardware and software resources of the display device 200. The operating system can control the display device to provide a user interface. For example, the operating system can directly control the display device to provide a user interface, or it can provide a user interface by running an application program. The operating system also allows the user to interact with the display device 200.
[0071] It should be noted that the operating system may be a native operating system based on a specific operating platform, or a third-party operating system deeply customized based on a specific operating platform, or an independent operating system specially developed for the display device.
[0072] The operating system can be divided into different modules or layers according to the functions implemented, e.g. Figure 4 As shown, in some embodiments, the system is divided into four layers, from top to bottom, namely, the application layer (abbreviated as "application layer"), the application framework layer (abbreviated as "framework layer"), the system library layer and the kernel layer.
[0073] In some embodiments, at least one application runs in the application layer. The at least one application may include: Application 1, Application 2, Application 3, Application 4, etc. These applications may be window programs, system settings programs, clock programs, etc. provided by the operating system, or applications developed by third-party developers. For example, Application 1 may be a karaoke application, and Application 2 may be a video application. In specific implementations, the application packages in the application layer are not limited to the above examples.
[0074] The framework layer provides applications with an application programming interface (API) and programming framework. The application framework layer includes predefined functions. The application framework layer acts as a processing center, determining the actions taken by applications in the application layer. Through the API, applications can access system resources and services during execution.
[0075] like Figure 4 As shown, in the embodiment of the present application, the application framework layer includes managers, content providers, etc., wherein the manager includes at least one of the following modules: an activity manager (ActivityManager) is used to interact with all activities running in the system; a location manager (Location Manager) is used to provide system services or applications with access to system location services; a package manager (Package Manager) is used to retrieve various information related to the application packages currently installed on the device; a notification manager (NotificationManager) is used to control the display and clearing of notification messages; a window manager (Window Manager) is used to manage icons, windows, toolbars, wallpapers, and desktop widgets on the user interface.
[0076] In some embodiments, the activity manager is used to manage the lifecycle of each application and common navigation back functions, such as controlling the exit, opening, and backing of an application. The window manager is used to manage all window programs, such as obtaining the display screen size, determining whether there is a status bar, locking the screen, taking screenshots, and controlling display window changes (such as shrinking the display window, shaking the display, distorting the display, etc.).
[0077] In some embodiments, the system runtime layer provides support for the upper layer, namely the framework layer. When the framework layer is used, the Android operating system will run the C / C++ library contained in the system runtime layer to implement the functions to be implemented by the framework layer.
[0078] In some embodiments, the kernel layer is a layer between hardware and software. Figure 4 As shown, the kernel layer includes at least one of the following drivers: audio driver, display driver, Bluetooth driver, camera driver, WIFI driver, USB driver, HDMI driver, sensor driver (such as fingerprint sensor, temperature sensor, pressure sensor, etc.), and power driver, etc.
[0079] To facilitate a further understanding of the technical solutions in some embodiments of the present application, the following describes in detail the technical solutions of the display device and the method for obtaining the connection status, as well as how the technical solutions solve the above-mentioned technical problems, in conjunction with some specific embodiments and drawings. The various embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. Obviously, the described embodiments are part of the embodiments of the present application, not all of them.
[0080] Figure 5 A flowchart of a method for obtaining the connection status of a display device in a display device provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, the controller is configured to perform the following steps:
[0081] Step S501: When query information of the application is obtained, a timestamp corresponding to the query information is obtained, wherein the query information is used to query the connection status of the communication connection between the control device and the display device.
[0082] In an embodiment of the present application, the query information refers to a connection status query request sent by an upper-layer application (such as a TV system UI) to the controller. The query information typically includes: a request type identifier, an optional timestamp field, and a request source identifier. The request source identifier is used to distinguish different applications. The timestamp is a digital certificate used to mark the time when an event occurred. By comparing the timestamps, the validity of the connection status can be determined to avoid using outdated connection status. The timestamp corresponding to the query request can be: the timestamp when the query request is generated, or the current timestamp when the query information is obtained. The connection status refers to the status of the communication link between the control device and the display device, and can include: connected, connecting, disconnected, disconnected, etc.
[0083] In an embodiment of the present application, when the controller receives query information from an application, it can parse the query information. If the query information carries a timestamp (such as the event trigger time recorded by the application layer), the timestamp is used first. If the query information does not carry a timestamp, the high-precision system clock is called to obtain the current time, thereby obtaining the time corresponding to the query request.
[0084] Step S502: Return the connection status to the application if the difference between the timestamp and the update timestamp is within a preset time range.
[0085] In an embodiment of the present application, the preset time range is a pre-set time interval used to determine whether the difference between the timestamp and the update timestamp is within an acceptable range. The preset time range can be set, for example, it can be set to 200ms. In some embodiments, the preset time range can be dynamically adjusted, and the preset time range can be dynamically adjusted according to the mode of the display device. For example, when the display device is in low power mode, the preset time range can be increased. By increasing the preset time range, fewer query commands can be sent to the control device, thereby saving energy.
[0086] In this embodiment of the present application, the update timestamp indicates the time when the connection status was last updated. The update timestamp is used to compare with the timestamp corresponding to the query information to determine whether the latest connection status needs to be obtained from the control device. In this embodiment of the present application, the update timestamp can be subtracted from the timestamp to obtain a difference. After obtaining the difference, if the difference is within a preset time range, the connection status in the memory can be considered valid. In this case, the connection status in the memory can be directly returned to the application.
[0087] The display device provided by the embodiment of the present application obtains the timestamp corresponding to the query information when the query information of the application is obtained, wherein the query information is used to query the connection status of the communication connection between the control device and the display device; when the difference between the timestamp and the update timestamp corresponding to the connection status in the memory is within a preset time range, the connection status in the memory is returned to the application, and the connection status can be obtained from the cache, thereby reducing the frequency of sending requests to query the connection status, thereby reducing wireless communication overhead and system power consumption.
[0088] In some embodiments, after step S501, the controller is further configured to perform the following steps:
[0089] Step S503: generating a query command when the difference between the timestamp and the update timestamp exceeds a preset time range.
[0090] In the embodiments of the present application, a query command is a command generated by a display device and sent to a control device, requesting the control device to provide the latest connection status between it and the display device. The query command can be a specific data packet or protocol instruction containing the display device's identification information and the query request. Sending a query command ensures that the latest connection status information is obtained in the event that the connection status may be outdated.
[0091] Step S504: Obtain the latest connection status of the control device based on the query command, and return the latest connection status to the application.
[0092] In this embodiment of the present application, if the connection status is connected, a query command can be sent directly to the control device. After receiving the query command, the control device generates a response message based on the current connection status and sends the response message back to the display device. The controller parses the response message to obtain the latest connection status. The response message may include detailed information about the connection status, such as the connection status code and connection time.
[0093] In an embodiment of the present application, if the connection status is disconnected, the query command cannot be sent to the control device. At this time, a notification of failure to send can be obtained, so that the latest connection status can be obtained as disconnected.
[0094] In the embodiment of the present application, the display device can pass the latest connection status to the application through an interface or a callback function. The application can then perform corresponding processing based on the latest connection status, such as updating the user interface, performing specific operations, etc.
[0095] The display device provided in the embodiment of the present application uses timestamp comparison to avoid frequent queries to the control device, reducing communication overhead and system load. Even when the connection status may be outdated, the latest connection status is obtained through a query command, ensuring that applications obtain accurate and real-time connection status information. This prevents applications from making incorrect decisions due to using outdated connection status information.
[0096] In some embodiments, after step S503, the controller is further configured to perform the following steps:
[0097] Step S505: updating the connection status in the memory based on the latest connection status, and updating the update timestamp based on the time node of the current update of the connection status.
[0098] In embodiments of the present application, the connection status in the memory can be stored in the form of a variable value, with different connection states corresponding to different variable values. For example, an enumeration type or integer can be used to represent different connection states (such as connected, not connected, connecting, disconnected, etc.). The update timestamp can be stored in the same data structure as the connection status, such as a structure or class, for easy management and access.
[0099] In an embodiment of the present application, the extracted connection status value can be written to the memory, overwriting the original connection status value, thereby updating the connection status. While updating the connection status in the memory, the time node of the connection status update can be obtained and determined as the new update timestamp. The new update timestamp is associated with the updated connection status and written to the memory. The connection status and the corresponding update timestamp can be stored in a cache.
[0100] The display device provided in the embodiments of the present application ensures that the data in the memory is consistent with the actual connection status by promptly updating the connection status and updating the timestamp in the memory, thereby avoiding incorrect decisions or operations caused by inconsistent data. By promptly updating the connection status and updating the timestamp, subsequent queries can obtain accurate and real-time connection status information.
[0101] In some embodiments, the controller executes step S503 to generate a query command when the difference between the timestamp and the update timestamp exceeds a preset time range, which can be achieved by the following steps:
[0102] Step S5031: When the difference between the timestamp and the update timestamp exceeds a preset time range, a query command is generated based on the timestamp.
[0103] In an embodiment of the present application, if the difference between the timestamp and the update timestamp exceeds a preset time range, indicating that the connection status in the memory may be outdated, a query command is sent to ensure that the latest connection status information is obtained. The query command can be encapsulated in a specific protocol format, such as JSON, XML, etc. The query command can be generated according to predefined rules and templates to ensure that the format and content of the command meet the requirements of the control device. After the controller generates the query command, the query command can be sent to the control device through the signal receiver.
[0104] In an embodiment of the present application, the controller is configured to: send the query command to the control device to obtain response information from the control device; and obtain the latest connection status between the control device and the display device based on the response information, wherein the response information carries the timestamp.
[0105] In an embodiment of the present application, when the control device receives a query command, it generates a response message. The response message is a data packet generated by the control device based on the current connection status after receiving the query command and returned to the display device. The response message includes the latest connection status between the control device and the display device and the timestamp corresponding to the query command (or related information used to identify the query). The format and content of the response message should match the format and content of the query command so that the display device can correctly parse it.
[0106] In an embodiment of the present application, the controller can parse the response information according to predefined parsing rules and templates to ensure that the required connection status can be correctly extracted.
[0107] In the embodiment of the present application, the validity of the response information can be verified by carrying a timestamp in the response information. The validity can be verified by the timestamp, for example, by comparing the timestamp with the timestamp carried in the response information to determine whether they are the same. If they are the same, the response information is valid; if they are not the same, the response information is invalid.
[0108] The display device provided in the embodiment of the present application ensures that the connection status information obtained by the display device is accurate and real-time by comparing timestamps and obtaining the latest connection status from the control device.
[0109] In some embodiments, the controller is further configured to perform the following steps:
[0110] Step S506 : When it is detected that the control device disconnects the communication connection with the display device or establishes the communication connection with the display device, the connection status in the memory is updated, and the update timestamp is updated based on the time node of this update.
[0111] In an embodiment of the present application, the control device and the display device may periodically send heartbeat packets, and the heartbeat packets are used to detect whether the control device disconnects the communication connection with the display device or establishes a communication connection with the display device.
[0112] In some embodiments, it may be determined based on a connection status notification in a communication protocol whether the control device disconnects the communication connection with the display device or establishes the communication connection with the display device.
[0113] In the embodiment of the present application, if the communication connection is disconnected, the connection state needs to be updated from "connected" to "disconnected" and the current timestamp needs to be recorded. If the communication connection is established, the state needs to be updated from "disconnected" to "connected" and the update timestamp in the memory needs to be updated.
[0114] The display device provided in the embodiment of the present application can update the connection status and the update timestamp of the connection status when a change in the connection status is detected, thereby ensuring the accuracy and timeliness of the connection status.
[0115] In some embodiments, the controller may obtain the timestamp corresponding to the query information by the following steps:
[0116] Step S5011: obtaining a timestamp corresponding to the query information based on the system time of the query information obtained.
[0117] In an embodiment of the present application, when the query information does not contain time information, the timestamp corresponding to the query information can be obtained through the system time. The controller can use the API provided by the system to obtain the current time and obtain the timestamp corresponding to the query information based on the current time.
[0118] In the embodiment of the present application, the query information may be parsed to determine whether it contains time information. If it does not contain time information, a timestamp corresponding to the query information is obtained based on the system time of the query information.
[0119] The display device provided in the embodiment of the present application can obtain the timestamp corresponding to the query information in a scenario where the query information has no time information, and can obtain the timestamp more conveniently.
[0120] In some embodiments, the controller may obtain the timestamp corresponding to the query information by the following steps:
[0121] Step S5012: parse the query information to obtain a timestamp carried in the query information.
[0122] In an embodiment of the present application, if the query information carries a timestamp, the timestamp can be extracted by parsing the time field in the query information. During the extraction, the timestamp can be extracted using a regular expression according to the timestamp format.
[0123] In the embodiment of the present application, by parsing the time in the query information, the time when the query information is generated or sent can be reflected, which can improve the accuracy of timestamp acquisition.
[0124] In some embodiments, the connection status in the memory is stored as a variable value, and different connection statuses correspond to different variable values.
[0125] In the embodiments of the present application, variable values may use enumeration types, for example, 0 represents "not connected", 1 represents "connected", 2 represents "connecting", and 3 represents "disconnecting". In some embodiments, a state machine may also be used to represent the connection state.
[0126] The display device provided in the embodiment of the present application stores the connection status as a variable value, and different connection statuses correspond to different variable values, which can facilitate the management and maintenance of the connection status.
[0127] In some embodiments, the controller is further configured to perform the following steps:
[0128] Step S507: updating the status indication signal displayed on the user interface based on the change in the connection status.
[0129] In the embodiment of the present application, the status indication signal is a signal that feeds back the current connection status to the user through the user interface.
[0130] In the embodiment of the present application, the status indication signal of the user interface can be dynamically adjusted according to the change of the connection status to ensure that the user understands the connection status in real time.
[0131] In some embodiments, before step S501, the controller is further configured to perform the following steps:
[0132] When a pairing request is obtained and the identification information in the pairing request matches the identification information of the pre-stored control device, pairing is performed with the control device, and when pairing is successful, the connection status and the update timestamp in the memory are updated.
[0133] In the embodiments of the present application, a pairing request refers to a connection request initiated by a control device to a display device to establish a communication relationship. The request typically includes identification information of the control device (such as a device ID, MAC address, etc.). The identification information is a string or binary data used to uniquely identify the control device, such as the device's serial number or Bluetooth MAC address. The pre-stored identification information of the control device is a list of valid device identifiers stored by the control device in a memory (such as an EEPROM, Flash, etc.) and is used to verify the legitimacy of the pairing request.
[0134] In an embodiment of the present application, the control device may receive a pairing request sent by the control device via a communication interface (such as Bluetooth, Wi-Fi, or a serial port). The control device's identification information is extracted from the pairing request and compared with the valid identification information pre-stored in the target device's memory. If the identification information matches, pairing is performed with the control device, and the connection status and update timestamp in the memory are updated.
[0135] The display device provided in the embodiment of the present application can achieve secure pairing with the control device and dynamically update the connection status and timestamp to ensure the reliability of the connection status.
[0136] Based on the above embodiments, the present application further provides a method for obtaining a connection status. Figure 6 The present invention provides a flowchart illustrating an implementation of a method for obtaining connection status provided in an embodiment of the present invention. The following description uses the example of a Bluetooth connection state and a pointing remote control as an example. The pointing remote control is connected to a display device via an external device, which can be a dongle. The method for obtaining connection status includes: monitoring dongle insertion events through a UHD service. The UHD service determines whether the dongle is a pointing remote control dongle. If so, it reads the device's unique identifier; if not, it terminates. The UHD service issues a query command with a unique identifier to query the Bluetooth connection status. The dongle forwards the query command to the remote control, which returns a response message with the identifier. At this point, the UHD service process updates the Bluetooth connection status and the corresponding update timestamp. When the application queries the Bluetooth connection status, it also queries the Bluetooth status with the unique identifier. If the timestamp is close, it returns directly; if the timestamp exceeds 200ms, it queries the pointing remote control for the latest connection status and updates the timestamp. When the remote control actively disconnects or reconnects, the timestamp is also updated to ensure the accuracy of the connection status. When the remote control connects back to the dongle or actively connects successfully and actively reports the connection status, the unique identifier of the reporting command is set to blank. When the UHD service process reads this command, it updates the variable value of the Bluetooth status with the highest priority.
[0137] In the embodiment of the present application, after the UHD service process receives the instruction to query the Bluetooth status, it combines the query instruction with the command identification parameter and writes data to the / dev / hidraw node, thereby sending the query Bluetooth status instruction with a unique identification to the dongle.
[0138] The display device provided by the embodiment of the present application can accurately update the connection status and reduce the frequency of sending requests to query the connection status.
[0139] Based on the aforementioned embodiments, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in the embodiment of the method for obtaining the connection status of the display device.
[0140] An embodiment of the present application provides a computer program product. When the computer program product is run on a display device, the display device can implement the steps in the embodiment of the method for obtaining the connection status.
[0141] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some or all of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.
[0142] For ease of explanation, the above description has been presented in conjunction with specific embodiments. However, the above exemplary discussion is not intended to be exhaustive or to limit the embodiments to the specific forms disclosed above. Based on the above teachings, various modifications and variations are possible. The above embodiments have been selected and described to better explain the principles and practical applications, thereby enabling those skilled in the art to better utilize the embodiments and various different variations of the embodiments suitable for specific use considerations.
Claims
1. A display device, characterized in that: include: a display for displaying a user interface; a memory, configured to store a connection state of the communication connection between the control device and the display device and an update timestamp corresponding to the connection state; A controller is communicatively connected to the memory and is configured to: In the case of obtaining query information of the application, obtaining a timestamp corresponding to the query information, wherein the query information is used to query the connection status of the communication connection between the control device and the display device; When the difference between the timestamp and the update timestamp is within a preset time range, the connection status is returned to the application.
2. The display device according to claim 1, wherein The controller is further configured to: generating a query command when the difference between the timestamp and the update timestamp exceeds a preset time range; The latest connection status of the communication connection between the control device and the display device is obtained based on the query command, and the latest connection status is returned to the application.
3. The display device according to claim 2, wherein The controller is further configured to: updating the connection status in the memory based on the latest connection status; The update timestamp is updated based on the time node of the current update of the connection status.
4. The display device according to claim 2, wherein: The controller generates a query command when the difference between the timestamp and the update timestamp exceeds a preset time range, and is configured to: generating a query command based on the timestamp if the difference between the timestamp and the update timestamp exceeds a preset time range; The controller is configured to obtain the latest connection status of the communication connection between the control device and the display device based on the query command as follows: Sending the query command to the control device to obtain response information from the control device; The latest connection status between the control device and the display device is obtained based on the response information, wherein the response information carries the timestamp.
5. The display device according to any one of claims 1 to 4, characterized in that The controller is further configured to: When it is detected that the control device disconnects the communication connection with the display device or establishes the communication connection with the display device, the connection status in the memory is updated, and the update timestamp is updated based on the time node of this update.
6. The display device according to any one of claims 1 to 4, characterized in that The obtaining of the timestamp corresponding to the query information includes: Obtain the timestamp corresponding to the query information based on the system time of the query information obtained, or, The query information is parsed to obtain a timestamp carried in the query information.
7. The display device according to any one of claims 1 to 4, characterized in that The connection status in the memory is stored as a variable value, and different connection statuses correspond to different variable values.
8. The display device according to any one of claims 1 to 4, characterized in that: The controller is further configured to: The status indication signal displayed on the user interface is updated based on the change in the connection status.
9. The display device according to claim 1, wherein The controller is further configured to: When a pairing request is obtained and the identification information in the pairing request matches the identification information of the pre-stored control device, pairing is performed with the control device. If the pairing is successful, the connection status in the memory is updated, and the update timestamp is updated based on the time node of this update.
10. A method for obtaining a connection status, characterized in that: Applied to a display device, the display device stores a connection status of a communication connection between a control device and the display device and an update timestamp corresponding to the connection status, the method comprising: In the case of obtaining query information of the application, obtaining a timestamp corresponding to the query information, wherein the query information is used to query the connection status of the communication connection between the control device and the display device; When the difference between the timestamp and the update timestamp is within a preset time range, the connection status is returned to the application.