Television UI updating system and method, terminal and storage medium
By embedding Flutter partial views into the TV's native UI layout and implementing dynamic package management, the problem of inflexible UI updates in existing technologies is solved, achieving efficient updates of partial views and smooth user interaction, thus improving the flexibility of UI updates and the interactive experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-17
- Publication Date
- 2026-04-03
AI Technical Summary
In existing technologies, UI updates based on native development systems require the installation of the complete application package, making it impossible to achieve partial UI updates. This results in inflexible UI updates and issues such as low efficiency of native UI development, high cost of adapting to multiple device versions, slow dynamic update speed, and focus confusion.
A hybrid view embedding module is used to embed Flutter partial views into the TV's native UI layout. The Flutter dynamic package management module is used to download, store, and manage the version of dynamic packages. Combined with the dynamic package loading and adaptation module, native interface version verification is performed to update the Flutter partial views.
It enables partial updates of Flutter views within the native TV UI layout, improving the flexibility of UI updates, resolving focus synchronization and resource management issues, and ensuring smooth user interaction and the stability of native functions.
Smart Images

Figure CN121785639A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of smart TV technology, and in particular to a TV UI update system, method, terminal and storage medium. Background Technology
[0002] With the advancement of science and technology and the increasing complexity of smart TV functions, users have higher and higher demands for smart TVs. For example, users hope to achieve flexible updates to the user interface (UI) while maintaining the stable operation of the TV's native functions.
[0003] In existing technologies, UI updates are typically performed using native development systems and native development solutions. The problem with these existing technologies is that, when updating the UI using native development solutions based on native systems, it is necessary to install the entire application package to update the entire application interface. This prevents partial UI updates and hinders the improvement of UI update flexibility.
[0004] Therefore, the relevant technologies still need to be improved and developed. Summary of the Invention
[0005] The main purpose of this application is to provide a TV UI update system, method, terminal, and storage medium, aiming to solve the technical problem in the related technology that when updating the UI of a native development solution based on a native development system, it is necessary to install a complete application installation package to update the entire application interface, which cannot achieve partial UI updates and is not conducive to improving the flexibility of UI updates.
[0006] To achieve the above objectives, a first aspect of this application provides a television UI update system, wherein the system includes: The hybrid view embedding module is used to embed Flutter partial views into the TV's native UI layout, so that the aforementioned Flutter partial views can be mixed and arranged with the TV's native views as ordinary view components in the same layout container; The Flutter dynamic package management module is used to download, store, and manage the version of Flutter dynamic packages containing UI update content. The aforementioned Flutter dynamic packages include business code files, resource files, and package information files. The package information files include the minimum native interface version requirements. The dynamic package loading adaptation module is used to perform native interface version verification on the TV based on the package information file of the Flutter dynamic package before loading the Flutter dynamic package. If the verification is successful, the Flutter dynamic package is loaded to update the Flutter partial view of the TV.
[0007] Optionally, the above system also includes: The TV interaction adaptation module is used to control the switching of the operation focus between the native view and the Flutter partial view, so that the operation focus can be smoothly transferred between different types of mixed views. The operation focus is based on the focus when the TV is operated by the TV remote control.
[0008] Optionally, the above-mentioned hybrid view embedding module includes: The component encapsulation unit is used to encapsulate Flutter native embedded view components to embed Flutter partial views in the TV's native UI layout, and to make the aforementioned Flutter partial views be mixed and arranged with the TV's native views as ordinary view components in the same layout container. The communication channel construction unit is used to build a bidirectional communication channel between the Flutter client and the native client of the aforementioned TV. A focus management strategy configuration unit is used to configure a focus management strategy, wherein the focus management strategy includes a first strategy and a second strategy; the first strategy restricts the Flutter local view from having the ability to process remote control button operations; the second strategy restricts the Flutter local view from having the ability to process remote control button operations, and returns the operation focus to the TV's native system when the operation focus moves to the edge of the Flutter local view.
[0009] Optionally, the aforementioned packet information file may also include a dynamic packet identifier and an integrity check value; The aforementioned Flutter dynamic package management module includes: The dynamic package detection unit is used to detect the available dynamic package versions on the server in response to the dynamic package update trigger signal, and determine the Flutter dynamic package to be downloaded based on the available dynamic package versions. The dynamic package download unit is used to download the Flutter dynamic package to be downloaded from the aforementioned server. The integrity verification unit is used to perform data integrity verification on the downloaded Flutter dynamic package based on the Flutter dynamic package and the integrity verification value of the Flutter dynamic package. The local storage unit is used to store Flutter dynamic packages that have passed data integrity verification in the local directory of the TV according to the dynamic package identifier.
[0010] Optionally, the aforementioned dynamic package loading adapter module includes: The data parsing unit is used to parse and obtain the minimum native interface version requirements from the package information file of the aforementioned Flutter dynamic package; The system version acquisition unit is used to obtain the version number of the native interface supported by the above-mentioned TV; The version verification unit is used to pass the verification as the verification result when the above native interface version number is not lower than the above minimum native interface version requirement, and to fail the verification as the verification result when the above native interface version number is lower than the above minimum native interface version requirement. The update unit is used to load the Flutter dynamic package when the above verification result is that the verification is passed, and update the Flutter partial view of the TV according to the Flutter dynamic package without restarting the application running on the TV.
[0011] Optionally, the aforementioned TV interaction adaptation module includes: The button mapping unit is used to establish the mapping relationship between the native button codes of the TV remote control and Flutter button events. The button interaction processing unit is used to respond to button commands input by the TV remote control and process the button commands according to the configured focus management strategy and the above mapping relationship. The edge focus processing unit is configured to, when the operation focus moves from the Flutter local view to the view boundary, return the operation focus to the adjacent native view of the Flutter local view when the second strategy is configured as described above.
[0012] Optionally, the above system also includes: The resource synchronization management module is used to synchronize, verify, and manage Flutter resources and native resources.
[0013] A second aspect of this application provides a method for updating a television UI, wherein the method is applied to any of the aforementioned television UI update systems, and the method includes: In response to a UI update trigger signal, download and store the Flutter dynamic package to be updated; Based on the package information file of the Flutter dynamic package to be updated, obtain the minimum native interface version requirement corresponding to the Flutter dynamic package to be updated. Based on the minimum native interface version requirements mentioned above, the native interface version of the TV is verified. If the verification passes, the Flutter dynamic package to be updated is loaded to update the Flutter partial view of the TV.
[0014] A third aspect of this application provides a terminal, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements any of the steps of the aforementioned TV UI update method.
[0015] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements any of the steps of the above-described television UI update method.
[0016] As can be seen from the above, the present application provides a TV UI update system. Specifically, the system includes a hybrid view embedding module for embedding a Flutter partial view into the TV's native UI layout, so that the Flutter partial view can be mixed and arranged with the TV's native view as a normal view component in the same layout container; a Flutter dynamic package management module for downloading, storing, and managing the version of the Flutter dynamic package containing UI update content, wherein the Flutter dynamic package includes business code files, resource files, and package information files, and the package information file includes the minimum native interface version requirements; and a dynamic package loading adaptation module for verifying the TV's native interface version according to the Flutter dynamic package's package information file before loading the Flutter dynamic package, and loading the Flutter dynamic package to update the TV's Flutter partial view when the verification is successful.
[0017] Thus, in the provided TV UI update system, a Flutter partial view is embedded into the TV's native UI layout through a hybrid view embedding module. This allows the Flutter partial view to be arranged as a regular view component alongside the TV's native views within the same layout container. Furthermore, the Flutter dynamic package management module manages the Flutter dynamic package containing UI update content. A dynamic package loading adaptation module verifies the TV's native interface version; if the verification passes, the Flutter dynamic package is loaded to update the TV's Flutter partial view. In this way, the aforementioned TV UI update system, combining the TV's native architecture and the Flutter architecture, embeds locally processed Flutter partial views into the TV's native UI layout. When updating the Flutter partial view, it is not necessary to download the entire application package to update the entire application interface; only the Flutter dynamic package needs to be downloaded to update the Flutter partial view. This enables partial UI updates, improving the flexibility of UI updates. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a schematic diagram of the constituent modules of a TV UI update system provided in an embodiment of this application; Figure 2 This is a schematic diagram of the constituent modules of another TV UI update system provided in this application embodiment; Figure 3 This is a flowchart illustrating a TV UI update method provided in an embodiment of this application; Figure 4 This is a block diagram illustrating the internal structure of a terminal provided in an embodiment of this application. Detailed Implementation
[0020] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods are omitted so as not to obscure the description of this application with unnecessary detail.
[0021] It should be understood that, when used in this specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0022] It should also be understood that the terminology used in this application specification is for the purpose of describing particular embodiments only and is not intended to limit the application. As used in this application specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0023] It should also be further understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0024] As used in this specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to classification." Similarly, the phrases "if determined" or "if classified to [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once classified to [the described condition or event]," or "in response to classification to [the described condition or event]."
[0025] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0026] Many specific details are set forth in the following description in order to provide a full understanding of this application. However, this application may also be implemented in other ways than those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this application. Therefore, this application is not limited to the specific embodiments disclosed below.
[0027] Currently, smart TVs are becoming increasingly widespread, their functions are becoming more complex, and users' demands for them are also rising. For example, users expect TVs to offer better display effects and a more engaging interactive experience through UI updates. At the same time, users also require flexible UI updates while maintaining the stable operation of the TV's native functions.
[0028] In existing technologies, for Android-based TVs, UI updates are typically performed using only the native development system and a native development approach. While native Android development can ensure the stability of system functions (such as hardware adaptation and permission access), UI updates require the installation of a complete application package (APK, Android Package Kit), making partial updates impossible. Furthermore, native UI development is inefficient, has high costs for adapting to multiple device versions, and struggles to quickly respond to UI iteration needs.
[0029] In some application scenarios, a native plug-in dynamic update solution can be adopted: UI updates are achieved by dynamically loading the Dalvik executable file (dex file). However, as the number of updates increases, the dex file becomes redundant and accumulates, which slows down the application startup speed and makes it prone to version conflicts. In addition, hot updates cannot be achieved, and the entire process needs to be restarted after the dex file is updated for it to take effect.
[0030] In other application scenarios, a pure cross-platform development solution can be adopted (e.g., based on Web or React Native): the UI can be dynamically displayed through HTML5-based web pages (H5 pages). Although this can achieve high development efficiency and real-time page updates, there are performance issues such as operation lag and slow loading and running speeds, especially on TVs with relatively low hardware configurations. React Native only supports Android 7.0 at the very least, which cannot cover a large number of existing devices with Android versions below 7.0. In other application scenarios, a simple hybrid development solution can be adopted: Existing hybrid development solutions that combine native and cross-platform technologies are usually full-screen switching modes, such as jumping from a native Android page to a Flutter full-screen page. They do not embed cross-platform partial views (Views) in the native layout. For example, in a waterfall layout page, the native list cannot embed Flutter cards, which means that hot updates can only cover the whole screen and cannot accurately update the partial UI.
[0031] It is evident that existing technologies still have significant shortcomings in combining hybrid development and hot updates. For example, there are limitations in adapting dynamic updates to hybrid development. Even when some solutions attempt hybrid embedding (natively embedding a Flutter partial View), issues such as "resources cannot be truly hot-updated," "focus confusion," and "poor user experience" persist. Specifically, the aforementioned technical solutions suffer from the following technical problems: Insufficient depth of hybrid integration: It only achieves "full-screen native-cross-platform switching" and does not have the ability of "partial view-level hybrid embedding". The granularity of hot update is coarse and cannot meet the scenario of "local UI update without changing the native framework". Poor hybrid interaction experience: The focus synchronization, resource management, and button response between the native system and Flutter have not been deeply adapted, resulting in problems such as "focus loss" and "excessive resource consumption" when users operate, which does not conform to the interaction habits of TV terminals; Hot updates and hybrid collaboration are difficult: When hot updates are performed, only the Flutter code is updated, without simultaneously verifying native dependencies (such as the native data interface version that Flutter View depends on) and complete resource data, which can easily lead to UI errors such as "Flutter UI is updated but native data is incompatible".
[0032] To address at least one of the aforementioned technical problems, this application proposes a TV UI update system. Specifically, the system includes a hybrid view embedding module for embedding a Flutter partial view into the TV's native UI layout, allowing the Flutter partial view to be mixed and arranged with the TV's native view as a regular view component within the same layout container; a Flutter dynamic package management module for downloading, storing, and managing the version of the Flutter dynamic package containing UI update content, wherein the Flutter dynamic package includes business code files, resource files, and package information files, and the package information file includes minimum native interface version requirements; and a dynamic package loading adaptation module for verifying the TV's native interface version based on the Flutter dynamic package's package information file before loading the Flutter dynamic package, and loading the Flutter dynamic package to update the TV's Flutter partial view upon successful verification.
[0033] Thus, in the provided TV UI update system, a Flutter partial view is embedded into the TV's native UI layout through a hybrid view embedding module. This allows the Flutter partial view to be arranged as a regular view component alongside the TV's native views within the same layout container. Furthermore, the Flutter dynamic package management module manages the Flutter dynamic package containing UI update content. A dynamic package loading adaptation module verifies the TV's native interface version; if the verification passes, the Flutter dynamic package is loaded to update the TV's Flutter partial view. In this way, the aforementioned TV UI update system, combining the TV's native architecture and the Flutter architecture, embeds locally processed Flutter partial views into the TV's native UI layout. When updating the Flutter partial view, it is not necessary to download the entire application package to update the entire application interface; only the Flutter dynamic package needs to be downloaded to update the Flutter partial view. This enables partial UI updates, improving the flexibility of UI updates.
[0034] Specifically, this application provides an integrated solution combining deep hybrid development and hot updates, which, while meeting the requirements of existing TV UI interface technologies, also satisfies the following: Deep hybrid integration: Supports embedding Flutter partial views (such as waterfall cards and pop-up components) in the native Android layout, rather than just switching the entire screen, achieving a fusion of the stability of the native framework and the flexible updates of the Flutter UI; Smooth Hybrid Interaction: Resolves issues such as focus synchronization, data communication, and remote control button adaptation between native UI and Flutter, ensuring seamless and lag-free interaction; Low-version compatibility: Compatible with Android versions up to 5.0, enabling stable embedding and hot reloading of Flutter Views; Reliable hot update collaboration: When hot updating the Flutter UI, native dependency compatibility is checked simultaneously to ensure that the UI and native functions run in tandem.
[0035] It should be noted that this embodiment adopts a deeply integrated architecture of Flutter and native Android, using the "Flutter dynamic package" as the core carrier. Through the collaboration of various modules of the TV UI update system, a solution combining deep integration and hot updates is achieved. While ensuring the stability of native functions (such as the waterfall layout framework and hardware adaptation), the cross-platform capabilities of Flutter enable flexible hot updates of the UI. Furthermore, it is compatible with Android 5.0 and above TV systems, exhibiting good compatibility.
[0036] It should be further explained that, regarding the TV UI update system provided in this application embodiment, the corresponding application file is constructed in this application embodiment. This application file includes two parts: a host application and a dynamic package. The host application is a normal Android application, existing in the form of an APK file, which needs to be installed by the user from an app store or is built into the TV's factory system package. The dynamic package is a small program implemented using the Flutter framework, existing in the form of a zip compressed package. The dynamic package cannot run independently; it depends on the host application to load it from the internet. The host application can load one or more dynamic packages into the host's process space to run. In this application embodiment, it is not that the host opens a separate independent small program to run, but rather a deeply integrated dynamic solution. In the display interface of a host program, one or more display blocks can be implemented by dynamic packages, and different dynamic package content can be loaded and displayed for different application scenarios. In the full-screen display interface of the TV, the various different contents displayed in small blocks can be referred to as cards.
[0037] like Figure 1 As shown in the embodiment of this application, a TV UI update system is provided. Specifically, the system includes: The hybrid view embedding module 110 is used to embed a Flutter partial view in the native UI layout of the TV, so that the Flutter partial view can be mixed and arranged with the native view of the TV as a normal view component in the same layout container. The Flutter dynamic package management module 120 is used to download, store, and manage the version of Flutter dynamic packages containing UI update content. The Flutter dynamic packages include business code files, resource files, and package information files. The package information files include the minimum native interface version requirements. The dynamic package loading adaptation module 130 is used to perform native interface version verification on the TV based on the package information file of the Flutter dynamic package before loading the Flutter dynamic package. When the verification is successful, the Flutter dynamic package is loaded to update the Flutter partial view of the TV.
[0038] The aforementioned TV UI update system can be installed in the TV set or in a separate control device. In this embodiment, the TV UI update system is installed in the TV set as an example for specific explanation, but this is not intended as a specific limitation.
[0039] Figure 2 This is a schematic diagram of the constituent modules of another TV UI update system provided in the embodiments of this application, such as... Figure 2 As shown, the above system also includes: The TV interaction adaptation module 140 is used to control the switching of the operation focus between the native view and the Flutter partial view, so that the operation focus can be smoothly transferred between different types of mixed views, wherein the operation focus is based on the focus when the TV is operated by the TV remote control. The resource synchronization management module 150 is used to synchronize, verify, and manage Flutter resources and native resources.
[0040] It should be noted that the specific module division method and the connection relationship between the modules in the above-mentioned TV UI update system can be set and adjusted according to actual needs, and are not specifically limited here. In this embodiment, the above-mentioned module division is used as an example to specifically describe the above-mentioned TV UI update system.
[0041] Specifically, the aforementioned hybrid view embedding module 110 includes: The component encapsulation unit is used to encapsulate Flutter native embedded view components to embed Flutter partial views in the TV's native UI layout, and to make the aforementioned Flutter partial views be mixed and arranged with the TV's native views as ordinary view components in the same layout container. The communication channel construction unit is used to build a bidirectional communication channel between the Flutter client and the native client of the aforementioned TV. A focus management strategy configuration unit is used to configure a focus management strategy, wherein the focus management strategy includes a first strategy and a second strategy; the first strategy restricts the Flutter local view from having the ability to process remote control button operations; the second strategy restricts the Flutter local view from having the ability to process remote control button operations, and returns the operation focus to the TV's native system when the operation focus moves to the edge of the Flutter local view.
[0042] The aforementioned focus management strategies can be set and adjusted according to actual needs, without specific limitations here.
[0043] Specifically, the aforementioned hybrid view embedding module 110 is a Flutter-native hybrid integration layer. As the core hub of "deep hybrid integration", it is the foundation for realizing View-level hot updates.
[0044] This module is used to support the ability to embed partial views: it encapsulates the Flutter native embedded view (FlutterNativeEmbedView) component, supports embedding Flutter Views in Android native layouts (such as LinearLayout, RecycleView, etc.), and binds dynamic packages through XML attributes (app:flutterPkgName).
[0045] This module also constructs bidirectional communication channels through a communication channel construction unit, thereby enabling the construction of standardized communication links based on MethodChannel and EventChannel. The communication channel between the native client and the Flutter client is used to transmit data (such as the movie list and lifecycle status of the waterfall layout cards); the communication channel between the Flutter client and the native client is used to call native system capabilities (such as obtaining user information, device information, etc.) and to provide feedback on basic events (such as card clicks and focus changes); the native client obtains data from the Flutter client by querying the entry information of the Flutter dynamic package and the list of supported card types through MethodChannel.
[0046] The aforementioned hybrid view embedding module 110 can also manage remote control buttons, providing full-process control of "button registration-processing-deregistration": Flutter pages dynamically register remote control buttons to be processed (such as "back button", "home button", etc.) with the native system, and unregistered buttons are handled by the native system by default; it supports dynamic deregistration of buttons, returning the button processing rights to the native system, thereby avoiding button response conflicts.
[0047] The aforementioned hybrid view embedding module 110 is also configured with a focus management strategy: In this embodiment, for View-level integration scenarios, two configurable modes are provided to ensure seamless connection between native and Flutter focus: Mode 1 (no button handling): The Flutter page does not have button handling capabilities, but can receive "focus drop / out of focus" event notifications sent by the native system; Mode 2 (with button handling): The Flutter page has button handling capabilities, but must follow the "edge focus switching rule" - when the focus moves to the edge of the Flutter View (such as the leftmost / rightmost side of the card), the focus is automatically returned to the Android native system to avoid focus loss.
[0048] It should be noted that the aforementioned hybrid view embedding module 110 can also perform lifecycle management, synchronizing the lifecycle of Flutter View and native layout to ensure that resources are released on demand: when the native activity / fragment executes the pause callback (onPause) / destroy callback (onDestroy), FlutterNativeEmbedView synchronously pauses / destroys Flutter engine resources; when a Flutter card slides off the screen, Flutter engine resource recycling is automatically triggered, and it is reinitialized when sliding back in, thereby balancing performance and memory usage.
[0049] Furthermore, the aforementioned packet information file also includes a dynamic packet identifier and an integrity check value; The aforementioned Flutter dynamic package management module 120 includes: The dynamic package detection unit is used to detect the available dynamic package versions on the server in response to the dynamic package update trigger signal, and determine the Flutter dynamic package to be downloaded based on the available dynamic package versions. The dynamic package download unit is used to download the Flutter dynamic package to be downloaded from the aforementioned server. The integrity verification unit is used to perform data integrity verification on the downloaded Flutter dynamic package based on the Flutter dynamic package and the integrity verification value of the Flutter dynamic package. The local storage unit is used to store Flutter dynamic packages that have passed data integrity verification in the local directory of the TV according to the dynamic package identifier.
[0050] The dynamic package detection unit detects available dynamic package versions on the server and compares these available versions with locally installed dynamic package versions. If a newer version exists, the unit determines which Flutter dynamic package to download. The dynamic package update trigger signal can be automatically generated and triggered at preset time intervals, or it can be generated and triggered based on user actions; no specific limitation is made here.
[0051] In this embodiment of the application, the MD5 hash value is used as the integrity verification value, but this is not intended as a specific limitation.
[0052] The aforementioned Flutter dynamic package management module 120 provides a "standardized and highly compatible" dynamic package carrier for hybrid development scenarios.
[0053] Specifically, this application's embodiments adopt a unified dynamic package structure: regardless of whether it's "full-screen integration" or "partial view integration," a standardized dynamic package structure is used, including business code files, resource files, and package information files. The package information file includes a unique package identifier (i.e., a dynamic package identifier), an MD5 value used for integrity verification, page entry information, a dynamic package version number, and the minimum native capability interface version (min_lib_version) that supports the package's operation, used to ensure dependency compatibility between the dynamic package and the native environment.
[0054] Implement full lifecycle management for dynamic packages: automating the "detection-download-verification-storage" process.
[0055] Detection: Call the backend interface to query available dynamic package versions; Download: The dynamic package does not contain framework code, only the business logic code, and the package size is controllable; Verification: After downloading, calculate the MD5 value of the package and compare it with the MD5 value in the package information file to ensure package integrity; Storage: Packages are categorized by package ID and stored in the local directory ( / data / data / [application package name] / flutter_pkg / ), supporting caching and persistent management.
[0056] Furthermore, the aforementioned dynamic package loading adapter module 130 includes: The data parsing unit is used to parse and obtain the minimum native interface version requirements from the package information file of the aforementioned Flutter dynamic package; The system version acquisition unit is used to obtain the version number of the native interface supported by the above-mentioned TV; The version verification unit is used to pass the verification as the verification result when the above native interface version number is not lower than the above minimum native interface version requirement, and to fail the verification as the verification result when the above native interface version number is lower than the above minimum native interface version requirement. The update unit is used to load the Flutter dynamic package when the above verification result is that the verification is passed, and update the Flutter partial view of the TV according to the Flutter dynamic package without restarting the application running on the TV.
[0057] Specifically, the aforementioned dynamic package loading adaptation module 130 is used to implement standardized loading of Flutter dynamic packages.
[0058] Use a unified loading engine: The Flutter Engine Group is used as the core loading engine. Whether it is "full-screen integration" or "partial view integration", standardized loading is achieved through this engine. Hot update control mechanism: Before loading, the "dynamic package dependency version" and "native system interface version" are forcibly verified. Loading is triggered only when the native version is greater than or equal to the min_lib_version in the package management information file. If they are incompatible, the package will be automatically rolled back to the old version. Entry point parsing mechanism: Dynamic package entry point information is obtained through two methods: parsing the package information file or calling Flutter-side interfaces (such as "getPackageEntries"). Contextualized loading adaptation: Differentiated loading logic is provided for different integration scenarios. In full-screen mode, Flutter Activity replaces native Activity; in partial mode, dynamic packages are loaded through FlutterNativeEmbedView and embedded in the specified position of the native layout. Non-reboot loading: Utilizing the hot reload capability of the Flutter Engine, when updating the Flutter UI, only the corresponding widgets / pages are rebuilt without restarting the main application process, achieving "seamless updates".
[0059] Furthermore, the aforementioned TV interaction adaptation module 140 includes: The button mapping unit is used to establish the mapping relationship between the native button codes of the TV remote control and Flutter button events. The button interaction processing unit is used to respond to button commands input by the TV remote control and process the button commands according to the configured focus management strategy and the above mapping relationship. The edge focus processing unit is configured to, when the operation focus moves from the Flutter local view to the view boundary, return the operation focus to the adjacent native view of the Flutter local view when the second strategy is configured as described above.
[0060] The aforementioned processing of the button commands includes executing the corresponding native keycode or triggering the corresponding Flutter button event, depending on the specific focus management strategy configured. Under the first strategy, the Flutter partial view does not have the ability to process remote control button operations; therefore, in response to button commands input from the TV remote control, it directly executes the native keycode matching the button command. Under the second strategy, the Flutter partial view has the ability to process remote control button operations; therefore, in response to button commands input from the TV remote control, based on the aforementioned mapping relationship, it determines the Flutter button event matching the button command, triggers and executes that Flutter button event.
[0061] In this embodiment of the application, the problem of fragmented interactive experience in mixed scenarios is solved based on the TV interaction adaptation module 140.
[0062] Construct a unified mapping for remote control buttons: Establish a mapping table of "native button codes - Flutter button events" through a hybrid integration layer, and map the native button codes of Android TV remote control such as "up, down, left, right, confirm, back, home, menu" to logical keyboard keys that Flutter can recognize (LogicalKeyboardKey), ensuring that the button response logic of Flutter View and native View is consistent and there is no sense of disconnect in operation; Achieve adaptive resolution: Utilizing Flutter's LayoutBuilder and MediaQuery components, the UI layout adapts to different screen resolutions, including 1080P and 4K, avoiding stretching or misalignment. Focus management optimization: In conjunction with the focus strategy of the "Flutter-Native Hybrid Integration Layer", when switching from a native View to a Flutter local View, the focus is synchronized through FlutterNativeEmbedView.requestFocus() to handle edge focus switching (such as switching from a Flutter card down to a native list item), ensuring a smooth transition of focus without loss.
[0063] The resource synchronization management module described above is used to ensure that resources and logic are synchronized during UI updates, avoiding interface anomalies. Specifically, it implements the following functions: Resource collaboration and reuse: Supports Flutter dynamic packages to reuse Android native resources (such as TV default fonts, icons, etc.), reducing duplicate storage and reducing storage space usage. The Flutter side obtains the resources by calling the native resource interface through MethodChannel. Resource preloading and caching: During the initialization of the hybrid integration layer, the core resources required by the Flutter dynamic package are preloaded into memory to ensure that the UI display is synchronized with the native resources; Resource version verification: Simultaneously verify the versions of Flutter resources and native resources to prevent UI errors caused by version mismatch.
[0064] This application provides a TV UI update system. Specifically, the system includes a hybrid view embedding module for embedding Flutter partial views into the TV's native UI layout, so that the Flutter partial views can be mixed and arranged with the TV's native views as ordinary view components in the same layout container; a Flutter dynamic package management module for downloading, storing, and managing the version of Flutter dynamic packages containing UI update content, wherein the Flutter dynamic package includes business code files, resource files, and package information files, and the package information file includes the minimum native interface version requirements; and a dynamic package loading adaptation module for verifying the TV's native interface version based on the Flutter dynamic package's package information file before loading the Flutter dynamic package, and loading the Flutter dynamic package to update the TV's Flutter partial views when the verification is successful.
[0065] Thus, in the provided TV UI update system, a Flutter partial view is embedded into the TV's native UI layout through a hybrid view embedding module. This allows the Flutter partial view to be arranged as a regular view component alongside the TV's native views within the same layout container. Furthermore, the Flutter dynamic package management module manages the Flutter dynamic package containing UI update content. A dynamic package loading adaptation module verifies the TV's native interface version; if the verification passes, the Flutter dynamic package is loaded to update the TV's Flutter partial view. In this way, the aforementioned TV UI update system, combining the TV's native architecture and the Flutter architecture, embeds locally processed Flutter partial views into the TV's native UI layout. When updating the Flutter partial view, it is not necessary to download the entire application package to update the entire application interface; only the Flutter dynamic package needs to be downloaded to update the Flutter partial view. This enables partial UI updates, improving the flexibility of UI updates.
[0066] It should be noted that the specific structure and implementation of the above-mentioned TV UI update system and its various modules or units can be referred to the corresponding descriptions in the above method embodiments, and will not be repeated here.
[0067] It should be noted that the division of the various modules of the TV UI update system mentioned above is not unique and is not intended as a specific limitation.
[0068] Figure 3 This is a flowchart illustrating a TV UI update method provided in an embodiment of this application, as shown below. Figure 3As shown, this application embodiment also provides a TV UI update method. The above method is applied to any of the above-mentioned TV UI update systems, and the method specifically includes the following steps: Step S100: In response to the UI update trigger signal, download and store the Flutter dynamic package to be updated; Step S200: Based on the package information file of the Flutter dynamic package to be updated, obtain the minimum native interface version requirement corresponding to the Flutter dynamic package to be updated. Step S300: Based on the minimum native interface version requirement, the native interface version of the TV is verified. If the verification passes, the Flutter dynamic package to be updated is loaded to update the Flutter partial view of the TV.
[0069] The UI update trigger signal mentioned above can be automatically generated and triggered at preset time intervals, or generated and triggered based on user operations, without specific limitations.
[0070] In the TV UI update system using the above method, a Flutter partial view is embedded within the TV's native UI layout. This allows the Flutter partial view to be arranged as a regular view component alongside the TV's native views within the same layout container. In response to a UI update trigger signal, the Flutter dynamic package to be updated is downloaded and stored to determine the minimum native interface version requirement. The TV's native interface version is then validated. If the validation passes, the Flutter dynamic package to be updated is loaded to update the TV's Flutter partial view. Thus, by combining the TV's native architecture and the Flutter architecture, embedding a locally processed Flutter partial view within the TV's native UI layout allows for partial UI updates without downloading the entire application package for a complete update of the application interface. Only the Flutter dynamic package needs to be downloaded to update the Flutter partial view, thereby improving the flexibility of UI updates.
[0071] It should be noted that the specific steps for updating the TV UI described above can be found in the specific functions of each module in the corresponding TV UI update system, and will not be elaborated here.
[0072] In this embodiment, the TV UI update system and method described above are further described in detail based on some specific application scenarios. Specifically, the overall workflow is explained using "hot update of Flutter View cards embedded in native waterfall layout" as an example, but it is also applicable to non-waterfall layout interfaces.
[0073] In the preprocessing stage, hybrid development and dynamic package deployment are carried out: Native development: Building a waterfall layout framework page and an adaptation system for Flutter View cards.
[0074] Waterfall layout basic framework development: The waterfall layout is implemented using the RecycleView component in native Android development, and the card arrangement logic is managed by the GridLayoutManager component. Implement the getItemViewType, onCreateViewHolder, and onBindViewHolder methods of the RecycleView.Adapter component to support the creation and data binding of multiple types of card views (native cards combined with Flutter cards); A unified "card type enumeration" is predefined, such as CARD_TYPE_FLUTTER_MOVIES (Flutter movie recommendation cards), CARD_TYPE_FLUTTER_MARKDOWN (Flutter Markdown cards), and CARD_TYPE_NATIVE_LIVE (native live streaming cards), with each type corresponding to a unique viewType; Flutter View card type preloading and adaptation: During native initialization, the "Flutter Support Card Type Query" is executed in the FlutterContainerManager component of Flutter, and a mapping table of "card type-dynamic package ID-min_lib_version-entry path" is established.
[0075] Flutter Card Container and Recycling / Reload Management: In the RecycleView list item layout, reserve a FrameLayout container for Flutter type cards (instead of directly embedding FlutterNativeEmbedView).
[0076] Implement a "resource reclamation-data caching-reload reuse" mechanism: Recycling: When a Flutter card slides off the screen, the native client executes a resource recycling process: it calls the onDestroy method of FlutterNativeEmbedView to release Flutter Engine resources and caches the card's business data (such as a movie recommendation list). Overload: When the card slides back into the screen, FlutterContainerManager first reads the cached data. If the cache exists, it quickly binds the data using setCardData. If the cache does not exist, it creates a new FlutterNativeEmbedView, loads the corresponding dynamic package, and passes the business data.
[0077] Waterfall data reception and card type matching: The native client calls the backend interface to obtain dynamic waterfall data in JSON format (distributed in units of cards, including card type and business data); based on the card type, if it is a Flutter type, the dynamic package is obtained through FlutterContainerManager according to the mapping table, FlutterNativeEmbedView is loaded in the reserved FrameLayout and the business data is passed.
[0078] Flutter Development: Lightweight Card Components and Unified Packaging
[0079] Card component development: Adhering to the single responsibility principle, it is only responsible for UI rendering and standardized communication, and does not contain complex business logic (such as statistical reporting, which is handled by the native client). Each Flutter dynamic package has a unique card component corresponding to its custom entry point; The component implements a unified interface to receive business data (such as movie recommendation lists) transmitted from the native client. Implement page event listening according to the communication specifications of the hybrid integration layer, and connect to focus control, key control and native system capability interface calls according to business needs.
[0080] Unified dynamic package packaging: A cross-platform build command-line scaffolding tool was developed using Node.js, enabling business developers to quickly package packages according to a "unified dynamic package structure"; The build process includes resource optimization (image compression, font redundancy removal, etc.), byte alignment (to improve loading efficiency), and framework decoupling (the dynamic package only contains business code and dependent resources, without the Flutter framework; the framework is built into the TV system, effectively controlling the package size). Automatically generate dynamic package information files, ensuring that the fields (package ID, min_lib_version) are consistent with the requirements of the native mapping table.
[0081] Dynamic package deployment and configuration: Once the dynamic package is built, it is uploaded to the "Dynamic Package Management Platform". The platform configures a precise update strategy for each package (such as specifying the TV chassis model, TV system version, user group, etc.). The "Dynamic Package Management Module" on the TV side calls the platform interface to detect dynamic packages that match its own conditions and meet the update strategy, and triggers the subsequent download and update process.
[0082] During application runtime, waterfall loading and Flutter card hot updates are implemented. This embodiment uses the example of "a user opening a TV waterfall page, loading a Flutter movie recommendation card (recommend_movies_card) and triggering a hot update" to illustrate the process, which is as follows: The process begins with native initialization and Flutter card type lookup: When the user opens the Waterfall Activity page, the native app initializes two core classes in the onCreate method: FlutterContainerManager (responsible for loading and managing Flutter cards) and DataCache (responsible for caching business data). FlutterContainerManager sends the "getPackageEntries" command to Flutter EngineGroup via MethodChannel. Flutter returns the supported card types and corresponding entry information (e.g., ["recommend_movies_card", "markdown_card", "music_card"] indicates that the current dynamic update package supports three types of cards: "recommended movies", "Markdown documents", and "music"). FlutterContainerManager reads the information of the locally downloaded dynamic packages and establishes a mapping table "card_type→package_id→package_info", which is a mapping table between "card type" and Flutter's "card function entry method". For example, "recommend_movies_card" → "flutter_recommend_movies_card" → min_lib_version=2.0.0, verifying the compatibility of the native system interface version. This means that when the native host application needs to display the "Recommended Movies" card, it first finds the Flutter dynamic package that supports this component through "recommend_movies_card", queries the list of components supported by the package ID, finds that the entry point corresponding to "recommend_movies_card" is "flutter_recommend_movies_card", and checks the minimum library requirement version of the dynamic package min_lib_version=2.0.0. If it meets the requirements, it can be loaded and run.
[0083] Then, the waterfall data loading and multi-type card rendering are performed: The native client retrieves the waterfall data by calling the backend API. An example of this data is as follows: [ {"type": "recommend_movies_card", "data": {"movieList":[]}}, {"type": "live_card", "data": {"liveId": "123", "liveName": "live broadcast", "coverUrl": "xxx"}}, {"type": "setting_card", "data": {"settingId": "789", "settingName":"setting"}}].
[0084] RecyclerView.Adapter renders the view based on the card's "type": For “recommend_movies_card”: FlutterContainerManager obtains package information and entry point from the mapping table, creates FlutterNativeEmbedView in the reserved FrameLayout, loads the corresponding dynamic package, calls setCardData through MethodChannel to pass movieList data, and after RecommendMoviesCardWidget receives the data, it renders the recommended movie list UI; For the dynamic card "live_card" and the live streaming card "setting_card": create a native Android View and bind the corresponding data.
[0085] Flutter card recycling and reloading are performed when the user scrolls through the waterfall layout: When the "recommend_movies_card" slides off the screen, the native client triggers onViewDetachedFromWindow: calling FlutterNativeEmbedView.destroy() to release Flutter engine resources and cache the card's data list in DataCache; When the user swipes back, "recommend_movies_card" re-enters the screen, triggering onBindViewHolder on the native side. It reads cached data from DataCache, reuses the already created FlutterNativeEmbedView, and quickly binds the data using setCardData without reloading the dynamic package.
[0086] Furthermore, hot updates for Flutter cards can also be performed. In this embodiment, hot updates triggered by pushing a new version from the server are used as an example for specific explanation: Assume the user's TV currently has and is running the dynamic update package flutter_recommend_movies_card_v1.0, and the TV application currently supports library version libVersion=2.1.0; The server releases the flutter_recommend_movies_card_v1.1 dynamic package (optimizations include rounded corner styles for movie posters and font size adaptation), and configures an update strategy (adapting to Android 5.0+ and covering all target models). The TV's "Dynamic Package Management Module" detected an updated version and verified that the minimum library requirement was min_lib_version=2.0.0, which is compatible with the TV's native libVersion=2.1.0. A silent download was then performed (without affecting the user's current experience). After downloading, the package was decompressed and the MD5 value was verified. It matched the server's verification; therefore, the verification passed. After the update takes effect, when "recommend_movies_card" is reloaded (e.g., when the user swipes the card out of the screen and then back in), FlutterContainerManager automatically loads the v1.1 dynamic package, reads cached data from DataCache, and passes it to the new version of RecommendMoviesCardWidget; the card UI is updated to a rounded corner style in real time, without the need to restart the application, and the user is unaware of the switch; Abnormal rollback: If the v1.1 version package fails to load, FlutterContainerManager will automatically roll back to the v1.0 version to ensure that the waterfall layout displays normally.
[0087] To achieve the above technical solutions, this application employs several key technologies, such as Flutter-Android native deep hybrid integration technology: FlutterNativeEmbedView component encapsulation: Inherits from Android native FrameLayout, contains FlutterView and FlutterEngine, binds dynamic package ID through XML attribute app:flutterPkgName, and automatically associates and loads the specified package during initialization; Override the onMeasure and onLayout methods to ensure that the size of the Flutter View matches the native layout, thus avoiding layout misalignment of SurfaceView in Android 5.0-6.0; To synchronize FocusListener with native focus, when native focus is passed to the component, FlutterView.requestFocus() is automatically called to synchronously activate the FocusNode inside Flutter (such as buttons and list items in a card), thus avoiding the problem of "native focus has entered the component, but there is no focus inside Flutter". Two-way communication optimization: A standardized two-way communication link is built based on MethodChannel and EventChannel: Synchronous communication (native → Flutter): Business data (such as the movie list of waterfall cards and focus selection style parameters) is transmitted through MethodChannel, with a single communication time of <50ms, which can meet the needs of real-time UI rendering; Asynchronous event feedback (Flutter → native): Basic events (such as Flutter card clicks and focus edge switching notifications) are transmitted through EventChannel, and the event data format is unified as Map.<String,String> (Including eventType and data business parameters) to ensure unambiguous parsing on the native side. For example, Flutter card click event is passed as {"eventType":"card_click","data":"movie_id=123"}; For compatibility with older versions of Android, the rendering and engine initialization logic has been optimized to ensure stability of hybrid integration on older devices, taking into account the characteristics of Android 5.0. In Android 5.0, the rendering mode of Flutter has been changed from SurfaceView to TextureView to avoid rendering conflicts between native SurfaceView and Flutter Engine, effectively solving the problem of displaying the hierarchy of native View and Flutter View in hybrid development. The initialization timing of FlutterEngine has been optimized to initialize in the onStart method of the native Activity instead of onCreate, avoiding blocking of the main thread on older systems.
[0088] In this embodiment of the application, a View-level hot update technology for mixed scenarios is also used, specifically including: Dynamic packages are bound to native dependencies: The min_lib_version field (defined as "the minimum supported version of the native system interface") is explicitly specified in the dynamic package information file. The server establishes a mapping table of "dynamic package version-min_lib_version". When updating, dependency compatibility is checked first to avoid functional abnormalities caused by "Flutter dynamic package depends on a high version of native interface, but the current TV system version is incompatible". Local View On-Demand Loading / Unloading: The hybrid integration layer uses FlutterContainerManager to dynamically manage FlutterNativeEmbedView, fully adapting to waterfall layout scenarios; On-Demand Loading: When a Flutter card enters the visible area of the screen (triggered by RecyclerView's onBindViewHolder), FlutterContainerManager checks if the global FlutterEngine instance exists. If it exists, it is reused directly (avoiding repeated initialization, loading time <100ms). If it does not exist, a new FlutterEngine is created and the corresponding dynamic package is loaded; On-Demand Unloading: When a Flutter card slides out of the visible area of the screen (triggered by RecyclerView's onViewDetachedFromWindow), FlutterContainerManager calls FlutterNativeEmbedView.destroy() to release rendering resources (such as textures and shaders), but retains the global FlutterEngine instance (for reuse by other cards), reducing memory usage by 40% compared to "destroying the engine every time it is unloaded"; Extreme scenario handling: When the TV has insufficient memory (e.g., available memory < 512MB), the global FlutterEngine instance is automatically destroyed to prioritize the stability of the native system, and then re-initialized during subsequent loading; Non-restart update mechanism: Utilizing the hot reload capability of Flutter EngineGroup, when updating Flutter dynamic packages, only the corresponding FlutterWidget is reinitialized, without restarting FlutterEngine and the application main process.
[0089] In this embodiment of the application, television interaction adaptation technology is also employed, specifically including: Unified mapping of remote control buttons: Define a "button mapping table" in the hybrid integration layer to map the native KEYCODE_DPAD_UP / DOWN / LEFT / RIGHT to Flutter's LogicalKeyboardKey.arrowUp / Down / Left / Right. For example, KEYCODE_ENTER is mapped to LogicalKeyboardKey.enter. Override the onKeyDown method of FlutterNativeEmbedView to pass the native button events to Flutter, ensuring that the button response logic of Flutter cards and native views is consistent. Focus style and feedback synchronization: Natively, the "focus selection style" (such as border color and width) is passed to Flutter through MethodChannel. Flutter renders the focus effect according to the style to ensure the consistency of global interaction visuals. Resolution Adaptive: The hybrid integration layer obtains the TV screen size through DisplayMetrics and passes the "screen width percentage" to Flutter. Flutter uses MediaQuery to lay out the data according to the percentage (e.g., card width = screen width × 0.8), ensuring that it displays correctly on both 1080P and 4K screens.
[0090] In this embodiment, for Android TV systems, a method and related technologies are applied to achieve "non-reboot hot updates" of the UI interface (including resources) through deep integration of Flutter with native Android, supporting both full-screen and partial view-level updates. This preserves the stability of native Android functions while leveraging Flutter's cross-platform capabilities and dynamic features for flexible updates, and also adapts to older Android TV devices, balancing update flexibility, performance stability, and TV-side interactive experience.
[0091] Specifically, the proposed solution constructs a Flutter-Android native deep hybrid integration architecture: by customizing the FlutterNativeEmbedView component, bidirectional communication channels and focus synchronization mechanism, it achieves "embedding a local Flutter View in the native layout", breaking through the limitation of existing hybrid solutions that "only switch the entire screen", and laying the foundation for View-level hot updates.
[0092] It provides a low-version compatible hot update technology for mixed scenarios: optimizes the FlutterEngine initialization and rendering logic for Android 5.0-6.0, solves the crash problem of mixed embedding in low-version systems, and verifies the versions of dynamic packages and native dependencies to ensure the compatibility and reliability of hot updates in mixed scenarios.
[0093] It also provides a hybrid interaction adaptation solution for TVs: by unifying button mapping, focus synchronization and visual feedback, it solves the problem of the disconnect between native and Flutter experiences in TV remote control operation, and ensures smooth interaction in hybrid scenarios.
[0094] A non-restartable view-level hot update mechanism has been implemented: by leveraging Flutter Engine hot reload and dynamic package on-demand loading, local UI updates in hybrid layouts can be achieved without restarting, preserving the stability of native functions while enabling flexible UI iteration.
[0095] This enhances the depth and flexibility of hybrid integration: enabling "native layout embedded in a local Flutter View," and expanding the hot update granularity from "full screen" to "View level." It supports various hybrid scenarios such as waterfall layouts, pop-ups, and list items, flexibly addressing different business needs. Compatible with Android versions 5.0-16, this Flutter integration solution surpasses existing hybrid solutions.
[0096] At the same time, it improves the user experience: focus switching is smooth and seamless; remote control buttons are responsive and there is no sense of disconnect in operation; hot updates take effect without restarting and are imperceptible to the user.
[0097] Furthermore, performance optimizations have been implemented: a Flutter View recycling / reloading mechanism has been implemented to reduce resource consumption; a business data caching mechanism bound to Flutter View has been adopted to reduce repeated data requests; the dynamic package does not contain framework code, but only business code and resources, which can effectively control the package size.
[0098] Furthermore, the proposed solution also offers business scalability: it supports the dynamic distribution of new card types in the backend without requiring application releases; it supports both full-screen and partial integration scenarios, providing a stable and scalable technical foundation for future business expansion.
[0099] In some application scenarios, a "framework adaptation layer" can be added to the hybrid integration layer to support the simultaneous embedding of partial views from Flutter and React Native (Flutter can cover lower versions of Android, and React Native can cover higher versions of Android), further expanding the device coverage and achieving cross-platform compatibility.
[0100] In other application scenarios, mixed-scenario canary releases can also be performed: add the "canary release by mixed type" function, for example, first push "partial view update" to 10% of users, and then push "full screen update" after there are no problems, to reduce the update risk in mixed scenarios.
[0101] In other application scenarios, native functions can also be extended as plug-ins: TV hardware adaptation functions (such as infrared remote control and HDMI detection) can be encapsulated as native plug-ins. Flutter dynamic packages can call plug-ins through the hybrid integration layer to achieve a flexible combination of Flutter UI and native hardware functions.
[0102] Based on the above embodiments, this application also provides a terminal, the principle block diagram of which can be as follows: Figure 4As shown. The terminal includes a processor, memory, network interface, and display screen connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements the steps of any of the above-described television UI update methods. The display screen can be a liquid crystal display (LCD) or an e-ink display.
[0103] Those skilled in the art will understand that Figure 4 The block diagram shown is only a partial structural diagram related to the solution of this application and does not constitute a limitation on the terminal on which the solution of this application is applied. The specific terminal may include more or fewer components than shown in the figure, or combine some components, or have different component arrangements.
[0104] In one embodiment, a terminal is provided, the terminal including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of any of the TV UI update methods provided in the embodiments of this application.
[0105] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of any of the TV UI update methods provided in this application.
[0106] 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.
[0107] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the above device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above device can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0108] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0109] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0110] In the embodiments provided in this application, it should be understood that the disclosed systems / terminal devices and methods can be implemented in other ways. For example, the system / terminal device embodiments described above are merely illustrative. For instance, the division of modules or units described above is merely a logical functional division, and in actual implementation, it can be divided in other ways. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0111] If the integrated modules / units described above are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, and software distribution media, etc. It should be noted that the content included in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction.
[0112] 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 are not in essence a departure 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 TV UI update system, characterized in that, The system includes: The hybrid view embedding module is used to embed Flutter partial views into the native UI layout of the TV, so that the Flutter partial views can be mixed and arranged with the native views of the TV as ordinary view components in the same layout container; The Flutter dynamic package management module is used to download, store, and manage the version of Flutter dynamic packages containing UI update content. The Flutter dynamic package includes business code files, resource files, and package information files. The package information file includes the minimum native interface version requirements. The dynamic package loading adaptation module is used to perform native interface version verification on the TV based on the package information file of the Flutter dynamic package before loading the Flutter dynamic package. If the verification is successful, the Flutter dynamic package is loaded to update the Flutter partial view of the TV.
2. The TV UI update system according to claim 1, characterized in that, The system also includes: The TV interaction adaptation module is used to control the switching of the operation focus between the native view and the Flutter partial view, so that the operation focus can be smoothly transferred between different types of mixed views, wherein the operation focus is based on the focus when the TV is operated by the TV remote control.
3. The TV UI update system according to claim 2, characterized in that, The hybrid view embedding module includes: The component encapsulation unit is used to encapsulate Flutter native embedded view components to embed Flutter partial views in the TV's native UI layout, and to make the Flutter partial views be mixed and arranged with the TV's native views as ordinary view components in the same layout container. A communication channel construction unit is used to construct a bidirectional communication channel between the Flutter client and the native client of the TV. A focus management strategy configuration unit is used to configure a focus management strategy, wherein the focus management strategy includes a first strategy and a second strategy; the first strategy restricts the Flutter local view from having the ability to process remote control button operations; the second strategy restricts the Flutter local view from having the ability to process remote control button operations, and returns the operation focus to the TV's native system when the operation focus moves to the edge of the Flutter local view.
4. The TV UI update system according to claim 1, characterized in that, The packet information file also includes a dynamic packet identifier and an integrity check value; The Flutter dynamic package management module includes: The dynamic package detection unit is used to detect the available dynamic package versions in the server in response to the dynamic package update trigger signal, and determine the Flutter dynamic package to be downloaded based on the available dynamic package versions. The dynamic package download unit is used to download the Flutter dynamic package to be downloaded from the server. The integrity verification unit is used to perform data integrity verification on the downloaded Flutter dynamic package based on the Flutter dynamic package and the integrity verification value of the Flutter dynamic package. The local storage unit is used to store Flutter dynamic packages that have passed data integrity verification in the local directory of the TV according to the dynamic package identifier.
5. The TV UI update system according to claim 1, characterized in that, The dynamic package loading adapter module includes: The data parsing unit is used to parse and obtain the minimum native interface version requirements from the package information file of the Flutter dynamic package; The system version acquisition unit is used to acquire the native interface version number supported by the TV; The version verification unit is used to pass the verification as the verification result when the native interface version number is not lower than the minimum native interface version requirement, and to fail the verification as the verification result when the native interface version number is lower than the minimum native interface version requirement. The update unit is used to load the Flutter dynamic package when the verification result is that the verification is passed, and update the Flutter partial view of the TV according to the Flutter dynamic package without restarting the application running on the TV.
6. The TV UI update system according to claim 3, characterized in that, The television interaction adaptation module includes: A button mapping unit is used to establish a mapping relationship between the native button codes of the TV remote control and Flutter button events; A button interaction processing unit is used to respond to button commands input by the TV remote control and process the button commands according to the configured focus management strategy and the mapping relationship. An edge focus processing unit is configured to, when the operation focus moves from the Flutter local view to the view boundary, return the operation focus to the adjacent native view of the Flutter local view when the second strategy is configured.
7. The TV UI update system according to claim 1, characterized in that, The system also includes: The resource synchronization management module is used to synchronize, verify, and manage Flutter resources and native resources.
8. A method for updating a TV UI, characterized in that, The method is applied to the television UI update system according to any one of claims 1 to 7, and the method includes: In response to a UI update trigger signal, download and store the Flutter dynamic package to be updated; Based on the package information file of the Flutter dynamic package to be updated, obtain the minimum native interface version requirement corresponding to the Flutter dynamic package to be updated; According to the minimum native interface version requirement, the TV performs native interface version verification. If the verification passes, the Flutter dynamic package to be updated is loaded to update the Flutter partial view of the TV.
9. A terminal, characterized in that, The terminal includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the TV UI update method as described in claim 8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the television UI update method as described in claim 8.