Page control methods and smart TVs
By obtaining the identification information of applications running in the foreground of the smart TV, differentiated homepage jumps are achieved, which solves the resource contention and conflict problems caused by the fixed jump of the Home button when multiple launchers coexist, and improves device stability and user experience.
Patent Information
- Application Number
- CN202611293346.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2026-07-31
- Filing Date
- 2026-08-24
- Publication Date
- 2026-11-10
AI Technical Summary
In scenarios where multiple launchers coexist, the fixed jump mechanism of the Home button on a smart TV can lead to resource contention and program execution conflicts, reducing device stability.
By obtaining the identification information of the applications running in the foreground, the current application and its related relationships can be identified to achieve differentiated homepage navigation, ensuring the accuracy and consistency of the Home button operation.
It improves the adaptability of smart TV page switching scenarios and user operation experience, reduces cross-business error jumps, and improves device operation stability.
Smart Images

Figure CN123075211A_ABST
Abstract
Description
[0001] This application claims priority to Chinese Patent Application No. 202611166723.8, filed with the State Intellectual Property Office of China on July 31, 2026, entitled "A Method for Dynamic Homepage of Television Terminal Based on Foreground Application Context and Smart TV Terminal", the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of smart TVs, and more particularly to a page control method and a smart TV. Background Technology
[0003] Smart TVs are typically equipped with a remote control that has a home button. When the home button is pressed, the system will default to the home page of the preset launcher desktop with the home attribute.
[0004] When multiple launchers are installed on a smart TV, the system still uses a fixed redirection strategy for the Home button: regardless of what application is currently running in the foreground, the system will redirect to the preset launcher homepage when the Home button is triggered. This fixed redirection mechanism is difficult to adapt to scenarios where multiple launchers coexist, and it is easy to cause resource contention between different launchers, which in turn leads to program execution conflicts and reduces the stability of device operation. Summary of the Invention
[0005] This application provides a page control method and a smart TV that can resolve resource conflicts caused by multiple applications vying for the Home attribute, and perform differentiated homepage jumps based on the foreground application, thereby improving the adaptability and stability of page switching scenarios on the smart TV.
[0006] Firstly, a page control method is provided, applied to a smart TV, wherein the smart TV has a first application and a second application installed, and the second application has a Home attribute. The method includes: responding to a target event, obtaining identification information representing the application running in the foreground; wherein the target event is used to instruct the invocation of the Home page; when the application corresponding to the identification information is the first application, or an application associated with the first application, loading and displaying the homepage of the first application; and when the application corresponding to the identification information is an application associated with the second application, loading and displaying the homepage of the second application.
[0007] This implementation is applied to smart TVs with a first application and a second application installed, where the second application has a Home attribute. In response to a target event that invokes the Home page, the method obtains identification information representing the foreground application to identify it. If the foreground application is the first application or an application associated with it, the homepage of the first application is loaded and displayed. If the foreground application is an application associated with the second application, the homepage of the second application is loaded and displayed. This achieves differentiated homepage navigation based on the foreground application, improving the adaptability of the terminal's homepage switching scenarios and the continuity of user operations.
[0008] Meanwhile, this page control method can maintain the continuity of business context. When a user performs a target event such as pressing the Home button under any business category, they can be redirected to the homepage of the business that matches the current usage scenario, reducing erroneous redirects across businesses and making the operation experience more natural and smooth.
[0009] In one possible implementation, the identification information includes at least one of an application package name, an application signing certificate, and an application identification code. The method for determining that the application corresponding to the identification information is a first application, or an application associated with the first application, includes: determining that the application package name corresponds to the first application, or an application associated with the first application, when the application package name belongs to a preset first service set; or determining that the application package name corresponds to the first application, or an application associated with the first application, when the prefix of the application package name belongs to a preset first service set; or determining that the application identification code corresponds to the first application, or an application associated with the first application, when the application identification code belongs to a preset identification set; or determining that the application identification code corresponds to the first application, or an application associated with the first application, when the application identification code is a first value; or determining that the application signing certificate corresponds to the first application, or an application associated with the first application, when the application signing certificate belongs to a preset signature set.
[0010] A method for determining that an application corresponding to an identification information is an application associated with a second application includes: determining that the application corresponding to the application package name is an application associated with a second application when the application package name does not belong to a preset first service set and the application corresponding to the application package name is not a second application; or, determining that the application corresponding to the application package name is an application associated with a second application when the prefix of the application package name does not belong to a preset first service set and the application corresponding to the application package name is not a second application; or, determining that the application corresponding to the application package name is an application associated with a second application when the application package name belongs to a preset second service set; or, determining that the application corresponding to the application identification code is an application associated with a second application when the application identification code does not belong to a preset identification set and the application corresponding to the application package name is not a second application; or, determining that the application corresponding to the application identification code is an application associated with a second application when the application identification code is a second value; or, determining that the application corresponding to the application signing certificate is an application associated with a second application when the application signing certificate does not belong to a preset signature set and the application corresponding to the application signing certificate is not a second application.
[0011] In this implementation, the smart TV determines the corresponding target application by obtaining the identity information of the application running in the foreground. It can accurately identify the application identifier currently running in the foreground, providing a reliable application identifier basis for subsequent business logic. This ensures that subsequent actions can be accurately triggered and executed for the currently running application, reducing erroneous operations on other applications, improving the accuracy and reliability of page control business processing, and realizing differentiated management and business response based on the identity of the application running in the foreground.
[0012] In one possible implementation, the smart TV includes a preset first storage area for storing identification information of a single application; the first service of the second application is a persistent service; before obtaining the identification information representing the foreground running application in response to a target event, the method further includes: when either the first application or the second application starts and enters the foreground running state, writing the identification information representing the currently running application into the first storage area. Furthermore, in response to the target event, the first service obtains the identification information from the first storage area; the first service sends a first instruction to the first application to load and display its homepage; and the first service launches the second application and displays its homepage.
[0013] In this implementation, the page control method is implemented by the first service provided by the second application. This method is applied to a smart TV with the first application and the second application with the Home attribute installed. Relying on the persistent nature of the first service, this method can stably respond to the target event that wakes up the Home page. It is not constrained by the life cycle of the foreground application. It completes the differentiated homepage loading and display based on the foreground application and its relationship. The overall processing is transparent to the user, ensuring the reliable execution of the Home page jump logic.
[0014] In one possible implementation, the smart TV further includes a homepage proxy application, which is a persistent application; the smart TV includes a preset second storage area for storing identification information of individual applications; before obtaining the identification information representing the foreground application in response to a target event, the method further includes: if a switch of the foreground application is detected, then after the switch is completed, the homepage proxy application writes the identification information to the second storage area, the identification information representing the foreground application after the switch is completed; and in response to the target event, the homepage proxy application obtains the identification information representing the foreground application from the second storage area; the homepage proxy application sends a second instruction to a first application to cause the first application to load and display its homepage; and the homepage proxy application sends a third instruction to a second application to cause the second application to load and display its homepage.
[0015] In this implementation, the page control method is implemented by the homepage proxy application. This method is applied to smart TVs with a first application and a second application with the Home attribute installed. This method relies on the persistent nature of the homepage proxy application to stably respond to the target event that wakes up the Home page. It is not constrained by the life cycle of the foreground running application. It completes the differentiated homepage loading and display based on the foreground running application and its relationship. The overall processing is transparent to the user and ensures the reliable execution of the Home page jump logic.
[0016] Secondly, a page control method is provided for smart TVs. The smart TV has a first application and a second application installed, and the second application has a Home attribute. The application framework layer of the smart TV includes an event strategy module, a foreground sensing module, and a routing execution module.
[0017] The method includes: an event strategy module responding to a target event by calling a foreground sensing module to obtain identification information representing a foreground running application; wherein the target event is used to instruct the invocation of the Home page; when the application corresponding to the identification information is a first application, or an application associated with the first application, the routing execution module loads the first application to display the home page of the first application; when the application corresponding to the identification information is an application associated with a second application, the routing execution module loads the second application to display the home page of the second application.
[0018] In this implementation, the page control method is implemented by the application framework layer. This method is applied to smart TVs with a first application installed and a second application with the Home attribute. This method relies on the modules of the application framework layer to stably respond to the target event that wakes up the Home page. It is not constrained by the life cycle of the foreground application. It completes the differentiated homepage loading and display based on the foreground application and its relationship. The overall processing is transparent to the user and ensures the reliable execution of the Home page jump logic.
[0019] In one possible implementation, the application framework layer of the smart TV also includes a service attribution module; the method further includes: the front-end sensing module sending identification information to the service attribution module; the service attribution module determining, based on the identification information, that the application corresponding to the identification information is the first application, or an application associated with the first application; wherein, the identification information includes at least one of the application package name, application signing certificate, and application identification code.
[0020] The method for the business attribution module to determine that the application corresponding to the identification information is the first application, or an application associated with the first application, includes: determining that the application corresponding to the application package name is the first application, or an application associated with the first application, when the application package name belongs to a preset first business set; or determining that the application corresponding to the application package name is the first application, or an application associated with the first application, when the prefix of the application package name belongs to a preset first business set; or determining that the application corresponding to the application identification code is the first application, or an application associated with the first application, when the application identification code belongs to a preset identification set; or determining that the application corresponding to the application identification code is the first application, or an application associated with the first application, when the application identification code is a first value; or determining that the application corresponding to the application signing certificate is the first application, or an application associated with the first application, when the application signing certificate belongs to a preset signature set.
[0021] The method for the business attribution module to determine that the application corresponding to the identification information is an application associated with the second application includes: determining that the application corresponding to the application package name is an application associated with the second application when the application package name does not belong to a preset first business set and the application corresponding to the application package name is not the second application; or, determining that the application corresponding to the application package name is an application associated with the second application when the prefix of the application package name does not belong to a preset first business set and the application corresponding to the application package name is not the second application; or, determining that the application corresponding to the application package name is an application associated with the second application when the application package name belongs to a preset second business set; or, determining that the application corresponding to the application identification code is an application associated with the second application when the application identification code does not belong to a preset identification set and the application corresponding to the application package name is not the second application; or, determining that the application corresponding to the application identification code is an application associated with the second application when the application identification code is a second value; or, determining that the application corresponding to the application signing certificate is an application associated with the second application when the application signing certificate does not belong to a preset signature set and the application corresponding to the application signing certificate is not the second application.
[0022] In this implementation, the smart TV obtains the identity information of the foreground running application through the business attribution module to determine the corresponding target application. It can accurately identify the application identifier currently running in the foreground, providing a reliable application identifier basis for subsequent business logic. This ensures that subsequent actions can be accurately triggered and executed for the currently running foreground application, reducing erroneous operations on other applications, improving the accuracy and reliability of page control business processing, and realizing differentiated management and business response based on the identity of the foreground running application.
[0023] Thirdly, a smart TV is provided, including a memory, a controller, and a computer program stored in the memory and executable on the controller, wherein the controller implements the method of the first or second aspect when executing the computer program.
[0024] Fourthly, a page control device is provided, including a module for performing either the first or second method. This device can be a chip within a smart TV.
[0025] Fifthly, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, implements any one of the page control methods of the first or second aspect.
[0026] Sixthly, a computer program product is provided, comprising: a computer program that, when executed by a processor, implements any one of the page control methods of the first or second aspect.
[0027] It is understood that the beneficial effects of the third to sixth aspects mentioned above can be found in the relevant descriptions in the first or second aspects mentioned above, and will not be repeated here. Attached Figure Description
[0028] Figure 1 The diagram illustrates an operational scenario between a smart TV and a control device according to some embodiments of this application. Figure 2 A configuration block diagram of a smart TV in some embodiments of this application is shown; Figure 3A The present application shows system block diagrams of a smart TV in some embodiments; Figure 3B This application shows system block diagrams of a smart TV in some of its embodiments; Figure 4 This application shows system block diagrams of a smart TV in some of its embodiments; Figure 5 The flowcharts of some embodiments of the page control method provided in this application are shown; Figure 6 The following diagram illustrates the timing interaction of a page control method provided in some embodiments of this application; Figure 7 The following is a timing interaction diagram illustrating a page control method provided in some embodiments of this application; Figure 8 The following diagram illustrates the timing interaction of a page control method provided in some embodiments of this application. Detailed Implementation
[0029] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.
[0030] Before providing a detailed explanation of the page control method and smart TV provided in the embodiments of this application, the application scenarios and related technologies involved in the embodiments of this application will be described first.
[0031] Smart TVs are generally equipped with remote controls featuring a Home button. The Home button is used to return to the Launcher homepage, which has a Home attribute, with a single click. This can be done by returning to the homepage from a subpage within the Launcher, or by exiting the current foreground application or playback page and jumping to the Launcher homepage.
[0032] It should be understood that Launcher refers to the desktop application of a smart TV system. It is loaded and runs by default after the smart TV is turned on, serving as the entry point for the system's top-level user interface (UI); it is used to display the TV's main desktop, application icon list, and system navigation bar.
[0033] Smart TVs can install multiple apps, but the system only designates one app with the Home attribute at a time. The app with the Home attribute becomes the system home screen. The home screen is the device's basic interactive interface: it is displayed by default when the device is powered on; when the user presses the Home button, the system jumps to and displays the same home screen.
[0034] In related technologies, smart TVs typically build their desktop interaction system based on the Android TV architecture. The Launcher, as the core interaction entry point of the system, is used for functions such as boot initialization, homepage display, application scheduling, system navigation, and resource loading, and is the core carrier for users to operate the device. Traditional smart TVs adopt a single Launcher exclusive design, with the system bound to a single desktop. The Home button is fixed to a fixed routing logic at the system level, and when the button is pressed, it forcibly jumps to the default system Launcher.
[0035] As the smart TV ecosystem continues to diversify, the demand for channel customization, business value-added services, and scenario-based customization is constantly increasing. Terminals are beginning to be equipped with multiple launchers with different functions and scenarios, including native system launchers, third-party channel customized launchers, and industry scenario launchers (such as cable TV, education, audio-visual, and commercial screen casting). Multi-launcher coexistence solutions can meet the personalized desktop needs of different business categories and different user groups.
[0036] When a smart TV has multiple launchers, the system still uses a fixed redirection strategy for the Home button: regardless of what application is currently running in the foreground, the system will redirect to the default launcher homepage when the Home button is triggered. This fixed redirection mechanism cannot adapt to scenarios where multiple launchers coexist, and is prone to causing resource contention between launchers, which can lead to program conflicts, abnormal page redirection, and other problems, reducing the overall stability of the device.
[0037] To address this, this application provides a page control method applied to a smart TV with a first application and a second application installed, wherein the second application has a Home attribute. In response to a target event that invokes the Home page, the method obtains identification information representing the foreground application to identify it. If the foreground application is the first application or an application associated with it, the homepage of the first application is loaded and displayed. If the foreground application is an application associated with the second application, the homepage of the second application is loaded and displayed. This achieves differentiated homepage navigation based on the foreground application, improving the adaptability of the terminal's homepage switching scenarios and the continuity of user operations.
[0038] Figure 1This is a schematic diagram illustrating the operational scenario between the smart TV and the control device according to the embodiment. Figure 1 As shown, the user can operate the smart TV 200 through the smart device 300 or the control device 100.
[0039] The control device 100 can be a remote control. Communication between the remote control and the smart TV includes infrared or Bluetooth communication, as well as other short-range communication methods, to control the smart TV 200 wirelessly or via wired connection. Users can control the smart TV 200 by inputting user commands through buttons on the remote control (such as the Home button), voice input, or control panel input.
[0040] In some embodiments, the remote control also includes an application switching button for switching between different applications, such as switching between two Launcher applications.
[0041] In some embodiments, the control device 100 may also use a smart device 300 (such as a mobile terminal, tablet computer, computer, laptop computer, etc.) to control the smart TV 200. For example, an application running on the smart device can be used to control the smart TV 200.
[0042] In some embodiments, the smart TV 200 may receive control commands issued by the user via touch, gesture, voice, or other means.
[0043] In some embodiments, the smart TV 200 also communicates with the server 400. The smart TV 200 may be allowed to communicate via a local area network (LAN), a wireless local area network (WLAN), and other networks.
[0044] Figure 2 A configuration block diagram of a smart TV in some embodiments of this application is shown. For example... Figure 2 As shown, the smart TV 200 includes at least one of the following: a tuner 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.
[0045] The controller may include a processor, a video processor, an audio processor, a graphics processor, RAM, ROM, and a first interface to an nth interface for input / output.
[0046] The display 260 includes a display screen assembly for presenting images, a driving assembly for driving image display, a component for receiving image signals from the controller output, and a user control UI interface for displaying video content, image content, menu control interface, and user control UI interface.
[0047] The communicator 220 is a component used to communicate with external devices or servers according to various communication protocol types. For example, the communicator may include at least one of the following: a Wi-Fi module, a Bluetooth module, a wired Ethernet module, other network communication protocol chips or near-field communication protocol chips, and an infrared receiver. The smart TV 200 can establish the transmission and reception of control signals and data signals with the control device 100 or the server 400 through the communicator 220.
[0048] The user interface can be used to receive control signals from the control device 100 (such as an infrared remote control).
[0049] Detector 230 is used to collect signals from the external environment or to interact with the external environment. For example, detector 230 includes an image acquisition device, such as a camera, which can be used to collect external environmental scenes, user attributes, or user interaction gestures; or, detector 230 includes a sound acquisition device, such as a microphone, for receiving external sounds.
[0050] The external device interface 240 may include, but is not limited to, one or more of the following: High Definition Multimedia Interface (HDMI), analog or high-definition component input interface (component), composite video input interface (CVBS), USB input interface (USB), RGB port, etc. It may also be a composite input / output interface formed by multiple interfaces mentioned above.
[0051] The tuner / demodulator 210 receives broadcast television signals via wired or wireless means, and demodulates audio and video signals, as well as Electronic Program Guide (EPG) data signals, from multiple wireless or wired broadcast television signals.
[0052] The controller 250 controls the operation of the smart TV and responds to user operations through various software control programs (such as the first application and the second application) stored in the memory. The controller 250 controls the overall operation of the smart TV 200.
[0053] 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), random access memory (RAM), read-only memory (ROM), a first to an nth interface for input / output, a communication bus, etc.
[0054] Figure 3A A system block diagram of a smart TV in some embodiments of this application is shown. For example... Figure 3A As shown, the Android-based software architecture of smart TVs is divided into four layers from top to bottom: the Applications layer (referred to as the "Application Layer"), the Application Framework layer (referred to as the "Framework Layer"), the Android runtime and system library layer (referred to as the "System Runtime Layer"), and the kernel layer.
[0055] The application layer includes a first application and a second application, wherein the second application has a Home attribute.
[0056] The first application may or may not have a Home attribute.
[0057] For example, the first application is a cable TV application, whose homepage can be called the Digital Video Broadcasting (DVB) homepage. In some embodiments, the cable TV application can be configured to have a Home attribute, and the smart TV has dual Launcher applications.
[0058] The second application can also be called a Launcher application or a Home application. For example, the system desktop application on a smart TV. It should be understood that the system desktop application can include internet TV applications and internet TV home page applications.
[0059] It should be understood that Over-The-Top (OTT) services refer to a business model that provides services directly to terminals via the public internet; in large-screen scenarios, this often refers to internet television services. The homepage of the system desktop application can be called the OTT homepage, used to present recommended content.
[0060] In some embodiments, the second application may include a first service. This first service is a persistent service embedded within the second application, running continuously in the background and continuing to operate when the smart TV is turned on. During TV startup, the first service identifies the application currently running in the foreground using identification information, performs routing and scheduling capabilities, determines the homepage to be displayed based on the application, and automatically executes corresponding operations, such as page navigation.
[0061] The identification information is used to characterize the application currently running in the foreground on the smart TV (i.e., the foreground running application). This application is located at the top of the window, is visible on the screen, holds the input focus, and can be directly operated by the user.
[0062] The following describes the specific methods that can be used for identification information: identification information can be the application package name of the application running in the foreground, the application identifier code of the application running in the foreground, or the application signing certificate of the application running in the foreground.
[0063] Application package name: This is a platform-wide identifier used by smart TVs running operating systems such as Android. Each application has a unique application package name.
[0064] Application Identifier Code: This refers to a unique number defined by the platform and assigned by the television system or service platform. It can be in the form of numbers or characters. For example, the application identifier code for the second application is 11, and the application identifier code for the first application is 21; or, the application identifier code for the second application is 11, the application identifier code for the second application is Y, and the application identifier code for the first application is N.
[0065] Application signing certificate: This refers to the digital certificate used by developers to sign application installation packages, which contains information such as public key and certificate digest.
[0066] The application layer may also include Windows programs that come with the operating system, system settings programs, or clock programs; it may also include applications developed by third-party developers. In practice, the application packages in the application layer are not limited to the examples above.
[0067] In some embodiments, Figure 3B System block diagrams of a smart TV in some other embodiments of this application are shown. For example... Figure 3B As shown, the application layer may also include a homepage proxy application. The homepage proxy application is a persistent application that runs continuously in the background and continues to run when the smart TV is turned on. During the TV startup phase, the homepage proxy application identifies the foreground application through identification information, completes routing decisions and forwarding based on the application's identity, determines the homepage to be displayed based on the foreground application, and executes the redirection logic.
[0068] In some embodiments, the homepage proxy application includes a foreground monitoring service and a scene determination engine. The foreground monitoring service detects whether the foreground application has switched, and stores the identification information of the foreground application after a switch. The scene determination engine identifies the identity information of the foreground application based on the identification information.
[0069] Furthermore, the homepage proxy application may also include a second application homepage component and a first application homepage component. The second application homepage component is an Activity component that implements the display of the second application homepage, and the first application homepage component is an Activity component that implements the display of the first application homepage.
[0070] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications. It includes predefined functions. The application framework layer acts as a central processing unit, determining the actions taken by applications within the application layer. Applications can access system resources and obtain system services during execution through the API interface.
[0071] For example, the application framework layer includes managers, content providers, etc., wherein the managers include at least one of the following modules: Activity Manager, which interacts with all activities running in the system; Location Manager, which provides access to system location services for system services or applications; Package Manager, which retrieves various information related to application packages currently installed on the device; Notification Manager, which controls the display and clearing of notification messages; and Window Manager, which manages icons, windows, toolbars, wallpapers, and desktop widgets on the user interface.
[0072] The system runtime library 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++ libraries contained in the system runtime library layer to implement the functions that the framework layer needs to achieve.
[0073] The kernel layer is the layer between hardware and software. The kernel layer contains at least one of the following drivers: audio driver, display driver, Bluetooth driver, camera driver, Wi-Fi driver, USB driver, HDMI driver, sensor driver, and power driver.
[0074] Figure 4 System block diagrams of a smart TV in some other embodiments of this application are shown. For example... Figure 4 As shown, the application framework layer may include an event strategy module 410, a foreground sensing module 420, and a route execution module 440.
[0075] The event strategy module 410 is used to respond to the target event and call the foreground sensing module 420.
[0076] For example, the event policy module 410 runs in the system server process and is used to intercept target events (such as key events generated when the Home button is pressed) and execute the corresponding calling policy (such as calling the foreground sensing module 420) to complete the dynamic routing logic of the Home button.
[0077] The foreground sensing module 420 is used to acquire identification information that represents the foreground running application.
[0078] For example, the foreground sensing module 420 can obtain information related to the activity components of the application running in the foreground through the ActivityManagerService (AMS) and ActivityTaskManagerService (ATMS), including the component class name, application package name, task information, and foreground running status.
[0079] In some embodiments, after the front-end sensing module 420 obtains the application package name based on AMS and ATMS, it can further call the Package Manager Service (PMS) to query the application package information and extract the corresponding signature certificate data.
[0080] In some other embodiments, the foreground sensing module 420 may also obtain the application identifier code of the foreground running application, for example, by combining the application package name to query the corresponding preset application identifier code.
[0081] The routing execution module 440 is used to load the first application and display its homepage when the application corresponding to the identification information is the first application or an application associated with the first application; it is also used to load the second application and display its homepage when the application corresponding to the identification information is an application associated with the second application.
[0082] For example, the loading of a second application or a first application can be achieved by constructing a launch intent and initiating an activity launch request to schedule the application launch.
[0083] In some embodiments, the application framework layer may further include a service attribution module 430. The service attribution module 430, upon receiving the identification information sent by the front-end sensing module 420, determines, based on the identification information, whether the application corresponding to the identification information is a second application, an application associated with the second application, a first application, or an application associated with the first application.
[0084] For example, the service attribution module 430 can match and verify the received identification information with preset service sets (such as the first service set and the second service set), identification sets, feature characters (such as the first value and the second value), signature sets, and other rules to determine the application corresponding to the identification information.
[0085] To facilitate a further understanding of the technical solutions in some embodiments of this application, the technical solutions of the page control method and how these solutions solve the aforementioned technical problems are described in detail below with reference to specific embodiments and accompanying drawings. The methods in the following embodiments can all be implemented in a smart TV with the aforementioned hardware structure and software architecture. The hardware structure diagram of a smart TV can be shown as follows: Figure 2 As shown, the software architecture diagram of a smart TV can be as follows: Figure 3A , Figure 3B or Figure 4 As shown. The various embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them.
[0086] Figure 5 A flowchart of a page control method provided in some embodiments of this application is shown. For example... Figure 5 As shown, the method includes the following steps S510~S530: S510 and Smart TV respond to the target event and obtain identification information representing the application running in the foreground; the target event is used to instruct the Home page to be invoked.
[0087] A target event refers to an interactive control event that is captured by the system after a smart TV receives a control command from a remote control, other smart devices, or the local interactive interface, and is used to indicate the activation of the Home page.
[0088] For example, the target event can be an event generated after the smart TV receives the command corresponding to the Home button on the remote control, an event generated after the smart TV receives the command to click the home shortcut icon, or an event generated after the smart TV receives a voice command to bring up the Home page.
[0089] In some embodiments, a smart TV can set a minimum routing interval (e.g., 500 milliseconds) for continuous pressing of the Home button. Repeated Home button events within this interval will be directly intercepted, and the routing startup logic will not be executed, thus reducing the repeated loading of applications.
[0090] The identification information is used to characterize an application running in the foreground and may include at least one of the following: the application package name, the application identification code, and the application signing certificate. For example, the identification information may be the application package name com.XXX.XXX, or the identification information may be the code Y, or the identification information may be the code 11; or the identification information may be the application signing certificate 1F:DB:……:6F:26.
[0091] The interface of an application running in the foreground on a smart TV can display any page related to that application, such as the homepage, internal subpages (e.g., secondary pages, detail pages, list pages), and playback pages. For example, a smart TV can display the homepage and internal subpages of a second application (e.g., a system desktop application); or the homepage and internal subpages of a first application (e.g., a cable TV application); or the homepage and internal subpages of a third application (e.g., application A and application B).
[0092] S520. When the application corresponding to the identification information is the first application, or an application that is associated with the first application, the smart TV loads and displays the homepage of the first application.
[0093] For example, if the application corresponding to the identification information is a cable TV application, or an application associated with a cable TV application, the smart TV loads the cable TV application and displays its homepage. For instance, the smart TV can launch the cable TV application's homepage Activity component via an explicit Intent.
[0094] Among them, the applications that are related to the first application can be other applications besides the cable TV applications released by cable TV services (such as broadcasting, mobile, telecommunications, and Unicom).
[0095] S530. When the application corresponding to the identification information is an application that is related to the second application, the smart TV loads and displays the homepage of the second application.
[0096] For example, if the application corresponding to the identification information is an application associated with the system desktop application, the smart TV loads the system desktop application and displays its homepage. For instance, the smart TV can launch the homepage Activity component of the system desktop application via an explicit Intent.
[0097] Among them, the application that is related to the second application can be a third-party application installed on the smart TV, such as other video playback software.
[0098] It should be noted that when the application corresponding to the identification information is the second application, the smart TV will also load and display the homepage of the second application.
[0099] The page control method provided in this application is applied to a smart TV with a first application and a second application installed, wherein the second application has a Home attribute. In response to a target event that invokes the Home page, the method obtains identification information representing the foreground application to identify it. If the foreground application is the first application or an application associated with it, the homepage of the first application is loaded and displayed. If the foreground application is an application associated with the second application, the homepage of the second application is loaded and displayed. This achieves differentiated homepage navigation based on the foreground application, improving the adaptability of the terminal's homepage switching scenarios and the continuity of user operations.
[0100] Based on the page control scheme described above, the identification information can be the application package name, application identification code, or application signing certificate of the application running in the foreground. In some embodiments, before executing steps S520 and S530, the identity information of the application running in the foreground can be determined based on the identification information, such as the application being a first application, a second application, an application associated with the first application, or an application with a storage association with the second application. Next, exemplary supplementary explanations will be provided for the above three types of identification information.
[0101] Example 1-1 identifies the application package name of the application running in the foreground. Smart TVs can be pre-configured with a first service set, which can be a collection of applications corresponding to cable TV services, referred to as the DVB service application set. The DVB service application set includes application package names that can provide relevant applications for cable TV services (such as broadcasting, mobile, telecom, and Unicom).
[0102] It should be understood that when a smart TV starts up, it can read data from the first set of services and cache it in memory, supporting dynamic updates from broadcasters or content providers.
[0103] If the application package name belongs to a preset first service set, the smart TV can determine that the application corresponding to the application package name is the first application, or an application associated with the first application. If the application package name does not belong to the preset first service set, the smart TV can determine that the application corresponding to the application package name is the second application, or an application associated with the second application; wherein, if the application corresponding to the application package name is not the second application, it can be determined that the application corresponding to the application package name is an application associated with the second application.
[0104] For example, the DVB service application set pre-enters the application package name "A" for cable TV applications, the application package name "B" for mobile cable TV applications, the application package name "C" for telecom cable TV applications, and the application package name "D" for Unicom cable TV applications.
[0105] If the smart TV obtains an application package named "A", and this application package name exists in the DVB business application set, then the foreground application is determined to be the first application, or an application associated with the first application. If the smart TV obtains an application package named "R", and this application package name is not in the DVB business application set, and the foreground application itself is not the second application, then the foreground application is determined to be an application associated with the second application.
[0106] In some embodiments, a single cable television service can be configured with one or more applications. When a cable television service is configured with multiple applications, these applications are typically configured with the same application package name prefix. Based on this configuration: if the prefix of the application package name obtained by the smart TV belongs to a preset first service set, the application corresponding to the application package name is determined to be the first application, or an application associated with the first application. If the prefix of the application package name obtained by the smart TV does not belong to the preset first service set, the application corresponding to the application package name is determined to be the second application, or an application associated with the second application; wherein, if the application corresponding to the application package name is not the second application, the application corresponding to the application package name can be determined to be an application associated with the second application.
[0107] For example, suppose a cable TV service is configured with three applications, with application package names “com.tv.XX1”, “com.tv.XX2”, and “com.tv.XX3”, all sharing the prefix “com.tv”, and this prefix has been entered into the preset first service set.
[0108] When a smart TV detects that an application running in the foreground has the prefix "com.tv" in its package name, belonging to the first service set, it classifies the identified foreground application as either the first application or an application associated with the first application. Conversely, if a smart TV detects that an application running in the foreground has the prefix "com.cc", does not belong to the first service set, and is not itself a second application, then the smart TV classifies the foreground application as an application associated with the second application.
[0109] In some other embodiments, the smart TV may also pre-configure a second service set, which can be a collection of third-party applications. If an application package name belongs to the preset second service set, the smart TV can determine that the application corresponding to the application package name is an application associated with the second service set.
[0110] For example, the application package name of third-party application J is pre-entered into the second service set as "com.J", the application package name of third-party application K is "com.K", and the application package name of third-party application L is "com.L". When the smart TV recognizes an application package name of "com.K", which belongs to the second service set, but the application itself is not a second application, the smart TV determines that the foreground application is an application associated with the second application.
[0111] Example 1-2 shows the application identifier code for the foreground application. Smart TVs can be pre-configured with a set of identifiers, which can be a set of preset identifiers for applications corresponding to cable TV services, such as application identifier codes for applications that can provide cable TV services (such as broadcasting, mobile, telecom, and Unicom).
[0112] If the application identifier code belongs to a preset identifier set, the smart TV determines that the application corresponding to the application identifier code is the first application, or an application associated with the first application. If the application identifier code does not belong to the preset identifier set, the smart TV determines that the application corresponding to the application identifier code is the second application, or an application associated with the second application; wherein, if the application package name corresponds to the second application, the application corresponding to the application identifier code can be determined to be an application associated with the second application.
[0113] For example, the application identifier code "11" for cable TV applications, the application identifier code "12" for mobile cable TV applications, the application identifier code "13" for telecom cable TV applications, and the application identifier code "14" for Unicom cable TV applications are pre-entered into the identifier set.
[0114] If the application identifier code obtained by the smart TV is "12", and this application identifier code exists in the identifier set, then the application running in the foreground is determined to be the first application, or an application associated with the first application. If the application identifier code obtained by the smart TV is "23", and this application identifier code is not in the identifier set, and the application running in the foreground is not the second application, then the application running in the foreground is determined to be an application associated with the second application.
[0115] In some embodiments, the smart TV may pre-configure feature characters, which may include a first value and a second value. If the application identifier code obtained by the smart TV is the first value, the application corresponding to the application identifier code is determined to be a first application, or an application associated with the first application. If the application identifier code obtained by the smart TV is the second value, the application corresponding to the application identifier code is determined to be an application associated with the second application.
[0116] For example, if the first value is "Y" and the second value is "N", when the smart TV obtains an application identifier code of "Y", it determines that the foreground application is the first application, or an application associated with the first application. When the smart TV obtains an application identifier code of "N", it determines that the foreground application is an application associated with the second application.
[0117] Example 1-3 identifies the application signing certificate of the application running in the foreground. Smart TVs can be pre-configured with a signature set, which can be a collection of application signature certificates for applications corresponding to cable TV services, such as application signature certificates for applications that can provide cable TV services (e.g., broadcasting, mobile, telecom, and Unicom).
[0118] If the application signing certificate obtained by the smart TV belongs to a preset signature set, the application corresponding to the application signing certificate is determined to be the first application, or an application associated with the first application. If the application signing certificate obtained by the smart TV does not belong to the preset signature set, the application corresponding to the application signing certificate is determined to be the second application, or an application associated with the second application; wherein, if the application corresponding to the application signing certificate is not the second application, the application corresponding to the application signing certificate can be determined to be an application associated with the second application.
[0119] For example, the signature set contains the application signature certificate "1F:DB:..." for cable TV applications, "A2:D3:..." for mobile cable TV applications, "6F:26:..." for telecom cable TV applications, and "8D:6F:..." for Unicom cable TV applications.
[0120] If the application signing certificate obtained by the smart TV is "6F:26:...", and this application signing certificate exists in the signature set, then the foreground application is determined to be the first application, or an application related to the first application. If the application signing certificate obtained by the smart TV is "77:AA:...", and this application signing certificate is not in the signature set, and the foreground application itself is not the second application, then the foreground application is determined to be an application related to the second application.
[0121] In some embodiments, if identifying the identity information of the foreground application fails based on the identification information, the smart TV may load and display the homepage of the second application. Furthermore, before displaying the application's homepage via an Intent, the smart TV may add a confirmation of the Activity component for that homepage, verifying that it is installed and available. If the Activity component malfunctions, the system will revert to the default Launcher parsing logic.
[0122] The page control method provided in this application embodiment enables smart TVs to determine the corresponding target application by obtaining the identity information of the application running in the foreground. It can accurately identify the application identifier currently running in the foreground, providing a reliable application identifier basis for subsequent business logic, ensuring that subsequent actions can be accurately triggered and executed for the currently running application, reducing erroneous operations on other applications, improving the accuracy and reliability of page control business processing, and realizing differentiated management and business response based on the identity of the application running in the foreground.
[0123] Based on the page control scheme described above, in some embodiments, the smart TV can implement the page control logic through different themes, specifically in the following ways: (i) implemented by a first service provided by a second application, wherein the first service is a persistent service; (ii) implemented by a homepage proxy application configured by the smart TV, wherein the homepage proxy application is a persistent application; (iii) implemented by the event strategy module, foreground sensing module, service attribution module, and routing execution module built into the application framework layer of the smart TV. The page control method provided in this application embodiment will be specifically described below in conjunction with different application scenarios. For ease of explanation, the examples all use the second application as a system desktop application and the first application as a cable TV application as examples, and the system desktop application has a Home attribute, and the cable TV application can also have a Home attribute.
[0124] (a) The first service provided by the second application implements the page control scheme Figure 6 The diagram illustrates the timing interaction of page control methods provided in some embodiments of this application.
[0125] It should be understood that the software architecture diagram of this example smart TV is as follows: Figure 3A As shown.
[0126] like Figure 6 As shown, the method includes the following steps S610~S660: S610 When either the first application or the second application is started and enters the foreground running state, the smart TV writes the identification information representing the currently running application into the first storage area.
[0127] The first storage area refers to the preset storage area of the smart TV, which is only used to store the identification information of a single application. At any given time, the first storage area only stores the identification information of the application currently running in the foreground, so as to achieve shared storage of identification information. For example, the first storage area can be implemented by SharedPreferences or SystemProperties.
[0128] In some embodiments, the timestamp of the application starting and entering the foreground running state can also be written to the first storage area to improve the accuracy of the data.
[0129] For example, when the system desktop application starts and enters the foreground running state, the smart TV writes the identification information of the system desktop application into the first storage area; while when the cable TV application starts and enters the foreground running state, the smart TV replaces the original identification information in the first storage area with the identification information of the cable TV application.
[0130] In some embodiments, when the application currently running on the smart TV in the foreground is a third application, the identification information of the second application can be written to the first storage area. For example, when the application currently running on the smart TV in the foreground is a video playback application M (i.e., an application associated with the second application), the identification information of the system desktop application can be written to the first storage area.
[0131] S620, In response to the target event, the first service obtains the identification information from the first storage area.
[0132] The first service is a persistent service, which refers to an application service that remains running continuously in the background of the system and is not automatically cleaned up by the system.
[0133] For example, in response to an event corresponding to the pressing of the Home button on the remote control, the smart TV obtains identification information from the first storage area by the first service.
[0134] It should be understood that, through the above example, the identity information of the application running in the foreground can be determined based on the identification information, and then the following steps S630-S640 or steps S650-S660 can be executed based on the determined result.
[0135] S630. When the application corresponding to the identification information is the first application or an application that is associated with the first application, the first service sends a first instruction to the first application.
[0136] S640. After receiving the first instruction, the first application loads and displays its homepage.
[0137] For example, when the application corresponding to the identification information is cable TV application E, the first service sends a command to cable TV application E to load and display the homepage. At this time, the first service can still remain in a persistent state.
[0138] S650. When the application corresponding to the identification information is the second application, or an application that is associated with the second application, the first service starts the second application.
[0139] S660, the second application displays its homepage.
[0140] For example, when the application corresponding to the identification information is a system desktop application, the first service launches the system desktop application and displays the application's homepage. It should be understood that even if the first service is a resident service, the system desktop application may still not be running in the foreground.
[0141] When the application corresponding to the identification information is video playback application M, the first service launches the system desktop application and displays the application's homepage; at the same time, it is also necessary to exit the video playback application M.
[0142] The page control method provided in this application embodiment is implemented by a first service provided by a second application. The method is applied to a smart TV with the first application and a second application with the Home attribute installed. The method relies on the persistent nature of the first service to stably respond to the target event that wakes up the Home page. It is not constrained by the life cycle of the foreground running application. It completes the differentiated homepage loading and display based on the foreground running application and its association. The overall processing is transparent to the user and ensures the reliable execution of the Home page jump logic.
[0143] In some embodiments, if the smart TV displays an interface transmitted via HDMI or a screen mirroring interface, the page control method also needs to switch the signal source first. After the signal source is switched, the first service launches the second application and displays the homepage of the second application.
[0144] In some embodiments, the signal source list corresponding to the smart TV may include not only hardware access devices, but also a first application and a second application, thereby enabling fast switching between the first application and the second application.
[0145] (ii) Page control scheme implemented by homepage proxy application configured on smart TV Figure 7 The following diagram illustrates the timing interaction of a page control method provided in some embodiments of this application.
[0146] It should be understood that the software architecture diagram of this example smart TV is as follows: Figure 3B As shown.
[0147] like Figure 7 As shown, the method includes the following steps S710~S760: S710: If the homepage proxy application detects a switch in the foreground application, it will write the identification information to the second storage area after the switch is completed.
[0148] The second storage area refers to a preset storage area on the smart TV, used only to store the identification information of a single application. At any given time, the second storage area only holds the identification information of the currently running foreground application, thus achieving shared storage of identification information. For example, the second storage area can be implemented using SharedPreferences or SystemProperties. The identification information written to the second storage area represents the information of the foreground application after a switch is completed.
[0149] In some embodiments, the timestamp of when the foreground application is switched can also be written to a second storage area to improve data accuracy.
[0150] For example, if the homepage proxy application detects a switch in the foreground application, and it switches to the system desktop application, it writes the identification information of the system desktop application to the second storage area after the switch is complete; if it switches to the cable TV application, it writes the identification information of the cable TV application to the second storage area after the switch is complete.
[0151] It should be understood that when the foreground application of a smart TV is switched to a third application, the home page proxy application does not need to be processed, and the data in the second storage area remains unchanged.
[0152] S720, in response to a target event, the homepage agent application retrieves identification information from the second storage area.
[0153] This homepage proxy application is a persistent application, which refers to an application that remains running continuously in the system background and is not automatically cleaned up by the system.
[0154] Furthermore, this homepage proxy application is the default Home application for smart TVs. In other words, when the smart TV receives a target event such as a Home button press, the homepage proxy application responds to the target event, maintaining the system's fixed redirection routing strategy for the Home button.
[0155] For example, in response to an event corresponding to the pressing of the Home button on the remote control, the smart TV's home page agent application retrieves identification information from the second storage area. For instance, the home page agent application retrieves the identification information stored in the second storage area during the execution of a creation callback (onCreate) or a new intent callback (onNewIntent).
[0156] It should be understood that, through the above example, the identity information of the application running in the foreground can be determined based on the identification information, and then the following steps S730-S740 or steps S750-S760 can be executed based on the determined result.
[0157] S730. When the application corresponding to the identification information is the first application or an application that is associated with the first application, the homepage proxy application sends a second instruction to the first application.
[0158] S740: After receiving the second instruction, the first application loads and displays its homepage.
[0159] For example, when the application corresponding to the identification information is cable TV application E, the homepage proxy application sends a command to cable TV application E to make cable TV application E load and display the homepage. At this time, the homepage proxy application can still remain in a persistent state.
[0160] S750. When the application corresponding to the identification information is the second application, or an application that is associated with the second application, the homepage proxy application sends a third instruction to the second application.
[0161] After receiving the third instruction, the S760 and the second application load and display their homepage.
[0162] For example, when the application corresponding to the identification information is the system desktop application, the homepage proxy application sends a command to the system desktop application to make the system desktop application load and display the homepage. In this case, the homepage proxy application can still remain resident.
[0163] For example, when the application corresponding to the identification information is a video playback application M, the homepage proxy application sends a command to the system desktop application so that the system desktop application loads and displays the homepage; at the same time, it is also necessary to exit the video playback application M.
[0164] The page control method provided in this application embodiment is implemented by a homepage proxy application. This method is applied to a smart TV with a first application and a second application with the Home attribute installed. This method relies on the persistent nature of the homepage proxy application to stably respond to the target event that wakes up the Home page. It is not constrained by the life cycle of the foreground running application. It completes the differentiated homepage loading and display based on the foreground running application and its association relationship. The overall processing is transparent to the user and ensures the reliable execution of the Home page jump logic.
[0165] (III) The page control scheme is implemented by the event strategy module, foreground sensing module, service attribution module and routing execution module built into the application framework layer of the smart TV. Figure 8 The following diagram illustrates the timing interaction of a page control method provided in some embodiments of this application.
[0166] It should be understood that the software architecture diagram of this example smart TV is as follows: Figure 4 As shown.
[0167] like Figure 8 As shown, the method includes the following steps S810~S880: S810, the event strategy module responds to the target event and calls the foreground sensing module.
[0168] For example, when the Home button on the remote is pressed, the KEYCODE_HOME button event is dispatched to the event strategy module. The event strategy module detects that the button code is KEYCODE_HOME and triggers dynamic routing logic: it calls the foreground sensing module to obtain the Activity component representing the foreground application, and then obtains the application package name of the foreground application.
[0169] S820, the foreground sensing module acquires identification information representing the foreground running application.
[0170] The target event is used to instruct the invocation of the Home page. Identification information includes at least one of the following: application package name, application signing certificate, and application identifier code.
[0171] S830, the front-end sensing module sends the identification information to the service-assigned module.
[0172] S840. The business attribution module identifies the identity information of the application corresponding to the identification information based on the identification information, that is, the application is the first application, an application related to the first application, the second application, or an application related to the second application.
[0173] The specific process by which the business attribution module determines the application identity information corresponding to the identification information can be found in the detailed description of the example above, and will not be repeated here.
[0174] S850, the service attribution module sends the identification results to the routing execution module.
[0175] S860. When the application corresponding to the identification information is the first application, or an application that is associated with the first application, the routing execution module loads the first application.
[0176] For example, the routing execution module can launch the homepage Activity component of a cable TV application via an explicit Intent.
[0177] S870, the first application displays its homepage; S880. When the application corresponding to the identification information is the second application, or an application that is associated with the second application, the routing execution module loads the second application.
[0178] For example, the routing execution module can launch the home page Activity component of the system desktop application via an explicit Intent.
[0179] S890, the second application displays its homepage.
[0180] It should be understood that after the routing execution module completes the jump, the original KEYCODE_HOME event is intercepted to prevent the system from continuing to execute the default Home key processing link, and to prevent the system from jumping to the system desktop again, causing conflicts and back-and-forth page jumps.
[0181] The page control method provided in this application embodiment is implemented by an application framework layer. This method is applied to a smart TV with a first application installed and a second application having a Home attribute. The method relies on the modules of the application framework layer to stably respond to the target event that wakes up the Home page, is not constrained by the life cycle of the foreground application, and completes the differentiated homepage loading and display based on the foreground application and its relationship. The overall processing is transparent to the user, ensuring the reliable execution of the Home page jump logic, while maintaining the continuity of the business context. When the user performs a target event such as pressing the Home button under any business category, they can jump to the homepage of the business that matches the current usage scenario, reducing erroneous jumps across businesses and making the operation experience more natural and smooth.
[0182] In some embodiments, a smart TV can simultaneously support both cable TV and internet TV services. The operating system of this smart TV includes at least one first application belonging to a first service system and at least one second application belonging to a second service system. Each of the first and second applications declares a homepage category attribute (i.e., the Home attribute) in its application manifest file for responding to Home button events. The first service system corresponds to the cable TV service system, and the second service system corresponds to the internet TV service system (also known as the OTT service system). The first application includes a cable TV homepage application (also known as a cable TV application), which provides user interfaces such as channel navigation, program guides, and service entry points. The second application includes an internet TV homepage application (also known as an internet TV application, belonging to the system desktop application), which provides user interfaces such as content recommendations, on-demand entry points, and application entry points.
[0183] A smart TV consists of a display and a controller that communicates with the display. The display shows the user interface based on the image signals output by the controller, including various business homepage interfaces, application interfaces, and video content. The controller executes various services and application logic of the operating system and processes and responds to various input events. Logically, the controller can be divided into three main modules: a front-end application perception module (also known as a front-end sensing module), a business attribution determination module (also known as a business attribution module), and a routing execution module. These three modules work together to realize the dynamic homepage routing function.
[0184] The foreground sensing module is used to obtain the name of the application currently running in the foreground after receiving a target event (including key events). This module can be implemented as a set of code logic running in a system service process or an application process. In a solution implemented at the application framework layer (also known as the system framework layer), this module interacts with the activity management service, querying the activity information at the top of the current system component management stack through the interface provided by the activity management service. In a solution implemented at the application layer, this module can be an independent foreground monitoring service, or it can be information writing logic executed by each foreground application itself in its lifecycle callbacks.
[0185] The business attribution module works in conjunction with the front-end sensing module to compare the package name obtained by the front-end sensing module with the matching conditions in the business rule set (such as the first business set) based on a pre-configured business rule set, in order to identify whether the application belongs to the first business category or the second business category. This module is implemented as a configurable rule engine and dataset. The business rule set maintained within it is stored in the system partition as a configuration file, for example, in the product configuration directory under the system partition. The configuration file contains an array of multiple rule items, each rule item containing a matching type field and a corresponding value field. The matching type includes at least two or more of the following: exact package name matching, package name prefix matching, and application signature matching. At system startup, this configuration file is loaded and parsed, and each rule item is loaded into memory to form the business rule set. The parsed rule set is maintained in memory in a thread-safe list structure.
[0186] The routing execution module works in conjunction with the business attribution module to construct and launch the corresponding explicit Intent for the business homepage application based on the business category identified by the business attribution module, and mark the key events as consumed after launch. This module is implemented as a set of code logic running in the system service process or application process. In Solution 1, this module is located in the key policy handling method of the window management service in the application framework layer. In Solution 2, this module is located in the main activity lifecycle callback method of the unified proxy application.
[0187] The foreground sensing module, acting as the acquirer of context information, receives call signals from the key press policy processing logic or the unified proxy application's lifecycle. This module outputs the acquired foreground application package name to the business category module as input parameters for business category determination. In Solution 1, the foreground sensing module is synchronously invoked when a key press event is intercepted, querying and returning the currently active package name at the top of the stack in real time. In Solution 2, the foreground sensing module runs asynchronously until the Home key event is triggered, writing the new package name each time the foreground application switches to the system's shared storage. When the Home key event is triggered and the unified proxy application starts, the unified proxy application reads the most recently written package name from the shared storage.
[0188] The business attribution module receives the application package name to be judged from the front-end sensing module and performs a matching operation against each rule item in the internally maintained business rule set. This module outputs the judgment result of the matching operation to the routing execution module in the form of a Boolean signal or a scene identifier. In Scheme 1, this judgment process occurs in the main thread of the window management service, synchronously with the handling of key events. In Scheme 2, this judgment process occurs in the main activity creation or new Intent callback of the unified proxy application, synchronously with the execution of the application lifecycle.
[0189] The routing execution module receives the judgment result output by the business attribution module and constructs an explicit Intent to launch the corresponding business homepage application based on the judgment result, initiating an activity launch request through the activity management service. After launch, the module marks the original Home button event as consumed, preventing it from being further distributed downstream in the system. In Scheme 1, this marking is implemented by returning a specific flag indicating that the event has been processed in the button policy handling method of the window management service. In Scheme 2, this marking is implemented by the unified proxy application calling its own close method after launching the target homepage application, so that the intercepted button event naturally terminates its transmission as the proxy activity is destroyed.
[0190] The collaborative working mechanism of the above three modules realizes the core inventive concept of this application. In traditional operating systems, the processing of the Home button follows a static routing logic of pressing the button, implicit matching, and then routing to a fixed homepage. When multiple applications declare the Home attribute in the system, the operating system's packet management service performs implicit Intent matching based on priority weights. If multiple matches exist, a selection dialog box pops up; if there is only one default option, the system always routes to that fixed target. This mechanism cannot dynamically adjust according to the user's current business context.
[0191] This application alters the static routing mechanism described above by introducing an independent dynamic routing control layer into the key event distribution chain. Specifically, after a key event arrives at the window management service from the input dispatcher, at the interception point before entering the implicit Intent parsing logic, the dynamic routing logic takes over the processing of the event. Instead of simply performing implicit matching, the dynamic routing logic first obtains the package name of the activity at the top of the stack through the foreground sensing module, then matches that package name with a preset rule set through the business attribution module to determine the current user's business category. Then, based on the determination result, an explicit Intent is constructed, directly specifying the component name of the target homepage application and starting it. Finally, the key event is consumed, preventing it from triggering subsequent implicit parsing logic.
[0192] This mechanism fundamentally solves two major technical challenges in Home button routing within dual-service system terminals. Regarding the multi-launcher conflict issue, because the dynamic routing system intercepts the Home button event before implicit parsing and uses an explicit Intent to directly specify the target component, it completely bypasses the operating system's implicit matching and priority selection process. Therefore, even if multiple applications declare the Home attribute in the system, a selection dialog box will not be triggered. Regarding the business context breakage issue, since the routing decision is based on the application package name in the foreground at the moment the button is pressed, which directly reflects the business category the user is currently operating on, the Home button's routing target always remains consistent with the user's current business context.
[0193] Furthermore, the business rule set is managed using a dynamically configurable configuration file, completely decoupling the business attribution determination logic from the specific application code implementation. When a business application is added, replaced, or upgraded, no modification to the system or application code is required; only the configuration file needs to be updated for adaptation. The coexistence of multiple matching types allows the system to handle commonly known applications with precise package name matching, cover application families from the same developer or product line with prefix matching, and protect business categories with high security requirements with signature matching, avoiding misjudgments due to application package name spoofing.
[0194] This application provides two implementation schemes to solve the above-mentioned technical problems from the two dimensions of application framework layer and application layer, respectively.
[0195] Solution 1 implements dynamic routing based on the system key press policy layer. This solution intercepts the Home button event at the Android system framework's key press policy layer and dynamically determines the routing target based on the identity information of the currently foreground application.
[0196] In Option 1, the key policy module (also known as the event policy module) is located within the window management service of the system_server process. This module continuously detects and controls the distribution of global key events. In the key event interception method before distribution in the window management service, detection logic for the Home key event has been added. When the keycode value of the incoming event is detected as KEYCODE_HOME, dynamic routing logic is triggered, entering the context awareness and judgment process, instead of immediately executing the original event distribution logic.
[0197] At this point, the foreground sensing module synchronously calls the interface provided by the activity management service to query the activity information at the top of the current system component management stack. The activity management service returns the root task information or the activity record at the top of the stack that currently has focus. The dynamic routing logic extracts the application package name of the application to which the activity belongs from the returned activity record. This acquisition method is completed within the system service process, utilizing the framework layer's ability to directly call system services, and obtaining the most accurate foreground application information without cross-process communication.
[0198] After obtaining the application package name, the service attribution module matches this package name against a pre-configured set of cable TV service applications. This set is stored in the form of a configuration file, such as in the product configuration directory under the system partition, and the file format can be JSON or XML. At system startup, the controller loads this configuration file, parses each rule item, and loads it into memory to form a business rule set. The configuration file contains an array of multiple rule items, each rule item containing a match type field and a corresponding value field. The match type includes at least two or more of the following: exact package name match, package name prefix match, and application signature match.
[0199] The comparison process executes different matching algorithms based on the matching type of each rule item. For exact package name matching, it checks whether the package name to be judged is exactly equal to the value of the rule item. For package name prefix matching, it checks whether the package name to be judged starts with the prefix value of the rule item. For application signature matching, it obtains the signature information of the application corresponding to the package name to be judged from the package management service and compares this signature information with the signature fingerprint information configured in the rule item to determine whether they match. Since the signature fingerprint is a unique identifier generated by a hash algorithm based on the application's digital certificate, even if two applications have the same package name, they can be distinguished as long as the signature fingerprints are different. Therefore, signature matching can effectively prevent misjudgments caused by application package name spoofing.
[0200] When the package name to be determined matches any rule in the rule set, the front-end application is determined to belong to the first business category, i.e., the cable TV service category. When the package name to be determined fails to match any rule in the rule set, the front-end application is determined to belong to the second business category, i.e., the internet TV service category. When a valid package name cannot be obtained due to an abnormal system state, the application is determined to belong to the second business category by default.
[0201] Based on the above determination results, the routing execution module constructs an explicit Intent and starts the corresponding business homepage application. If the current foreground application package name is in the cable TV service application set, it determines that the user is currently in the cable TV service category, constructs an explicit Intent pointing to the cable TV homepage activity, directly specifies the cable TV application package name and activity class name by setting component information, and then calls the activity management service's start activity interface to initiate the startup. If the current foreground application package name is not in the cable TV service application set, it determines that the user is currently in the Internet TV service category, constructs an explicit Intent pointing to the Internet TV homepage activity, and starts it.
[0202] The differences between explicit and implicit Intents, and their working principles, need to be explained. In the Android operating system, Intent is the core mechanism for passing messages and requesting operations between components. Implicit Intents do not specify a specific target component; instead, they use information such as actions and categories to allow the system's package management service to search for matching components across all installed applications. When multiple matching components exist, the system will display a selection dialog or select components based on priority. Explicit Intents, by explicitly specifying the target application package name and activity class name, can directly locate a unique target component, completely bypassing the system's matching and selection process.
[0203] The core principle behind this solution's use of explicit Intents lies precisely in this. Since the dynamic routing system has already determined the target business homepage to be launched through context awareness and business judgment, directly using explicit Intents can guarantee that the launch target is absolutely certain, avoiding the system's intervention to perform implicit matching again, and fundamentally eliminating the selection pop-ups that may be triggered due to the coexistence of multiple Launchers.
[0204] After the route redirection is completed, the original KEYCODE_HOME key event is marked as consumed. This is achieved by returning a specific flag indicating that the event has been processed in the key policy handling method of the window management service. When the system detects this flag, it terminates the further dispatch of the event and stops executing the subsequent default Home key processing chain.
[0205] In Solution 1, the logic of each module is integrated into the window management service and activity management service of the application framework layer, making full use of the framework layer's direct control over the key event distribution chain. Since the window management service is responsible for the interception and distribution strategy of global key events, and the activity management service is responsible for managing the lifecycle and task stack information of each application activity, implementing dynamic routing logic at this level can ensure the earliest interception time, the highest execution efficiency, and is not affected by application layer permission restrictions.
[0206] In addition to the aforementioned context-aware method based on the foreground application package name, in some embodiments, the foreground sensing module can also perceive the service context by analyzing the signal input source information of the current TV terminal. When the Home button event is triggered, the controller checks the status information of the currently active TV input source or hardware abstraction layer of the smart TV. According to the preset mapping rules between signal sources and services, if the currently active TV input source is a built-in tuner or a specific external interface marked as accessing cable TV services, the current scene is identified as belonging to the first service category. If the currently active TV input source is an internet application player or a non-specific external device interface, the current scene is identified as belonging to the second service category.
[0207] This approach shifts the business context awareness dimension from the application software layer to the hardware and system information source layer, completely decoupling routing decisions from the specific package names and implementation details of upper-layer applications. In a television operating system, the TV input management service manages various input sources, including the built-in DVB-T2 / C tuner, HDMI port, and USB port. By calling the interfaces provided by the TV input management service, information on currently active input sources can be queried.
[0208] The principle behind this method is that, for cable TV services, the signal source for users watching live programs must be either a built-in tuner or a specific HDMI port connected to the operator's set-top box. Therefore, by detecting whether the currently active input source belongs to one of these types, it can be determined whether the user is currently in a cable TV service category. This method is particularly suitable for scenarios where cable TV services primarily use live streaming and are carried through a signal source channel rather than an independent application, avoiding the complexity of managing and maintaining application whitelists. Simultaneously, this method can also effectively identify cable TV services accessed through a specific interface via an external set-top box, without relying on application information reported by external devices, thus enhancing the adaptability of the dynamic routing solution to diverse product types.
[0209] In some embodiments, before launching the corresponding business homepage application via an explicit Intent, the routing execution module also performs a validity pre-check of the target activity components. This pre-check mechanism is implemented by calling the query interface of the package management service to obtain component information of the target activity. If an exception indicating that a component is not found is caught during the query process, it means that the target activity does not exist or has been disabled. At this time, the routing execution module constructs an implicit Intent with the action set to ACTION_MAIN and the category set to CATEGORY_HOME. This implicit Intent triggers the operating system's default homepage parsing logic as a fallback process in case of exceptions.
[0210] The necessity of this pre-check and fallback mechanism lies in the fact that the operation of the dynamic routing system relies on the target business homepage application being correctly installed and available. However, in the actual product lifecycle, situations may arise such as the target application being accidentally uninstalled by the user or the system, disabled by application management policies, or its configuration file being incorrectly modified, causing it to point to a non-existent component. Without appropriate fault tolerance, the system will throw an "Activity Not Found" exception when attempting to start a non-existent component, causing the Home button function to completely fail and severely impacting the user experience.
[0211] Through the aforementioned pre-detection and fallback mechanisms, when the target component is detected to be unavailable, the system automatically downgrades to an implicit Intent triggering the operating system's default homepage resolution logic. The operating system then selects an available homepage application from all installed homepage applications according to priority. This mechanism ensures that the most basic homepage return function remains available under all circumstances, meeting users' basic security expectations for the Home button.
[0212] In some embodiments, the routing execution module is also configured with debouncing logic. This debouncing mechanism is implemented by maintaining a routing timestamp variable, which records the system clock value at the time of the most recent successful launch of the business homepage application. This clock value uses the system's running time clock, which is unaffected by system time adjustments, to ensure the accuracy of the interval calculation. When the routing execution module receives a key event again, it calculates the time difference between the current system clock value and the system clock value recorded in the routing timestamp variable. If this time difference is less than a preset minimum routing time interval threshold, the newly received key event is directly marked as consumed and discarded, and the subsequent business category identification and homepage application launch process is no longer executed.
[0213] The minimum time interval threshold for this routing can be set to 500 milliseconds. This threshold is chosen based on the maximum rapid pressing time of a normal person's finger, which is approximately 200 milliseconds. It retains a margin of 100 milliseconds on top of this, which can effectively filter out repeated events caused by key bounce and accidental touches, without causing significant response delays for users' conscious rapid operations.
[0214] The working principle and necessity of this anti-shake mechanism lies in the fact that physical buttons may experience mechanical vibrations during pressing and releasing, leading to multiple repeated button events within a short period. Furthermore, users may accidentally press the Home button rapidly and repeatedly within a short time when using a remote control. If left unchecked, the system will repeatedly execute the complete context awareness, rule matching, and page launch process multiple times in a very short period. This results in the target home application's activities being created repeatedly, causing issues such as interface flickering, task stack chaos, and wasted processor resources, and in severe cases, may even lead to application crashes.
[0215] Through the aforementioned anti-bounce mechanism, the system can identify and filter out repetitive events within a reasonable operation interval. After the first Home button event triggers the complete dynamic routing process and successfully launches the target homepage, subsequent Home button events within a threshold time will be directly discarded, thereby ensuring the stability of the system state and the smoothness of the user's operating experience.
[0216] In some embodiments, the controller is also configured to dynamically update the business rule set. This dynamic update capability enables the business application rule set to be updated and take effect immediately without interrupting system services, without restarting the terminal, and without the user's awareness.
[0217] Specifically, the controller receives the updated configuration file from the cloud server via over-the-air download. Upon receiving the updated configuration file, the controller first writes the file content to a temporary file in the same directory. After successful writing, the temporary file is renamed using the file system to overwrite the original configuration file. This method of writing to a temporary file first and then renaming it ensures atomic writing, avoiding the risk of corruption of the original configuration file due to unexpected power outages or system crashes during the update process. If an error occurs during the writing process, the system can still use the original valid configuration because the original file has not yet been overwritten, preventing dynamic routing functionality from malfunctioning due to configuration file corruption.
[0218] After the write operation is complete, the controller sends a system broadcast. The business module that registered the receiver for this broadcast receives it, rereads the official configuration file, and uses the parsing library to parse it into a new list of rule items. Then, through an atomic replacement operation, the entire list of rule items loaded in memory is replaced with the new list, thus completing the hot update of the business rule set.
[0219] The atomic replacement operation is implemented by first creating a new list object containing the new rule items, and then updating all references in memory that point to the old list to references that point to the new list. Since reference replacement is an atomic operation, all new decision requests initiated after the replacement will access the new rule set, while decision requests already in progress before the replacement will still use the old rule set to complete their decisions. This ensures that during the update process, ongoing business decision operations always read a complete and consistent version of the rule set, preventing the reading of a mixture of new and old data.
[0220] When operators need to add new cable TV service applications, replace existing applications, or adjust the scope of service coverage, they only need to update the configuration file in the cloud and send it to the terminal. The terminal can automatically complete the rule set update during operation without manual operation by the user, or restarting the TV or reinstalling the application.
[0221] Option 2 implements dynamic routing at the application layer based on a unified Launcher proxy. This option does not modify the system framework, but instead registers a unified Launcher proxy application as the system's only default homepage. Upon startup, this proxy dynamically determines which business homepage to display based on the context of the previous foreground application.
[0222] In Option 2, a unified proxy application (such as a homepage proxy application or a second application) is installed in the smart TV's operating system. This unified proxy application is set as the operating system's sole default homepage application. The unified proxy application declares the Home attribute and default category attribute in its application manifest file.
[0223] It should be understood that, in the case of the second application acting as a unified proxy application, it is actually implemented by the first service of the second application.
[0224] In this scheme, the foreground application awareness function runs continuously before the Home button event is triggered. A separate foreground application monitoring service runs continuously in the background, detecting foreground application changes in the system by registering a system broadcast receiver. Whenever a foreground application switch is detected, the monitoring service writes the package name of the newly switched application and the switch timestamp to the system shared storage. This system shared storage can be either the system attribute storage area or the shared preference storage area.
[0225] As an alternative, each application can proactively call the system property setting method within its lifecycle method when it gains focus on the interface and enters the foreground, writing its own package name to the system shared storage. This method requires no additional background service process and is more lightweight, but it requires adding corresponding code logic to each application.
[0226] When a user presses the Home button on the remote control, the microcontroller inside the remote detects the button press and obtains the corresponding keycode value. The remote encodes and modulates this keycode value and transmits it to the smart TV via wireless communication methods such as infrared or Bluetooth. The receiving module inside the smart TV receives the wireless signal, demodulates and decodes it, and extracts the keycode value. The kernel-level input driver generates a corresponding button event based on this keycode value; the keycode value of this button event is KEYCODE_HOME.
[0227] Unlike Solution 1, Solution 2 does not achieve dynamic routing by intercepting events at the framework layer. Instead, it leverages the operating system's startup mechanism for the default homepage application. Since the unified proxy application has been set as the operating system's only default homepage application, when the Home button event triggers the system's homepage resolution logic, the activity management service searches for the corresponding application based on the default homepage setting, finds the unified proxy application, and starts its default activity.
[0228] Once the unified agent application is started, its creation method or new Intent method reads the most recently written foreground application package name from the system shared storage. This read operation only requires access to local system properties or shared preference storage, without needing to call system services across processes, and can therefore be completed in a very short time after the agent application starts.
[0229] After obtaining the package name, the scenario determination logic within the unified proxy application matches the package name against the pre-configured cable TV service application rule set. This rule set is managed in the same way as in Solution 1, and also supports multiple matching dimensions and dynamic updates. If the match is successful, it determines that the user was previously in the cable TV service category, initiates the cable TV homepage activity via an explicit Intent, and then calls its own close method to exit. If the match fails, it determines that the user was previously in the internet TV service category, initiates the internet TV homepage activity via an explicit Intent, and then calls its own close method to exit. If the unified proxy application itself is an internet TV application, upon recognizing the service category as internet TV, it does not perform a forwarding operation but instead executes its own service homepage initialization logic, entering the normal homepage display process.
[0230] The entire routing decision and forwarding process of the unified proxy application described above is completed at the application layer and is completely transparent to the user. Since the unified proxy application itself does not provide any substantial business functions, or can be reused as a business homepage, the user will not be aware of the existence of the proxy application.
[0231] The core principle of Solution 2 is to eliminate the selection problem caused by multiple applications declaring the home page category coexisting by establishing a proxy application at the application layer that occupies the unique default launcher position in the system. Since the operating system's implicit matching logic will only route the Home button event to the unique default launcher, and this default launcher has been set to the proxy application, the Home button event will always only trigger the launch of the proxy application and will not pop up a selection dialog box.
[0232] Meanwhile, the proxy application internally simulates the context awareness and dynamic judgment functions performed at the framework layer in Solution 1 by reading pre-cached foreground application information and performing rule matching. Since the collection of context information is decoupled from the triggering of the Home button event in terms of timing, an asynchronous caching write-then-read mode is adopted to avoid the latency, insufficient permissions, or information loss problems that may be caused by querying system services during the short life cycle of the proxy application after it is started. This ensures the real-time performance and reliability of context acquisition when implementing dynamic routing at the application layer.
[0233] Option 2 can be implemented without obtaining system-level permissions or modifying the operating system firmware. It can achieve all the functions of dynamic homepage routing through application-level installation and settings, with low implementation risk and high compatibility, and can be quickly deployed on various brands and versions of Android smart TVs.
[0234] The following describes in detail some of the page control methods provided in the embodiments of this application, with specific process steps.
[0235] In one embodiment, a method for controlling a television terminal page based on a foreground application context is provided. The method includes the following steps.
[0236] The smart TV intercepts the Home button event triggered by the Home button on the remote control, which is yet to be distributed by the operating system.
[0237] Specifically, when a user presses the Home button on the remote control, the microcontroller inside the remote detects the button press and obtains the corresponding keycode value. The remote encodes and modulates this keycode value and transmits it to the smart TV via wireless communication methods such as infrared or Bluetooth. The receiving module inside the smart TV receives the wireless signal, demodulates and decodes it, and extracts the keycode value. The kernel-level input driver generates a corresponding button event based on this keycode value; the keycode value of this button event is KEYCODE_HOME. This button event enters the input dispatcher through the input reader, and the input dispatcher distributes the button event to the window management service for processing.
[0238] In Solution 1, the interception occurs in the pre-dispatch method of the window management service's key event dispatch. When this method detects that the keycode value of the incoming event is KEYCODE_HOME, it triggers dynamic routing logic, entering the subsequent context awareness and judgment process, instead of immediately executing the original event dispatch logic. In Solution 2, the interception is achieved by setting the unified proxy application as the operating system's only default homepage application. Since the operating system only recognizes this one default homepage application, when the Home key event triggers the system's homepage resolution logic, the unified proxy application is started by the system, thus taking over the event at the application layer.
[0239] Then, the foreground application that was interacting with the user when the Home button event was triggered is identified. After intercepting the Home button event, the dynamic routing logic initiates the foreground application awareness process to obtain the package name of the application that was running in the foreground at the moment the Home button event was triggered.
[0240] In the implementation of Scheme 1, the dynamic routing logic in the window management service synchronously calls the interface provided by the activity management service to query the activity information at the top of the current system component management stack. The activity management service returns the root task information that currently has focus or the activity record at the top of the stack, and the dynamic routing logic extracts the application package name of the application to which the activity belongs from the returned activity record.
[0241] In the second implementation, the foreground application awareness process runs continuously before the Home button event is triggered. A separate foreground application monitoring service runs continuously in the background, detecting foreground application changes in the system by registering a system broadcast receiver. Whenever a foreground application switch is detected, the monitoring service writes the package name of the newly switched application and the switch timestamp to system properties or shared preferences storage. Alternatively, each application itself can actively call the system properties setting method in its lifecycle method when it gains focus on the interface and enters the foreground running state, writing its own package name to system properties. When the unified agent application is started by the operating system, its creation method or new Intent method directly reads the most recently written package name from system properties or shared preferences storage.
[0242] Then, based on the identity information of the front-end application, a match is performed within the pre-configured business affiliation rules to determine the business category to which the front-end application belongs. The specific matching process, as described above, involves comparing the packet name to be determined with each rule item in the business rule set one by one. Different matching algorithms are executed based on the matching type of each rule item. When the packet name to be determined successfully matches any rule in the rule set, the front-end application is determined to belong to the first business category, i.e., the cable TV business category. When the packet name to be determined fails to match any rule in the rule set, the front-end application is determined to belong to the second business category, i.e., the internet TV business category. When a valid packet name cannot be obtained due to system anomalies, the application is defaulted to the second business category.
[0243] Then, based on the determined business category, the target homepage application corresponding to that business category is obtained. Based on the determined business category identifier, the component information of the corresponding target homepage application is searched in a preset mapping table. This mapping table records the correspondence between business category identifiers and the active component names of the target homepage application. When the business category is the first business category, the obtained target homepage application is an active component of a cable TV application. When the business category is the second business category, the obtained target homepage application is an active component of an internet TV application.
[0244] Next, an explicit launch instruction is constructed. After obtaining the component information of the target home application, an explicit Intent object is constructed. This construction process is implemented through the component setting method of the Intent class, directly specifying the target home application package name and activity class name. This explicit Intent can also set corresponding flags, such as setting the FLAG_ACTIVITY_NEW_TASK flag to launch the target activity in a new task, and setting the FLAG_ACTIVITY_CLEAR_TOP flag to clear other activities above the target activity.
[0245] Before constructing an explicit Intent, a validity pre-check of the target activity components can be performed. The component information of the target activity is queried through the activity information retrieval interface of the package management service. If a component not found exception is caught during the query, it indicates that the target activity does not exist or is unavailable. In this case, an implicit Intent is constructed instead. The action of this implicit Intent is set to ACTION_MAIN, and the category is set to CATEGORY_HOME, serving as a backup startup command to trigger the operating system's default homepage resolution logic.
[0246] Finally, the explicit startup instruction is executed, preventing the Home button event from triggering the operating system's default homepage resolution logic. After constructing the explicit Intent, startup is initiated through the Startup Activity interface of the Activity Management service. Based on the target component information specified in the explicit Intent, the operating system creates and switches the corresponding business homepage application's activity instance to the foreground. After startup execution is complete, the original Home button event is marked as consumed, preventing it from being passed to the operating system's implicit homepage resolution logic.
[0247] In Solution 1, the method to mark a key event as consumed involves returning a specific flag value indicating that the event has been processed in the interception method of the key event dispatch in the window management service, preventing the event from being passed on to subsequent event processing chains. In Solution 2, the method to mark a key event as consumed involves the unified proxy application calling its own close method after starting the target homepage application, ending the lifecycle of the proxy activity. The intercepted key events naturally cease transmission with the destruction of the proxy activity and will not trigger the system's homepage parsing logic.
[0248] The above method can also include debouncing logic. Each time an explicit start command is successfully executed, the current system running time clock value is recorded as a routing timestamp. When a key event is intercepted again, the time difference between the current system clock value and the recorded routing timestamp is calculated. If this time difference is less than a preset minimum routing time interval threshold, such as 500 milliseconds, the key event is directly marked as consumed and discarded, and subsequent context awareness and routing processing are not executed. If the time difference is greater than or equal to the threshold, subsequent context awareness and routing processing continue.
[0249] The following two specific scenario examples illustrate the working process of the technical solution of this application in actual use.
[0250] Scenario 1: A user is watching a live broadcast using a cable TV application. The application package name running in the foreground belongs to the cable TV service application set. The user presses the Home button on the remote control. The controller receives this button event before the operating system distributes it to the default home application. The controller obtains the current foreground application package name, matches it against the business rule set, and determines that the application belongs to the cable TV service category. The controller constructs an explicit Intent, directly specifying the target active component of the cable TV application by setting component information and calling the start activity interface to launch it. The cable TV application's user interface is switched to the foreground display; the user sees the channel navigation and program guide interface, consistent with the business context of watching live broadcasts. The controller marks the button event as consumed; the system will not display a dialog box to select the default desktop, nor will it launch other home applications.
[0251] Scenario 2: A user is watching internet video using an OTT video-on-demand application. At this time, the application package name running in the foreground does not belong to the cable TV service application set. The user presses the Home button on the remote control. The controller retrieves the current foreground application package name, matches it against the business rule set, and determines that the application belongs to the internet TV service category. The controller constructs an explicit Intent, directly specifying the target active component of the internet TV application by setting component information and calling the launch activity interface to start it. The user interface of the internet TV application is switched to the foreground display; the user sees the content recommendation and on-demand entry interface, consistent with the business context of watching internet video. The controller marks this button event as consumed, and the system will not display a dialog box for selecting the default desktop.
[0252] As can be seen from the two scenarios above, pressing the Home button under any business category will return the user to the homepage of the business they are currently using, avoiding erroneous navigation across business domains. The routing decision-making process is completed internally by the system, requiring no additional learning or manual configuration from the user; the Home button operation is completely consistent with that of a regular TV.
[0253] In the above embodiments, by refactoring the Home button response process from the original button press to implicit matching to launch to a new process of button press to context awareness to service determination to explicit direct access to blocking the original link, the smart TV can recognize the service context in which the user presses the Home button and make differentiated decisions based on this, such as returning to the current service homepage or returning to another service homepage. Because the Home button event is intercepted before the operating system distributes it to the default homepage application, and the current foreground application is used as the context, the system dynamically determines whether it belongs to the first or second service system according to a preset set of service rules. Then, it constructs explicit launch instructions pointing to the first or second homepage respectively, and terminates the continued distribution of the original Home button event after execution. Therefore, when the user is in the cable TV service category, the system can automatically route the Home button to the cable TV homepage instead of the internet TV homepage; when the user is in the internet TV service category, the system can automatically route the Home button to the internet TV homepage instead of the cable TV homepage.
[0254] This mechanism fundamentally solves the problems of incorrect redirection and selection pop-ups between services caused by the coexistence of multiple homepage applications in existing technologies. By constructing and executing explicit startup instructions, the technical solution avoids the inherent conflict mechanism of multiple applications competing for the same Home attribute within the operating system, ensuring the uniqueness and determinism of routing results, making the user experience natural and consistent, and the entire process completely transparent to the user.
[0255] In this specification, the term "business rule set" refers to a collection of matching conditions used to determine the business category to which an application belongs. This set is persistently stored as a configuration file and loaded into memory during system runtime for fast querying and matching. Each matching condition in this set specifies the correspondence between the application package name and the business category, and supported matching methods include, but are not limited to, exact package name matching, package name prefix matching, and application signature matching. This set supports dynamic updates via cloud configuration distribution and local hot reloading, without requiring a system restart.
[0256] In this specification, the term "explicit Intent" refers to an Intent object that directly specifies the target application component. Compared to implicit Intents, which do not specify a specific target component and are implicitly matched by the system based on information such as the Intent's action and category, explicit Intents precisely control the launch target by explicitly specifying the target application package name and activity class name, thus avoiding the system's matching and selection process for multiple eligible components.
[0257] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0258] Based on the same concept, as an implementation of the above-mentioned page control method, this application provides a page control device. This device embodiment corresponds to the aforementioned method embodiment. For ease of reading, this device embodiment will not repeat the details of the aforementioned method embodiment one by one, but it should be clear that the device in this embodiment can correspondingly implement all the contents of the aforementioned method embodiment.
[0259] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the page control method provided by the smart TV in the above embodiments.
[0260] This application also provides a computer program product, which includes a computer program that, when run by a smart TV, causes the smart TV to execute the page control methods provided in the above embodiments.
[0261] In the embodiments provided in this application, the division of each framework or module is merely a logical functional division. In actual implementation, there may be other division methods. For example, multiple frameworks or modules may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the functional modules in the various embodiments of this application may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.
[0262] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and modules described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0263] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A page control method, characterized in that, Applied to a smart TV, the smart TV having a first application and a second application installed, the second application having a Home attribute; the method includes: In response to a target event, identification information representing the application running in the foreground is obtained; wherein the target event is used to instruct the invocation of the Home page; When the application corresponding to the identification information is the first application, or an application that is associated with the first application, the homepage of the first application is loaded and displayed; When the application corresponding to the identification information is an application that is associated with the second application, the homepage of the second application is loaded and displayed.
2. The page control method according to claim 1, characterized in that, The identification information includes at least one of the following: application package name, application signing certificate, and application identification code; After obtaining the identification information representing the foreground running application, the method further includes: determining that the application corresponding to the identification information is the first application, or an application that is associated with the first application; The method for determining that the application corresponding to the identification information is the first application, or an application associated with the first application, includes: If the application package name belongs to a preset first service set, the application corresponding to the application package name is determined to be the first application, or an application associated with the first application; or... If the prefix of the application package name belongs to a preset first service set, then the application corresponding to the application package name is determined to be the first application, or an application associated with the first application; or, If the application identifier code belongs to a preset identifier set, the application corresponding to the application identifier code is determined to be the first application, or an application that is associated with the first application; or... If the application identifier code is a first value, then the application corresponding to the application identifier code is determined to be the first application, or an application associated with the first application; or... If the application signing certificate belongs to a preset signature set, the application corresponding to the application signing certificate is determined to be the first application, or an application that is associated with the first application.
3. The page control method according to claim 1, characterized in that, The identification information includes at least one of the following: application package name, application signing certificate, and application identification code; After obtaining the identification information representing the foreground running application, the method further includes: determining that the application corresponding to the identification information is an application that is associated with the second application; The method for determining that the application corresponding to the identification information is an application associated with the second application includes: If the application package name does not belong to a preset first service set, and the application corresponding to the application package name is not the second application, then the application corresponding to the application package name is determined to be an application associated with the second application; or, If the prefix of the application package name does not belong to a preset first service set, and the application corresponding to the application package name is not the second application, then the application corresponding to the application package name is determined to be an application associated with the second application; or, If the application package name belongs to a preset second service set, the application corresponding to the application package name is determined to be an application associated with the second application; or, If the application identifier code does not belong to a preset identifier set, and the application package name corresponds to an application that is not the second application, then the application corresponding to the application identifier code is determined to be an application associated with the second application; or, If the application identifier code is the second value, then the application corresponding to the application identifier code is determined to be an application associated with the second application; or, If the application signing certificate does not belong to the preset signature set, and the application corresponding to the application signing certificate is not the second application, then the application corresponding to the application signing certificate is determined to be an application that is associated with the second application.
4. The page control method according to any one of claims 1 to 3, characterized in that, The smart TV includes a preset first storage area, which is used to store the identification information of a single application; The first service of the second application is a persistent service; Before obtaining the identification information representing the foreground running application in response to the target event, the method further includes: When either the first application or the second application is started and enters the foreground running state, the identification information representing the currently running application is written into the first storage area. The step of obtaining the identification information representing the foreground running application in response to the target event includes: In response to the target event, the first service retrieves the identification information from the first storage area; Loading and displaying the homepage of the first application includes: The first service sends a first instruction to the first application, so that the first application loads and displays the homepage of the first application; Loading and displaying the homepage of the second application includes: The first service launches the second application and displays the homepage of the second application.
5. The page control method according to any one of claims 1 to 3, characterized in that, The smart TV also includes a homepage proxy application, which is a persistent application. The smart TV includes a preset second storage area, which is used to store the identification information of a single application; Before obtaining the identification information representing the foreground running application in response to the target event, the method further includes: If a switch of the foreground application is detected, the homepage proxy application will write the identification information into the second storage area after the switch is completed. The identification information is information representing the foreground application after the switch is completed. The step of responding to a target event and obtaining identification information representing the foreground application includes: In response to the target event, the homepage proxy application obtains identification information representing the foreground running application from the second storage area; Loading and displaying the homepage of the first application includes: The homepage proxy application sends a second instruction to the first application, causing the first application to load and display its homepage; Loading and displaying the homepage of the second application includes: The homepage proxy application sends a third instruction to the second application, causing the second application to load and display its homepage.
6. The page control method according to any one of claims 1 to 3, characterized in that, The method further includes: When the application corresponding to the identification information is the second application, the homepage of the second application is loaded and displayed.
7. A page control method, characterized in that, This application is used in smart TVs, where a first application and a second application are installed, and the second application has a Home attribute. The application framework layer of the smart TV includes an event strategy module, a foreground sensing module, and a routing execution module; the method includes: In response to a target event, the event strategy module calls the foreground sensing module to obtain identification information representing the foreground running application; wherein, the target event is used to indicate the invocation of the Home page; When the application corresponding to the identification information is the first application, or an application that is associated with the first application, the routing execution module loads the first application to display the homepage of the first application; When the application corresponding to the identification information is an application associated with the second application, the routing execution module loads the second application to display the homepage of the second application.
8. The page control method according to claim 7, characterized in that, The application framework layer of the smart TV also includes a service ownership module; the method further includes: The front-end sensing module sends the identification information to the service attribution module; The business attribution module determines, based on the identification information, that the application corresponding to the identification information is the first application, or an application that is associated with the first application; wherein, the identification information includes at least one of the application package name, application signing certificate, and application identification code; The method by which the service attribution module determines that the application corresponding to the identification information is the first application, or an application associated with the first application, includes: If the application package name belongs to a preset first service set, the application corresponding to the application package name is determined to be the first application, or an application associated with the first application; or... If the prefix of the application package name belongs to a preset first service set, then the application corresponding to the application package name is determined to be the first application, or an application associated with the first application; or, If the application identifier code belongs to a preset identifier set, the application corresponding to the application identifier code is determined to be the first application, or an application that is associated with the first application; or... If the application identifier code is a first value, then the application corresponding to the application identifier code is determined to be the first application, or an application associated with the first application; or... If the application signing certificate belongs to a preset signature set, the application corresponding to the application signing certificate is determined to be the first application, or an application that is associated with the first application.
9. The page control method according to claim 7, characterized in that, The application framework layer of the smart TV also includes a service ownership module; the method further includes: The front-end sensing module sends the identification information to the service attribution module; The business attribution module determines, based on the identification information, that the application corresponding to the identification information is an application associated with the second application; wherein, the identification information includes at least one of the application package name, application signing certificate, and application identification code; The method for the service attribution module to determine that the application corresponding to the identification information is an application associated with the second application includes: If the application package name does not belong to a preset first service set, and the application corresponding to the application package name is not the second application, then the application corresponding to the application package name is determined to be an application associated with the second application; or, If the prefix of the application package name does not belong to a preset first service set, and the application corresponding to the application package name is not the second application, then the application corresponding to the application package name is determined to be an application associated with the second application; or, If the application package name belongs to a preset second service set, the application corresponding to the application package name is determined to be an application associated with the second application; or, If the application identifier code does not belong to a preset identifier set, and the application package name corresponds to an application that is not the second application, then the application corresponding to the application identifier code is determined to be an application associated with the second application; or, If the application identifier code is the second value, then the application corresponding to the application identifier code is determined to be an application associated with the second application; or, If the application signing certificate does not belong to the preset signature set, and the application corresponding to the application signing certificate is not the second application, then the application corresponding to the application signing certificate is determined to be an application that is associated with the second application.
10. A smart TV, characterized in that, The method includes a memory, a controller, and a computer program stored in the memory and executable on the controller, wherein the controller, when executing the computer program, implements the method as claimed in any one of claims 1 to 9.
