Multi-terminal scene recognition method and device based on key focus and terminal
By real-time detection of key focus and signal changes in smart TV source application, and automatically identifying and switching scenes, the automatic identification problem of smart TVs when connecting multiple external devices is solved, and efficient device adaptation and user experience improvement is achieved.
Patent Information
- Application Number
- CN202410945452.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-15
- Publication Date
- 2024-11-12
AI Technical Summary
In the case where smart TVs are connected to multiple external devices, the prior art cannot automatically identify the external devices used by the current user, resulting in the user having to manually adjust the TV settings to adapt to different devices.
By real-time detection of whether the source application has obtained the key focus, the source channel-device information is queried using the source channel-device information record table, and the scene is switched when the signal of the target signal output device is detected, and the key focus is switched back to the default scene.
实现了在多终端连接情况下的自动化识别和适配,提供了通用性、自动化、无操作门槛的信源接入设备识别方案,提升了用户体验,确保电视与设备的全自动化适配。
Smart Images

Figure CN118945402A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of signal source recognition, and in particular to a multi-terminal scene recognition method, device and terminal based on key focus. Background Art
[0002] In the prior art, smart TVs can watch set-top box content through a signal source, can also connect to multiple external devices at the same time, such as a PSP game console, etc., and can also watch videos online, adjust TV settings, make calls, etc. through local networking.
[0003] Each type of external device can represent a unique purpose. After connecting multiple external devices, the user can switch the external devices through the remote control to display the signals of different external devices on the display screen of the smart TV. However, in the prior art, after switching the external device, the user needs to adjust the settings of the smart TV according to the needs of the external device so that the TV picture or sound playback device can be suitable for the current external device. Therefore, there is an urgent need for a method that can identify the scene for the device information of each external device in the scenario where the smart TV is connected to multiple terminals and switch to a method suitable for the current external scene in a timely manner.
[0004] Therefore, the prior art still needs to be improved and enhanced. Summary of the invention
[0005] The present invention provides a multi-terminal scene recognition method, device and terminal based on key focus, aiming to solve the problem in the prior art that it is still not possible to automatically identify the external device used by the current user when multiple terminals are connected to switch the TV usage scene based on the current external device.
[0006] A first aspect of the present invention provides a multi-terminal scene recognition method based on key focus, comprising:
[0007] Real-time detection of whether the source application obtains the key focus, when monitoring the source application to obtain the key focus, querying the target device information of the target signal output device currently corresponding to the source application based on the source channel-device information record table, the source channel-device information record table records the device information of the signal output device corresponding to each source channel;
[0008] When a signal of the target signal output device is detected, the current scene is switched to the target device scene based on the target device information;
[0009] When it is detected that the source application loses the key focus, the current scene is switched to the default scene.
[0010] A second aspect of the present invention is a multi-terminal scene recognition device based on key focus, comprising:
[0011] A query module is used to detect in real time whether a source application obtains a key focus. When the source application is monitored to obtain a key focus, the target device information of the target signal output device currently corresponding to the source application is queried based on the source channel-device information record table. The source channel-device information record table records the device information of the signal output device corresponding to each source channel;
[0012] A first switching module, configured to switch the current scene to the target device scene based on the target device information when a signal of the target signal output device is detected;
[0013] The second switching module is used to switch the current scene to the default scene when it is monitored that the source application loses the key focus.
[0014] According to a third aspect of the present invention, a terminal is provided, wherein the terminal comprises: a memory, a processor, and a multi-terminal scene recognition program based on key focus stored in the memory and executable on the processor, wherein the multi-terminal scene recognition program based on key focus, when executed by the processor, implements the steps of the multi-terminal scene recognition method based on key focus as described above.
[0015] Beneficial effect: Compared with the prior art, the present invention provides a multi-terminal scene recognition method, device and terminal based on key focus. In the multi-terminal scene recognition method based on key focus provided by the present invention, when scene recognition is performed when multiple external devices are connected to the TV end, by real-time detection of whether the source application obtains the key focus, when the source application is monitored to obtain the key focus, the target device information of the target signal output device currently corresponding to the source application is queried based on the source channel-device information record table, and the source channel-device information record table records the device information of the signal output device corresponding to each source channel, and then, when the signal of the target signal output device is detected, the current scene is switched to the target device scene based on the target device information; when the source application loses the key focus, the current scene is switched to the default scene. The present invention provides users with a multi-terminal scene recognition method based on key focus, which solves the problem that the prior art has not been able to realize automatic identification of the terminal currently used by the user when multiple terminals are connected, and provides a signal output device recognition scheme for source access with universality, automation, and no operation threshold, as well as a scene recognition scheme related to access devices / TVs with universality, automation, no operation threshold, and high performance. The TV and devices directly or indirectly connected to the TV can achieve fully automatic adaptation, so that users can have a smarter and better experience when using the TV terminal. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1A flowchart of an embodiment of a multi-terminal scene recognition method based on key focus provided by the present invention;
[0017] Figure 2 A flowchart of synchronous detection when a new TV signal is input in an embodiment of a multi-terminal scene recognition method based on key focus provided by the present invention;
[0018] Figure 3 A flowchart of synchronous detection from device B to remote controller in an embodiment of a multi-terminal scene recognition method based on key focus provided by the present invention;
[0019] Figure 4 A flowchart of a remote controller B forwarding information B in an embodiment of a multi-terminal scene recognition method based on key focus provided by the present invention;
[0020] Figure 5 A flowchart of a B television receiving B information in an embodiment of a multi-terminal scene recognition method based on key focus provided by the present invention;
[0021] Figure 6 In the embodiment B of the multi-terminal scene recognition method based on key focus provided by the present invention, the process of updating the device record table is as follows: Figure 1 ;
[0022] Figure 7 In the embodiment B of the multi-terminal scene recognition method based on key focus provided by the present invention, the process of updating the device record table is as follows: Figure 2 ;
[0023] Figure 8 In the embodiment B of the multi-terminal scene recognition method based on key focus provided by the present invention, the process of updating the device record table is as follows: Figure 3 ;
[0024] Fig. 9 In the embodiment B of the multi-terminal scene recognition method based on key focus provided by the present invention, the process of updating the device record table is as follows: Figure 4 ;
[0025] Fig.10 The process of updating the device record table in the embodiment of the multi-terminal scene recognition method based on key focus provided by the present invention Figure 5 ;
[0026] Fig.11 A structural principle diagram of an embodiment of a multi-terminal scene recognition device based on key focus provided by the present invention;
[0027] Fig.12 A schematic diagram of an operating environment of an embodiment of a terminal provided by the present invention. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solution and effect of the present invention clearer and more specific, the present invention is further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0029] Embodiment 1
[0030] The multi-terminal scene recognition method based on key focus provided in this embodiment can be executed by a terminal, and the terminal can be but is not limited to a television, a computer, etc., and is described below using a smart television as an example.
[0031] At first, TVs had remote controls, as did disc players, set-top boxes, Xiaomi boxes, and other signal output devices. It was inconvenient to use so many remote controls at the same time. In order to optimize the user experience, set-top box and TV manufacturers have tried some solutions.
[0032] Among them, there is a solution that set-top box manufacturers cooperate with TV manufacturers to realize the recognition of TV and set-top box scenes when the TV source selection list is pulled up by the remote control, and then different key values are sent in different scenes. However, its ability to recognize TV and other device scenes is limited, and scene recognition relies on the key of switching sources, which has a narrow application range.
[0033] Today's smart TVs have many more uses or functions, such as watching online videos, adjusting TV settings, making phone calls, etc. And the TV can connect to more than just set-top boxes.
[0034] Each type of external device can represent a unique purpose. In this embodiment, it can be customized according to this purpose to provide users with a better experience. Specifically, this embodiment provides a more general and threshold-free solution to truly realize automatic scene recognition, allowing users to adapt the TV or devices directly or indirectly connected to the TV according to the recognized scenes to provide users with a smarter and better experience.
[0035] Specifically, Figure 1 As shown, the multi-terminal scene recognition method based on key focus provided in this embodiment includes the steps of:
[0036] S100. Detect in real time whether the source application obtains the key focus. When the source application is monitored to obtain the key focus, query the target device information of the target signal output device currently corresponding to the source application based on the source channel-device information record table. The source channel-device information record table records the device information of the signal output device corresponding to each source channel.
[0037] In this embodiment, the external devices connected to the TV terminal are collectively referred to as B devices. In this embodiment, the TV terminal identifies the scene and notifies the remote control to switch modes by changing the focus of the TV button. That is to say, the TV terminal detects in real time whether the source application obtains the button focus, and based on this, identifies the current device scene and notifies the remote control to switch modes, specifically including:
[0038] The scene can be identified by the change of the button focus of the TV terminal, the scene can be identified by the change of the signal source channel, and the scene can be identified by the change of the signal.
[0039] In this embodiment, the key focus is specifically explained as follows: only one window among multiple windows can obtain the user's key events at the same time, and having the key focus means that the window is the window among multiple windows that can currently obtain the user's key events.
[0040] Specifically, identifying a scene through a change in the focus of a TV button includes:
[0041] The source application of the TV terminal monitors the state change of the key focus of the source application through the onWindowFocusChanged method. If the callback parameter hasFocus is true, the key focus is obtained, and if it is false, the key focus is lost. In this embodiment, the source application refers to the application used by the TV terminal to display external signals. In this application, the connection port to be displayed can be selected, such as HDMI1, HDMI2, DTV, AV. Each TV terminal has only one source application, and the source application displays the signals of different connected external devices through the connection port selected by the user.
[0042] Specifically, Android applications often use the Activity class or the View class to implement display windows, and less commonly used ones are also implemented based on the Window class.
[0043] If you use the Activity class, use its own onWindowFocusChanged listener callback;
[0044] If you use the View class, use its own onWindowFocusChanged listener callback;
[0045] If you use the Window class, add the onWindowFocusChanged listener callback by calling getDecorView().getViewTreeObserver().addOnWindowFocusChangeListener.
[0046] When the TV terminal recognizes that the signal source channel or signal has changed, it will also detect whether the source application has a key focus. Only when the source application has a key focus can it recognize that the current device scene has changed. In this embodiment, the external device selected by the source application when it has a key focus is the target signal output device.
[0047] When it is monitored that the source application obtains the key focus, the target device information of the target signal output device is queried based on the source channel-device information record table, which records the device information of the signal output device corresponding to each of the source applications.
[0048] Before querying the target device information of the target signal output device currently corresponding to the source application based on the source channel-device information record table, the method further includes:
[0049] Constructing a source channel-device information record table, and updating the source channel-device information record table based on a target user update signal, or;
[0050] Acquire the device information connected to the HDMI connection channel based on the CEC protocol, and update the source channel-device information record table, or;
[0051] Acquire the EDID of the access device, and update the source channel-device information record table based on the EDID of the access device, or;
[0052] The information source channel-device information record table is updated based on the signal synchronization detection method.
[0053] That is to say, in this embodiment, there is a local data recording submodule, namely the source channel-device information recording table, which is used to record the signal output device connected to each channel.
[0054] The source channel-device information record table can update data in four ways:
[0055] The first is manual update by the user, and the user can manually update through the UI, which specifically includes: updating the source channel-device information record table based on the target user update signal.
[0056] The second is automatic update through CEC communication. When the TV and device B are connected through HDMI, the TV and the device communicate through the CEC protocol to obtain the device information connected to the channel, specifically including obtaining the device information connected to the HDMI connection channel based on the CEC protocol, and updating the source channel-device information record table;
[0057] The third method is to automatically update through the EDID of the access device. When the TV is connected to device B via HDMI, the device information connected to the channel is obtained by obtaining the EDID of the access device, specifically including obtaining the EDID of the access device and updating the source channel-device information record table based on the EDID of the access device.
[0058] The fourth method is to update the source channel-device information record table based on a signal synchronization detection method.
[0059] In these four methods, the priority of the update can be defined. For example, the priority can be set to manual>CEC detection>EDID>signal synchronization detection, so that the source channel-device information record table can be updated in the simplest way possible.
[0060] Specifically, in this embodiment, the signal synchronization detection method is mainly based on the example that the B device and the TV terminal communicate indirectly through a remote control. Of course, in more embodiments, the B device and the TV terminal can also communicate directly. At this time, the signal sent by the B device is directly received by the TV terminal, which is the same as the remote control reception principle, and will not be repeated here.
[0061] Since in this embodiment, the signal synchronization detection method is that the B device and the TV terminal communicate indirectly through a remote controller, therefore, in this embodiment, the signal synchronization detection method is based on the source channel-device information record table. Update, including:
[0062] When a signal input is detected on the first information source channel, a first timestamp and a first information are recorded, and the first timestamp and the first information are added to a first queue, wherein the first timestamp is the time when the signal input is detected on the first information source channel, and the first information is the channel information corresponding to the first information source channel;
[0063] When a B message sent by a target remote controller is detected, a B message timestamp is recorded, and the B message and the B message timestamp are added to a second queue, wherein the B message includes a second timestamp and B device information, wherein the second timestamp is a timestamp of a B device outputting a signal to the target remote controller, and the B device information is device information of the B device;
[0064] The information source channel-device information record table is updated based on the first queue and the second queue.
[0065] Specifically, refer to Figure 2, when the TV terminal detects a certain channel, in this embodiment, it is recorded as the first source channel, when the first source channel has a new signal input, the current timestamp, that is, the first timestamp tvAT and the first information - the channel information tvSource corresponding to the first source channel are recorded, the first timestamp tvAT and the first information are added to the first queue TvAQueue, and the "TV signal synchronization detection module" is activated, the first timestamp tvAT is the time when the first source channel is detected to have a signal input, and the first information is the channel information corresponding to the first source channel;
[0066] Reference Figure 3 , when the B device outputs a signal, in this embodiment, the B device can be any external device connected to the TV and the remote control, and the B device sends a device information carrying a timestamp outT and the B device to the target remote control. In this embodiment, the information sent by the B device is the B information, and the B information includes the timestamp outT when the B device sends the message, which is recorded as the second timestamp outT, and the B information also includes the device information of the B device, which is recorded as the B device information. After receiving the B information, the target remote control will add the B information to the remote control cache queue RcQueue, and then activate the "remote control forwards device information to the TV module".
[0067] The workflow of the remote controller forwarding device information to the TV module is as follows:
[0068] Reference Figure 4 First, detect the number of data in the cache queue RcQueue. If it is 0, end. If it is greater than 0, take the B information corresponding to the head data as an example and send it to all terminals connected to the target remote control. In this embodiment, the TV terminal is one of the terminals connected to the target remote control.
[0069] If the TV end returns a successful reception message, the team head data will be popped up, and then the step of getting the team head data and sending it to all terminals connected to the target remote control will be repeated until no TV end returns a successful reception message. At this time, after waiting for N1 (N1 is a constant and can be configured according to the model and remote control model) seconds, the step of getting the team head data and sending it to all terminals connected to the target remote control will be repeated until the number of data in the cache queue RcQueue is 0.
[0070] Reference Figure 5When the TV terminal receives the B information sent by the target remote control, it records the B information timestamp tvBT, where the B information timestamp tvBT is the time when the TV terminal receives the B information, and then adds the B information and the B information timestamp tvBT to the second queue. The B information includes the second timestamp outT and the B device information. The second timestamp is the timestamp outT when the B device outputs the signal to the target remote control, and the B device information is the device information of the B device.
[0071] Then, the information source channel-device information recording table is updated based on the first queue and the second queue.
[0072] The updating of the information source channel-device information record table based on the first queue and the second queue includes:
[0073] Determine whether the first queue and the second queue are empty, and if so, end the detection;
[0074] If it is not empty, obtain the first difference value, where the first difference value is the absolute value of the difference between the target first timestamp and the target second timestamp, where the target first timestamp is the first timestamp corresponding to the head data of the first queue, and the target second timestamp is the second timestamp corresponding to the head data of the second queue;
[0075] Determine whether the first difference is less than a first threshold value, and if the first difference is less than the first threshold value, add corresponding information of the target first information and the target B device information to the source channel-device information record table, wherein the target first information is the first information corresponding to the head data of the first queue, and the target B device information is the B device information corresponding to the head data of the second queue;
[0076] Pop up the head data of the first queue and the second queue;
[0077] The step of determining whether the first queue and the second queue are empty is repeated until the first queue and the second queue are empty.
[0078] After determining whether the first difference is less than a first threshold, the method further includes:
[0079] If the first difference is not less than the first threshold, determine whether the second difference is less than the second threshold, the second difference is the absolute value of the difference between the target first timestamp and the target B information timestamp, and the target B information timestamp is the B information timestamp corresponding to the head data of the second queue;
[0080] If the second difference is less than the second threshold, adding corresponding information of the target first information and the target B device information to the source channel-device information record table;
[0081] Pop up the head data of the first queue and the second queue;
[0082] The step of determining whether the first queue and the second queue are empty is repeated until the first queue and the second queue are empty.
[0083] After determining whether the second difference is less than the second threshold, the method further includes:
[0084] If the second difference is not less than the second threshold, popping up the head information of the first queue or the second queue based on the first difference and the second difference;
[0085] The step of determining whether the first queue and the second queue are empty is repeated until the first queue and the second queue are empty.
[0086] The popping out information of the first queue or the second queue based on the first difference and the second difference includes:
[0087] Comparing the first difference with the second difference, and when the first difference is smaller than the second difference, determining the size of the target first timestamp and the target second timestamp;
[0088] If the first timestamp is less than the second timestamp, popping out the head data of the first queue;
[0089] If the first timestamp is greater than the second timestamp, the header data of the second queue is popped out.
[0090] The popping out the information of the first queue or the second queue based on the first difference and the second difference further includes:
[0091] Compare the first difference with the second difference, and when the first difference is greater than the second difference, determine the size of the target first timestamp and the target B information timestamp;
[0092] If the first timestamp is less than the timestamp of the target B information, popping out the head data of the first queue;
[0093] If the first timestamp is greater than the target B information timestamp, the header data of the second queue is popped out.
[0094] Specifically, in this embodiment, the difference between the first timestamp tvAT, the B information timestamp tvBT and the second timestamp outT corresponding to the queue header information in the first queue and the second queue is used to determine whether the time when the TV receives the signal input is close enough to the time when the B device outputs the signal, so as to distinguish whether the target B device is connected to the target channel.
[0095] Reference Figure 6 , detect the number of data in the first queue TvAQueue and the second queue TvBQueue, if one of them is 0, then end. If neither is 0, then take the target first timestamp (target tvAT) in the first queue TvAQueue head data and the target second timestamp (target outT) in the second queue TvBQueue head data, calculate the absolute value of the difference between the target second timestamp (target outT) and the target first timestamp (target tvAT) as the first difference diff1, and determine whether the first difference diff1 is less than the first threshold value N2 seconds (wherein the first threshold value is a constant, which can be configured according to the model and remote control model). If so, update the source channel-device information record table in the local data recording submodule with the target first information tvSource and the target B device information, and then pop up the first queue TvAQueue head data and the second queue TvBQueue head data. This step is mainly to judge whether the time when the TV receives the signal input and the time when the B device outputs the signal are close enough based on the target second timestamp (target outT) and the target first timestamp (target tvAT) to judge whether the target first information tvSource and the target B device information are corresponding information. If so, it can be recorded in the source channel-device information recording table.
[0096] If the first difference diff1 is not less than the first threshold N2, the absolute value of the difference between the target first timestamp (target tvAT) and the target B information timestamp (target tvBT) is calculated and recorded as the second difference diff2.
[0097] Determine whether the second difference diff2 is less than the second threshold value N3 (N3 is a constant, which can be configured according to the model and remote control model). If the second difference diff2 is less than the second threshold value N3, the source channel-device information record table in the local data record submodule is updated with the target first information tvSource and the target B device information, and then the head data of the first queue TvAQueue and the head data of the second queue TvBQueue are popped up. This step is mainly based on the difference between the target first timestamp (target tvAT) and the target B information timestamp (target tvBT) to determine whether the time when the TV terminal receives the signal input is close enough to the time when the B device outputs the signal, so as to distinguish whether the target B device is connected to the target channel.
[0098] If it is still not the case, that is, the second difference diff2 is not less than the second threshold value N3, then the first difference diff1 is compared with the second difference diff2.
[0099] Reference Figure 7 If the first difference diff1 is smaller than the second difference diff2, the size of the target first timestamp (target tvAT) and the target second timestamp (target outT) is determined. If the target first timestamp (target tvAT) is smaller, the head data of the first queue TvAQueue is popped out. After popping out, the new head data is obtained and compared with the head data of the second queue, and the source channel-device information record table is updated based on the first queue and the second queue.
[0100] If the target second timestamp (target outT) is smaller, the head data of the second queue TvBQueue is popped out. After popping out, the new head data is obtained and compared with the head data of the first queue, and the source channel-device information record table is updated based on the first queue and the second queue.
[0101] Because the first timestamp tvAT in the first queue TvAQueue is increasing, and the second timestamp outT in the second queue TvBQueue is also increasing with a high probability, smaller data is popped out, which can make the first difference diff1 and the second difference diff2 calculated by the next set of data closer to 0.
[0102] If the first difference diff1 is not less than the second difference diff2, the size of the target first timestamp (target tvAT) and the target B information timestamp (target tvBT) is determined. If the target first timestamp (target tvAT) is smaller, the head data of the first queue TvAQueue is popped out. After popping out, the new head data is obtained and compared with the head data of the second queue, and the source channel-device information record table is updated based on the first queue and the second queue.
[0103] If the target B information timestamp (target tvBT) is smaller, the head data of the second queue TvBQueue is popped out. After popping out, the new head data is obtained and compared with the head data of the first queue, and the source channel-device information record table is updated based on the first queue and the second queue.
[0104] Because the first timestamp tvAT in the first queue TvAQueue is increasing, and the B information timestamp tvBT in the second queue TvBQueue is also increasing, smaller data is popped out, which can make the first difference diff1 and the second difference diff2 calculated by the next set of data closer to 0.
[0105] In this way, the information source channel-device information record table is obtained.
[0106] Then, the target device information of the target signal output device corresponding to the target source application is queried based on the source channel-device information record table, and the target signal output device is detected to see whether it has a signal.
[0107] S200: When a signal of the target signal output device is detected, the current scene is switched to the target device scene based on the target device information.
[0108] Specifically, refer to Figure 8 When the signal source application detects that the display window obtains the key focus, the current signal source channel of the signal source application is obtained, which is recorded as the target signal source channel. In this embodiment, the target signal source channel is an external device channel, and the external device channel can be a B channel, a C channel, a D channel, etc. At this time, it is determined whether the target signal source channel has a signal. If there is a signal, it is identified as a target device scene based on the target device information corresponding to the target signal source channel. The target scene can be a B scene, a C scene, a D scene, etc. If there is no signal, it is still identified as a TV scene.
[0109] When a change in the signal source channel or signal is detected, it is also detected whether the signal source application has a key focus. Only when the signal source application has a key focus, the current scene is identified as the device scene corresponding to the current signal output device. For details, refer to Fig. 9 , Fig.10 .
[0110] In this embodiment, after the current scene is switched to the target device scene based on the target device information, the method further includes:
[0111] The target operation is performed based on the predefined solution execution solution in the target device scenario.
[0112] Specifically, for each external device, there is a corresponding device scenario. For example, when the user selects the source application as a set-top box and monitors that the source application has obtained the key focus, it is identified that the current scenario is a set-top box scenario. At this time, the target operation is performed based on the predefined scenario execution plan under the target device scenario, including sending a mode switching signal to the target remote control to switch the mode of the target remote control to the target mode. In the target mode, the regular buttons of the target remote control are only effective for the target signal output device. When the source application loses the key focus, such as the built-in application of the TV terminal pops up a prompt window, the key focus will automatically return to the local terminal. Therefore, the source application will lose the key focus. At this time, a mode switching signal is sent to the target remote control to switch the mode of the target remote control back to the TV mode. In the TV mode, the regular buttons of the target remote control are only effective for the TV terminal. Furthermore, the predefined execution plan may also include switching the sound playback device, switching the screen display position or direction, turning on or off the power amplifier device, etc. For example, when the target signal output device is a game console, it is identified as a game console scene. At this time, the game mode is turned on based on the game console scene, including increasing the refresh rate of the TV screen, reducing input delay and optimizing color performance, and the screen image can also be displayed in portrait mode. Further, it can be pre-set to switch the sound playback device to a Bluetooth headset, so that the user can have a better gaming experience; for example, when the target signal output device is a DVD player, it is identified as a DVD scene. At this time, based on the DVD scene, it is switched to the listening mode, the power amplifier and the whole house audio can be turned on to obtain a better sound playback effect, allowing the user to better immerse himself in the world of music.
[0113] When it is monitored that the source application obtains the key focus, the step of querying the target signal output device corresponding to the source application based on the source channel-device information record table is also performed, and it is determined whether there is a signal on the target signal source channel. If there is a signal, it is identified as the target device scene. If there is no signal, it is still identified as the TV scene.
[0114] S300: When it is detected that the signal source application loses key focus, the current scene is switched to a default scene.
[0115] Specifically, after switching the current scene to the target device scene based on the target device information, the method further includes:
[0116] When it is detected that the target source application loses key focus, the current scene is switched to the default scene. In this embodiment, the default scene is the TV scene. At this time, a mode switching signal is sent to the target remote control to switch the mode of the target remote control to the local mode. In the local mode, the regular buttons of the target remote control are only effective for the local device.
[0117] Next, two application examples based on the multi-terminal scene recognition method based on key focus described in this embodiment are given:
[0118] Application example 1:
[0119] Assume that the usage environment of Application Example 1 is one intelligent multi-function remote control and one TV terminal. The TV terminal is connected to one set-top box, and the set-top box is connected to the HDMI2 channel of the TV.
[0120] The operation process can be:
[0121] The user uses the TV special button standby button to turn on the TV. Then, during the TV startup process, it is recognized as a TV scene by default. At this time, the smart multi-purpose remote control is notified to switch to TV mode for controlling the TV. Then, the set-top box special button standby button is used to turn on the set-top box. After turning on the TV, the user uses the common buttons on the smart multi-purpose remote control. The common buttons are generally the up, down, left, right, confirm, return and number keys. At this time, the common buttons control the TV terminal and are used to view the messages received by the TV. Then, the special button source key of the TV terminal is used to call out the source list, and then the common button is used to enter the HDMI2 channel. After entering the HDMI2 channel, based on the button focus or CEC protocol, the current scene can be identified as a set-top box scene. When it is confirmed that the set-top box signal can be received, the smart multi-purpose remote control is notified to switch the mode to control the set-top box. At this time, when the user uses the common buttons, the controlled object is switched to the set-top box, which can be used to enter the TV live broadcast function from the set-top box homepage, and the channel number is input through the number keys (123456789) of the common buttons to quickly switch to CCTV-1, and then the common buttons (up and down keys) are used to switch to CCTV-10.
[0122] Application Example 2:
[0123] Assume that the usage environment of Application Example 2 is one smart multi-function remote control and one TV terminal. The TV terminal is connected to one set-top box and one PS5 game console, where the set-top box is connected to the HDMI2 channel of the TV, and the PS5 game console is connected to the HDMI1 channel of the TV.
[0124] The operation process can be:
[0125] The elder sister and the younger brother are using the set-top box playback function to watch the "Discovery and Exploration" program on CCTV-10 the day before. When the advertisement is in the middle of the program, the elder sister skips the advertisement by fast-forwarding through the smart multi-purpose remote control. After watching the "Discovery and Exploration" program the day before, the elder sister uses the smart multi-purpose remote control to playback the "Discovery and Exploration" program from two days before. At this time, the TV terminal and the smart multi-purpose remote control are in the set-top box scene, and the public buttons of the smart multi-purpose remote control are used to control the set-top box.
[0126] Halfway through the broadcast, a floating window alarm reminder popped up in the lower right corner of the TV. At this time, it automatically recognized and switched to the TV scene, notifying the remote control to switch the mode to control the TV. The floating window alarm reminder box read: "I have to practice piano at 9 o'clock." At this time, since the TV scene has been automatically triggered, the remote control can directly control the TV. Therefore, my sister turned off the alarm reminder through the smart multi-purpose remote control.
[0127] After turning off the alarm, the alarm pop-up window disappears, and the system automatically recognizes and switches back to the set-top box scene. At the same time, the smart multi-purpose remote control is notified to switch the mode to control the set-top box. At this time, the public button of the smart multi-purpose remote control is used to control the set-top box. My sister paused the playback of the set-top box with the smart multi-purpose remote control, and then went out to practice the piano.
[0128] After the sister went to practice the piano, the brother used the TV's special button Source button to call out the source selection menu. When the source selection menu is called out, it returns to the TV scene by default. At this time, the brother uses the public button to enter HDMI1, and recognizes that the current scene is switched to the PS5 scene based on the button focus or CEC protocol, automatically turns on the TV game mode, and automatically switches to the user's PS5 scene configuration.
[0129] Since my brother had previously set it up in the management menu to give priority to using Bluetooth headphones as the sound output device in the PS5 scene, the TV automatically switched to playing sound through the Bluetooth headphones, and then my brother started playing PS5.
[0130] One hour later, the elder sister came back from piano practice, and it was the younger brother's turn to practice. The elder sister used the TV special button Source button on the smart multi-purpose remote control to call out the source selection menu, returned to the TV scene by default, used the public button to enter HDMI2, switched to the set-top box scene based on button focus or CEC protocol recognition, turned off the TV game mode, changed back to the regular TV speaker sound, notified the remote control to switch mode to control the set-top box, and then used the public button to continue watching. At this time, it is in the set-top box scene, and the public button of the smart multi-purpose remote control is used to control the set-top box.
[0131] It can be seen that this embodiment combines the Activity class, View class, OnWindowFocusChangeListener class, onWindowFocusChanged method, signal source switching callback, signal state change callback, etc. to realize the identification of whether the current TV mode or B mode (or C mode, D mode) should be used to realize automatic mode switching. At the same time, based on the switched mode, a mode switching signal is sent to the target remote control to switch the mode of the target remote control to the target mode. In this way, a signal output device identification scheme for signal source access with universality, automation, and no operation threshold is successfully implemented. At the same time, a scene identification scheme related to access device / TV with universality, automation, no operation threshold, and high performance is implemented.
[0132] In summary, this embodiment provides a multi-terminal scene recognition method based on key focus. When scene recognition is performed when multiple external devices are connected to the TV end, by real-time detection of whether the source application obtains the key focus, when the source application is monitored to obtain the key focus, the target device information of the target signal output device currently corresponding to the source application is queried based on the source channel-device information record table, and the source channel-device information record table records the device information of the signal output device corresponding to each source channel. Then, when the signal of the target signal output device is detected, the current scene is switched to the target device scene based on the target device information, and when the source application is monitored to lose the key focus, the current scene is switched to the default scene. This embodiment provides users with a multi-terminal scene recognition method based on key focus, which solves the problem that the prior art has not been able to realize automatic identification of the terminal currently used by the user when multiple terminals are connected, and provides a signal output device recognition scheme for source access with universality, automation, and no operation threshold, as well as a scene recognition scheme related to access devices / TVs with universality, automation, no operation threshold, and high performance. The TV and devices directly or indirectly connected to the TV can achieve fully automatic adaptation, so that users can have a smarter and better experience when using the TV terminal.
[0133] It should be understood that, although the various steps in the flowcharts given in the accompanying drawings of the present invention are displayed in sequence according to the indications of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear description in this article, the execution of the steps in the present invention is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps of the present invention may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0134] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by signaling related hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0135] Embodiment 2
[0136] Based on the above embodiments, the present invention also provides a multi-terminal scene recognition device based on key focus, and its functional module schematic diagram is as follows: Fig.11 As shown, the multi-terminal scene recognition device based on key focus includes:
[0137] A query module, used for detecting in real time whether a source application obtains a key focus, and when monitoring that the source application obtains a key focus, querying the target device information of the target signal output device currently corresponding to the source application based on the source channel-device information record table, wherein the source channel-device information record table records the device information of the signal output device corresponding to each source channel, as described in the first embodiment;
[0138] A first switching module, configured to switch the current scene to the target device scene based on the target device information when a signal of the target signal output device is detected, as described in the first embodiment;
[0139] The second switching module is used to switch the current scene to the default scene when it is monitored that the source application loses the key focus, as described in the first embodiment.
[0140] Embodiment 3
[0141] like Fig.12 As shown, based on the above-mentioned multi-terminal scene recognition method based on key focus, the present invention also provides a terminal accordingly, and the terminal includes a processor 10, a memory 20 and a display 30. Fig.12 Only some components of the terminal are shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.
[0142] In some embodiments, the memory 20 may be an internal storage unit of the terminal, such as a hard disk or memory of the terminal. In other embodiments, the memory 20 may also be an external storage device of the terminal, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the terminal. Further, the memory 20 may also include both an internal storage unit of the terminal and an external storage device. The memory 20 is used to store application software and various types of data installed on the terminal, such as the program code of the installation terminal. The memory 20 may also be used to temporarily store data that has been output or is to be output. In one embodiment, a multi-terminal scene recognition program 40 based on key focus is stored on the memory 20, and the multi-terminal scene recognition program 40 based on key focus can be executed by the processor 10, thereby realizing the multi-terminal scene recognition method based on key focus in the present application.
[0143] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor or other data processing chip, used to run the program code or process data stored in the memory 20, such as executing the multi-terminal scene recognition method based on key focus.
[0144] In some embodiments, the display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, etc. The display 30 is used to display information on the terminal and to display a visual user interface. The components 10-30 of the terminal communicate with each other via a system bus.
[0145] In one embodiment, when the processor 10 executes the key focus-based multi-terminal scene recognition program 40 in the memory 20, the following steps are implemented:
[0146] Real-time detection of whether the source application obtains the key focus, when monitoring the source application to obtain the key focus, querying the target device information of the target signal output device currently corresponding to the source application based on the source channel-device information record table, the source channel-device information record table records the device information of the signal output device corresponding to each source channel;
[0147] When a signal of the target signal output device is detected, the current scene is switched to the target device scene based on the target device information;
[0148] When it is detected that the source application loses the key focus, the current scene is switched to the default scene.
[0149] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention 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 of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A multi-terminal scene recognition method based on key focus, It is characterized in that include: Real-time detection of whether the source application obtains the key focus, when monitoring the source application to obtain the key focus, querying the target device information of the target signal output device currently corresponding to the source application based on the source channel-device information record table, the source channel-device information record table records the device information of the signal output device corresponding to each source channel; When a signal of the target signal output device is detected, the current scene is switched to the target device scene based on the target device information; When it is detected that the source application loses the key focus, the current scene is switched to the default scene.
2. The multi-terminal scene recognition method based on key focus according to claim 1, It is characterized in that Before querying the target device information of the target signal output device corresponding to the source application based on the source channel-device information record table, the method further includes: Constructing a source channel-device information record table, and updating the source channel-device information record table based on a target user update signal, or; Acquire the device information connected to the HDMI connection channel based on the CEC protocol, and update the source channel-device information record table, or; Acquire the EDID of the access device, and update the source channel-device information record table based on the EDID of the access device, or; The information source channel-device information record table is updated based on the signal synchronization detection method.
3. The multi-terminal scene recognition method based on key focus according to claim 2, It is characterized in that The updating of the source channel-device information record table based on the signal synchronization detection method includes: When a signal input is detected in the first information source channel, a first timestamp and a first information are recorded, and the first timestamp and the first information are added to a first queue, wherein the first timestamp is the time when the signal input is detected in the first information source channel, and the first information is the channel information of the first information source channel; When a B message sent by a target remote controller is detected, a B message timestamp is recorded, and the B message and the B message timestamp are added to a second queue, wherein the B message includes a second timestamp and B device information, wherein the second timestamp is a timestamp of a B device outputting a signal to the target remote controller, and the B device information is device information of the B device; The information source channel-device information record table is updated based on the first queue and the second queue.
4. The multi-terminal scene recognition method based on key focus according to claim 3, It is characterized in that The updating of the information source channel-device information record table based on the first queue and the second queue includes: Determine whether the first queue and the second queue are empty, and if so, end the detection; If it is not empty, obtain the first difference value, where the first difference value is the absolute value of the difference between the target first timestamp and the target second timestamp, where the target first timestamp is the first timestamp corresponding to the head data of the first queue, and the target second timestamp is the second timestamp corresponding to the head data of the second queue; Determine whether the first difference is less than a first threshold value, and if the first difference is less than the first threshold value, add corresponding information of the target first information and the target B device information to the source channel-device information record table, wherein the target first information is the first information corresponding to the head data of the first queue, and the target B device information is the B device information corresponding to the head data of the second queue; Pop up the head data of the first queue and the second queue; The step of determining whether the first queue and the second queue are empty is repeated until the first queue and the second queue are empty.
5. The multi-terminal scene recognition method based on key focus according to claim 4, It is characterized in that After determining whether the first difference is less than a first threshold, the method further includes: If the first difference is not less than the first threshold, determine whether the second difference is less than the second threshold, the second difference is the absolute value of the difference between the target first timestamp and the target B information timestamp, and the target B information timestamp is the B information timestamp corresponding to the head data of the second queue; If the second difference is less than the second threshold, adding corresponding information of the target first information and the target B device information to the source channel-device information record table; Pop up the head data of the first queue and the second queue; The step of determining whether the first queue and the second queue are empty is repeated until the first queue and the second queue are empty.
6. The multi-terminal scene recognition method based on key focus according to claim 5, It is characterized in that After determining whether the second difference is less than the second threshold, the method further includes: If the second difference is not less than the second threshold, popping up the head information of the first queue or the second queue based on the first difference and the second difference; The step of determining whether the first queue and the second queue are empty is repeated until the first queue and the second queue are empty.
7. The multi-terminal scene recognition method based on key focus according to claim 6, It is characterized in that The popping out information of the first queue or the second queue based on the first difference and the second difference includes: Comparing the first difference with the second difference, and when the first difference is smaller than the second difference, determining the size of the target first timestamp and the target second timestamp; If the first timestamp is less than the second timestamp, popping out the head data of the first queue; If the first timestamp is greater than the second timestamp, the header data of the second queue is popped out.
8. The multi-terminal scene recognition method based on key focus according to claim 6, It is characterized in that The popping out the information of the first queue or the second queue based on the first difference and the second difference further includes: Compare the first difference with the second difference, and when the first difference is greater than the second difference, determine the size of the target first timestamp and the target B information timestamp; If the first timestamp is less than the timestamp of the target B information, popping out the head data of the first queue; If the first timestamp is greater than the target B information timestamp, the header data of the second queue is popped out.
9. A multi-terminal scene recognition device based on key focus, It is characterized in that The device comprises: A query module is used to detect in real time whether a source application obtains a key focus. When the source application is monitored to obtain a key focus, the target device information of the target signal output device currently corresponding to the source application is queried based on the source channel-device information record table. The source channel-device information record table records the device information of the signal output device corresponding to each source channel; A first switching module, configured to switch the current scene to the target device scene based on the target device information when a signal of the target signal output device is detected; The second switching module is used to switch the current scene to the default scene when it is monitored that the source application loses the key focus.
10. A terminal, It is characterized in that The terminal includes: a memory, a processor, and a multi-terminal scene recognition program based on key focus stored in the memory and executable on the processor. When the multi-terminal scene recognition program based on key focus is executed by the processor, the steps of the multi-terminal scene recognition method based on key focus as described in any one of claims 1 to 8 are implemented.
