Software Upgrade Method, Device, Smart TV Device and Medium

By installing and upgrading application software suitable for mobile phone devices on smart TV devices, and using management plug-ins to parse and generate upgrade plug-ins, the problem of not being able to install and upgrade application software normally on smart TV devices is solved, and the requirements for diversified software upgrades are met and development costs are reduced.

CN117931237BActive Publication Date: 2025-06-20北京视游互动科技有限公司
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410095194.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-23
Publication Date
2025-06-20
Estimated Expiration
2044-01-23

AI Technical Summary

Technical Problem

The application software suitable for mobile phone devices cannot be installed and upgraded normally on smart TV devices, resulting in users being unable to enjoy a complete application experience on smart TVs.

Method used

By installing mobile application software suitable for mobile phone devices in the smart TV device, downloading the upgrade software package to the smart TV device, using the management plug-in to analyze the upgrade software package, generating upgrade plug-ins that meet the upgrade needs of smart TV devices, and then upgrading the mobile application software in the smart TV device.

Benefits of technology

It has realized the normal installation and upgrading of application software suitable for mobile phone devices on smart TV devices, meeting the diverse software upgrade needs of smart TV devices and reducing development costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117931237B_ABST
    Figure CN117931237B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a software upgrade method, apparatus, smart TV device, and medium. The method includes: installing a mobile application software suitable for a mobile device in the smart TV device; downloading an upgrade software package suitable for the mobile device to the smart TV device; parsing the upgrade software package by using a management plugin included in the mobile application software to obtain at least one upgrade plugin that meets the upgrade requirements of the smart TV device; and upgrading the mobile application software in the smart TV device by using the upgrade plugin. This enables the application software developed only for mobile devices to be used normally on the smart TV device, meets the software upgrade requirements on the smart TV device, does not require separate development, and can effectively reduce the development cost while meeting the application requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular, to software upgrade methods, devices, smart TV devices, and media. Background Art

[0002] With the development of smart TV technology, smart TVs can not only receive TV broadcasts like ordinary TVs, but also install various application software to meet other application needs of users in addition to watching TV broadcasts.

[0003] Specifically, users can install browsers, live broadcast software, and game software on smart TV terminals. In actual applications, since most smart TVs and mobile phones are developed based on the same operating system (for example, the Android system), but the number of users of smart TVs is limited, when developing software, it is often not developed specifically for smart TVs. That is to say, some application software suitable for mobile devices cannot be installed on smart TV devices; or, even if it can be installed, it cannot be ensured that the installed application software can be normally upgraded. Therefore, a solution is needed to enable the normal application of application software suitable for mobile phones on smart TV terminals. Summary of the Invention

[0004] Embodiments of this application provide software upgrade methods, devices, smart TV devices, and media, for use in... solutions.

[0005] In a first aspect, embodiments of this application provide a software upgrade method, which includes:

[0006] Install a mobile application software suitable for mobile devices in a smart TV device;

[0007] Download an upgrade software package suitable for the mobile device to the smart TV device;

[0008] Use a management plugin included in the mobile application software to parse the upgrade software package to obtain at least one upgrade plugin that meets the upgrade requirements of the smart TV device;

[0009] Use the upgrade plugin to upgrade the mobile application software in the smart TV device.

[0010] Optionally, before using a preset plugin tool to parse the upgrade software package, it further includes:

[0011] In the smart TV device, use the upgrade software package to upgrade the mobile application software; where the upgrade software package is a software package for upgrading the mobile application software in the mobile device;

[0012] If the upgrade fails, then call the preset plugin tool for parsing.

[0013] Optionally, installing a mobile application software applicable to mobile devices in the smart TV device includes:

[0014] When downloading the mobile application software to the mobile device, if the mobile device cannot meet the application requirements of the user for the mobile application software after the mobile application software is installed on the mobile device, then receive the installation request of the user;

[0015] Based on the installation request, obtain the mobile application software from the mobile device;

[0016] Install the mobile application software in the smart TV device.

[0017] Optionally, parsing the upgrade software package by using the preset plug-in tool to obtain at least one upgrade plug-in that meets the upgrade requirements of the smart TV device includes:

[0018] Parse the upgrade software package to obtain plug-in processing information;

[0019] Based on the plug-in processing information, generate at least one upgrade plug-in;

[0020] Through the main program interface, establish a corresponding relationship between the upgrade plug-in and the application program, so that the upgrade plug-in meets the upgrade requirements of the smart TV device.

[0021] Optionally, parsing the upgrade software package by using the preset plug-in tool to obtain plug-in processing information includes:

[0022] Parse to obtain plug-in processing information through the main program interface, and the plug-in processing information includes at least one of the program information, resource files, plug-in decompression directory, plug-in resources, and class loader of the mobile application software;

[0023] The generating at least one upgrade plug-in that meets the requirements based on the plug-in processing information includes:

[0024] Based on at least one of the program information, resource files, plug-in decompression directory, plug-in resources, and class loader of the mobile application software, generate at least one upgrade plug-in.

[0025] Optionally, upgrading the mobile application software in the smart TV device by using the upgrade plug-in includes:

[0026] After determining that the upgrade plug-in and the mobile application software establish a corresponding relationship, use at least one of the upgrade plug-ins to replace the target plug-in in the mobile application software;

[0027] When the mobile phone application software is started, the upgrade plug-in is executed in the main program package.

[0028] Optionally, when the mobile phone application software is started, executing the upgrade plug-in in the mobile phone application software includes:

[0029] The mobile phone application software obtains a placeholder page registered with an application object containing metadata provided by the system;

[0030] When starting the mobile phone application software to execute the upgrade plug-in, if the upgrade plug-in jumps to a new page, the system jumps to the new page based on the registered placeholder page.

[0031] In a second aspect, an embodiment of the present application provides a software upgrade device, which includes:

[0032] An installation module, configured to install mobile phone application software suitable for mobile phone devices in a smart TV device;

[0033] A download module, configured to download an upgrade software package suitable for the mobile phone device to the smart TV device;

[0034] An analysis module, configured to analyze the upgrade software package to obtain at least one upgrade plug-in that meets the upgrade requirements of the smart TV device;

[0035] An upgrade module, configured to upgrade the mobile phone application software in the smart TV device by using the upgrade plug-in.

[0036] In a third aspect, an embodiment of the present application provides an electronic device, including: a memory and a processor; wherein, an executable code is stored on the memory, and when the executable code is executed by the processor, the processor executes the method described in the first aspect.

[0037] In a fourth aspect, an embodiment of the present application provides a computer-readable medium, on which at least one instruction, at least one program, a code set or an instruction set is stored, and the at least one instruction, at least one program, the code set or the instruction set is loaded and executed by a processor to implement the method described in the second aspect.

[0038] In the present application, a mobile application software applicable to mobile devices is installed in a smart TV device; an upgrade software package applicable to the mobile device is downloaded to the smart TV device; the upgrade software package is parsed to obtain at least one upgrade plugin that meets the upgrade requirements of the smart TV device; and the mobile application software in the smart TV device is upgraded by using the upgrade plugin. Through the above solution, the application software developed only for mobile devices can be used normally on the smart TV device, meeting the software upgrade requirements of the smart TV device, without the need for separate development, and effectively reducing the development cost while meeting the application requirements. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0040] Figure 1a Schematic diagram of the mobile application software installation system provided by the embodiment of the present application;

[0041] Figure 1b Schematic flow chart of a software upgrade method provided by the embodiment of the present application;

[0042] Figure 2 Schematic diagram of software upgrade illustrated by examples in the embodiment of the present application;

[0043] Figure 3 Schematic diagram of the structure of a software upgrade device provided by the embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0044] Now, the content of the present application will be discussed with reference to several exemplary embodiments. It should be understood that these embodiments are only discussed to enable those of ordinary skill in the art to better understand and thus implement the content of the present application, rather than implying any limitation to the scope of the present application.

[0045] As used herein, the term "comprising" and its variants are to be construed as open-ended terms meaning "including but not limited to". The term "based on" is to be construed as "at least partially based on". The term "one embodiment" and "an embodiment" are to be construed as "at least one embodiment". The term "another embodiment" is to be construed as "at least one other embodiment".

[0046] In addition, the step timing in the following method embodiments is only an example, not strictly limited.

[0047] With the development of smart TV related technologies, in order to meet the diverse needs of users, users are allowed to install various application software on smart TV devices. For example, users can install browsers, live broadcast software, and game software on smart TV terminals. As Figure 1a This is a schematic diagram of the mobile application software installation system provided by an embodiment of this application. In actual applications, since most smart TVs and mobile phones are developed based on the same operating system (for example, the Android system), but the number of users of smart TVs is limited. When developing software, in order to reduce software development costs, software is often not developed specifically for smart TVs. This means that some application software suitable for mobile devices cannot be installed on smart TV devices; or, even if it can be installed, it cannot be ensured that the installed application software can be normally upgraded. Therefore, a solution that can solve the normal application of mobile phone application software on smart TV terminals is needed.

[0048] It should be noted that a smart TV: specifically refers to a smart TV developed based on a certain operating system, and this operating system is the same as the operating system supported by mobile devices.

[0049] Host: specifically refers to the host APP developed for mobile phones, that is, the application software mentioned above. This software is developed for mobile devices of a certain operating system during the development stage, and can be mobile application software, browsers, etc. It should be noted that although the application software can be installed on mobile devices and smart TV devices, the mobile device and the smart TV device need to be developed based on the same operating system.

[0050] Plugin: specifically refers to the plugin APP.

[0051] Four major components: The four major components of Android are activity, service, content provider, and broadcast receiver;

[0052] Among them, Activity (activity): Activity is the basic unit of an Android application and the main interface with which users interact. Each Activity provides a view (View) for interacting with users.

[0053] Service (service): Service is a component that performs long-running operations in the background without providing a user interface. Service can perform operations when the user is not interacting with the application, such as playing music or downloading data from the network.

[0054] Content Provider: A Content Provider is a component that allows applications to access and share data. By using a Content Provider, an application can read and write data from other applications.

[0055] Broadcast Receiver: A Broadcast Receiver is a component used to receive broadcast notifications sent by the system or applications. It can be used to receive system notifications such as low battery, insufficient memory, etc., and can also be used to receive custom broadcast notifications.

[0056] Figure 1b The following is a schematic flow diagram of a software upgrade method provided by an embodiment of this application. As Figure 1b shown, the method includes:

[0057] Step 101: Install a mobile application software suitable for mobile devices in the smart TV device.

[0058] Step 102: Download the upgrade software package suitable for the mobile device into the smart TV device.

[0059] Step 103: Use the management plugin included in the mobile application software to parse the upgrade software package to obtain at least one upgrade plugin that meets the upgrade requirements of the smart TV device.

[0060] Step 104: Use the upgrade plugin to upgrade the mobile application software in the smart TV device.

[0061] In practical applications, the mobile application software in the above solution can be various different types of mobile application software. For example, mobile game software, mobile live broadcast software, mobile browsers, and other various types of software developed for mobile phones. Since both mobile devices and smart TV devices are developed based on the same operating system, these mobile application software can often also be used on smart TVs with the same operating system.

[0062] For the convenience of users and to obtain a better viewing experience with a larger viewing field of view, these mobile application software are installed in the smart TV device. When technicians develop mobile application software, many configuration parameters are set to meet the needs of mobile devices, and some are difficult to meet the requirements of smart TV devices. During the use of the application software, there will inevitably be a need to upgrade the mobile application software in the smart TV, such as the need to change the skin, optimize a certain lag problem, etc.

[0063] However, when the upgrade software package for meeting the upgrade requirements was developed, it was developed for mobile devices. After being often downloaded to smart TV devices, it could not be parsed, resulting in software upgrade failure. Therefore, the technical solution of this application adopts the method of parsing and upgrading with the upgrade software package. That is, the content included in the upgrade software package is further divided into independent upgrade plugins with different functions. Furthermore, these independent upgrade plugins are used to replace the target plugins in the original mobile application software, so that the upgrade plugins can be directly called when the application is started to meet the upgrade requirements.

[0064] Through the above solution, after the mobile application software is installed on the smart TV device, the upgrade software package of the mobile application software is parsed by means of plugin processing, avoiding the problem of upgrade failure caused by using the overall upgrade software package.

[0065] In one or more embodiments of this application, before using the preset plugin tool to parse the upgrade software package, it further includes: in the smart TV device, using the upgrade software package to upgrade the mobile application software; where the upgrade software package is a software package for upgrading the mobile application software in the mobile device; if the upgrade fails, then call the preset plugin tool to parse.

[0066] In practical applications, the mobile application software is developed for mobile devices, and the corresponding upgrade software package is also developed for mobile phones. That is, there is a problem of mismatch between the upgrade software package and the parameters of the smart TV device. It may also be that it cannot be parsed due to insufficient internal space; the interface timeout caused by network DNS parsing when loading a large upgrade software package. Especially for mobile game software, since the game software itself is relatively large, generally several gigabytes in size, its upgrade software package is also relatively large, generally about 2 gigabytes. Therefore, the method of directly upgrading with the upgrade software package has relatively high requirements for the network and smart TV devices.

[0067] In the technical solution of this application, when the upgrade software package cannot be directly upgraded, the plugin-based upgrade method can be adopted. That is, different functional modules included in the upgrade software package are respectively upgraded as independent upgrade plugins.

[0068] If some smart TVs support the method of directly upgrading with the upgrade software package, of course, the plugin-based upgrade solution can also not be adopted. Through the above solution, multiple options are provided for software upgrade, which can meet the diverse software upgrade requirements of smart TVs.

[0069] In one or more embodiments of the present application, installing a mobile application software suitable for mobile devices in a smart TV device includes: when downloading the mobile application software to the mobile device, if the mobile device cannot meet the user's application requirements for the mobile application software after the mobile application software is installed on the mobile device, receiving the user's installation request; based on the installation request, obtaining the mobile application software from the mobile device; and installing the mobile application software in the smart TV device.

[0070] After the user installs the mobile application software on the mobile device, the mobile application software will be normally used on the mobile device. During the use process, if the user finds that the mobile device cannot meet the user's usage requirements, the user can choose to install the mobile application software on the smart TV device. There are various ways for the smart TV device to obtain the mobile application software. For example, the user can control the smart TV device to connect to the network and directly download it from the network; for another example, the user can download the mobile application software to the mobile phone, and then send the software on the mobile phone side to the smart TV device through the internal network or other means (such as Bluetooth, etc.). After the smart TV obtains the mobile application software, it can be directly installed.

[0071] The host APK in the installed mobile application software will not be upgraded or changed. The mobile application software also includes a management plugin and a target plugin. Among them, the management plugin is used to control the parsing, loading, and upgrading of the plugin. When the mobile application software is first installed, it carries two files, namely the management plugin YTSAppPlatform.apk and the target plugin native.apk (the game whole package APK). Among them, YTSAppPlatform.apk is responsible for the management and upgrading of the plugin, and native.apk is the game whole package APK. In terms of plugin management, YTSAppPlatform.apk provides a dynamic update mechanism. When there is an update other than the framework, it will update its own APK file. The purpose of doing this is to maintain compatibility with the latest plugin version and ensure the stability and security of the system. In terms of game APK upgrade, since the game APK may be provided by a third party, they may need to be managed and upgraded through the platform of the host APK. Through the management of YTSAppPlatform.apk, the automatic update and upgrade of the plugin-based game can be realized without the need to be permitted by the platform, which can ensure that players obtain the latest version of the game experience. In summary, YTSAppPlatform.apk is a host APK platform for managing plugins and realizing dynamic updates. Through it, the stability and security of the system can be ensured, and at the same time, the latest version of the game experience can be provided for players, effectively avoiding the problem that the upgrade software package cannot be directly upgraded.

[0072] In one or more embodiments of the present application, parsing the upgrade software package by using a management plugin included in the mobile phone application software to obtain at least one upgrade plugin that meets the upgrade requirements of the smart TV device includes: parsing the upgrade software package to obtain plugin processing information; generating at least one upgrade plugin based on the plugin processing information; and establishing a corresponding relationship between the upgrade plugin and the mobile phone application software through a main program interface, so that the upgrade plugin meets the upgrade requirements of the smart TV device.

[0073] In practical applications, when the upgrade package arrives, the management plugin YTSAppPlatform.apk is responsible for parsing this package. This includes reading the content inside the package, verifying its integrity and security, and extracting the key information therein. Furthermore, based on the parsing results, YTSAppPlatform.apk will create or update the corresponding upgrade plugins as needed, and these upgrade plugins are independent plugins. This generation process may involve extracting the code, resources, and other components in the upgrade software package, such as at least one of program information, resource files, plugin decompression directories, plugin resources, and class loaders. And new independent plugins with different functions are generated according to the architecture specifications of the application program.

[0074] When the management plugin executes the task of establishing the upgrade plugin, it should be established according to the target plugin included in the previously installed mobile phone application software. Specifically, when generating the upgrade plugin, it can be named differently, and the naming rule is the same as that of the target plugin, so as to easily establish the corresponding relationship between the upgrade plugin and the target plugin included in the mobile phone application software. In order to facilitate the subsequent upgrade process, it is easy to implement plugin replacement. Improve the upgrade efficiency of the mobile phone application software on the smart TV device side.

[0075] It should be noted that in the mobile phone application software, there are target plugins that implement different functions, and these target plugins are usually plugins with a relatively high update frequency. For example, the target plugin corresponding to the skin function.

[0076] In one or more embodiments of the present application, upgrading the mobile phone application software in the smart TV device by using the upgrade plugin includes: after determining that the upgrade plugin and the target plugin establish a corresponding relationship, replacing the target plugin with at least one of the upgrade plugins; and when starting the application software, executing the upgrade plugin in the mobile phone application software.

[0077] In practical applications, it is necessary to determine the correspondence between the upgrade plugin and the target plugin. This usually involves comparing their content, version information, or other identifiers to ensure that the matching upgrade plugin can correctly replace the target plugin. According to the established correspondence, select the appropriate upgrade plugin to replace the target plugin. This involves reading the target plugin and deleting or replacing it with the corresponding upgrade plugin. After the replacement is completed, the upgraded application software should be saved to the storage medium, and its integrity and correctness should be verified. Ensure that all content is correctly updated and saved. When the application software needs to be run, load the upgraded application software package. During the execution process, the upgrade plugin will be loaded and executed according to the preset logic to ensure the smooth operation of the application. If there are multiple upgrade plugins, the system can dynamically select and load the corresponding plugins as needed to achieve dynamic updates and function expansions of the application.

[0078] In this way, the upgrade plugin can be used to replace the target plugin, and it is ensured that these upgrade plugins are correctly executed when the application starts. This helps to achieve flexible updates and maintenance of the application, while providing a better user experience and function extensibility.

[0079] In one or more embodiments of the present application, when starting the application software, executing the upgrade plugin in the main program package includes: the application software obtains a placeholder page registered with an application object containing metadata provided by the system; when starting the application software to execute the upgrade plugin, if the upgrade plugin jumps to a new page, the system jumps to the new page based on the registered placeholder page.

[0080] Here, the ApplicationInfo object is mainly obtained from context.getPackageManager().getPackageInf().applicationInfo of the system, and the placeholder pages of com.xy51.box.host.Activity1 to 10 pre-registered in the Manifest are obtained from it. The purpose is that when the apk in the plugin needs to jump to a page, the registration file existing in the Manifest of the mobile application software host is used to enable the system to find the corresponding activity page in the plugin that should be started. By means of pluginization, direct jumps can be achieved during startup without waiting for the upgrade of the upgrade software, which is more efficient for the upgrade of mobile application software.

[0081] Through the above solution, the upgrade software package is processed in a plug-in manner, and then dynamic update is realized based on the upgrade plug-in. The dynamic update mentioned here is a software update strategy that allows an application to automatically select and load the required update content according to specific conditions or triggers. In a plug-in architecture, different functions or components of an application are designed as independent plug-ins, and each plug-in can be updated and upgraded independently.

[0082] When a mobile game runs on a smart TV, the dynamic update mechanism can select and load the plug-in version suitable for the device according to parameters such as the current device's hardware configuration, operating system version, and screen size. For example, if a new version of the mobile game adds an adaptation function for large screens, the dynamic update mechanism can detect this change and automatically load the plug-in containing the large-screen adaptation function during runtime, without the need for the user to manually update or replace the installation package.

[0083] This dynamic update mechanism solves the problem that a smart TV cannot directly upgrade a mobile game. Since the upgrade package of a mobile game may not be fully applicable to a smart TV, it may cause parsing failures or running problems. By dividing the game content into multiple plug-ins and using the dynamic update mechanism to select and load the corresponding plug-ins according to the device environment, it can be ensured that each plug-in is compatible with the current device, thus achieving a smooth game upgrade.

[0084] The relationship between dynamic update and solving the problem that a smart TV cannot upgrade a mobile game is that dynamic update provides a flexible solution that can automatically select and load the appropriate plug-in version according to different devices and environments, thus avoiding incompatibility problems that may be caused by directly using a complete upgrade package. Through the plug-in-based dynamic update mechanism, a smart TV can smoothly receive the update content of a mobile game and ensure the best adaptability and performance of the game during runtime.

[0085] For ease of understanding, specific embodiments will be given below for illustration.

[0086] As Figure 2 is a schematic diagram of software upgrade for illustration in an embodiment of this application. It can be seen from Figure 2 that the general process is as follows:

[0087] After the Host executes the initialization (①) and loads the PluginAPK file, it will execute the PluginManager (②) logic. The PluginManager contains key information for starting the APK call, such as sResources, sApplicationInf, sClassLoader, sPackageResourcePath, and sApplicationContext. These are parsed from the PluginAPK and set in the PluginManager. After (②) is executed, the logic inside the plugin can be executed when the Host starts. When starting the internal logic of the plugin (③), when inheriting the PluginApplication, PluginActivity, PluginService, and ShadowWebView classes in the code logic, when the system calls special methods, it will call the key information in the PluginManager ②. Through this set of logic, the PluginAPK can be loaded and replaced repeatedly to start.

[0088] 1. The mobile application software HostApk is successfully installed and started on the smart TV TV. If an upgrade is required for this mobile application software at this time, proceed to step 2.

[0089] 2. Obtain the latest complete upgrade software package APK from the interface and download it to the local of the smart TV and save it to the file directory under the package name.

[0090] 3. Execute the initPlugin of SPlugin to load and parse the saved local management plugin YTSAppPlatform.apk on the smart TV. So as to use this management plugin to execute subsequent tasks.

[0091] 4. In initPlugin, use the dealHostPkgInfo method to obtain PackageManager.GET_ACTIVITIES|PackageManager.GET_SERVICES from the system's context.getPackageManager(), that is, the Activity and Service in the upgrade software package apk are saved in ActPlugin and ServicePlugin.

[0092] 5. In initPlugin, use dealPluginPkgInfo to proxy resources and activity manager in the activity. android.content.pm.PackageManager is a class in Android that provides an interface for application package information. context.getPackageManager() is a method used to obtain an instance of PackageManager. From this interface, application information of the current host can be obtained, such as application name, package name, version number, icon, etc. Here, mainly obtain the ApplicationInfo object from the system context.getPackageManager().getPackageInf().applicationInfo, and obtain the placeholder pages of Activity1 to 10 pre-registered in the Manifest from it. The purpose is that when the apk in the plugin needs to jump to a page, use the registration file existing in the Manifest in the host to enable the system to find the corresponding activity page in the plugin that should be launched.

[0093] 6. In dealPluginPkgInfo, use the system context.getPackageManager().getPackageInfoAPI to obtain signatures, sourceDir, dataDir, publicSourceDir, and nativeLibraryDir and save them in PluginManager.sApplicationInfo of the ApplicationInfo. Among them, signatures are the system's signature information, sourceDir is the path of the application's APK file, dataDir is the path of the application's data directory, publicSourceDir represents the path of public resources, and nativeLibraryDir is the directory path of the application's native libraries. Native libraries are codes written in C or C++. They can interact with Java code through JNI (Java Native Interface). These are all directories that may be called through the context.getPackageManager() method in the plugin application. Before the plugin starts, the methods in the context will be replaced with the decompression directory in the plugin. In this way, when the system runs normally, the above file directories of the plugin can be directly found and the system can run normally.

[0094] 7. In dealPluginPkgInfo, the system's packageManager.getResourcesForApplication(appInfo) method is used to obtain the Resources file of the APK and save it to PluginManager.sResources. getResourcesForApplication is used to obtain the resource files in the whole package APK (also known as the upgrade software package). The content in the res directory of an APK is the resource file. The purpose is to only obtain the resource files in the plugin APK so that the plugin can normally obtain the resource files through the standard getResources() method.

[0095] 8. In the dealPlugin method, the system's DexClassLoader method is used to obtain the mClassLoader bytecode resource of the APK and save it to PluginManager.sClassLoader.

[0096] 9. At the same time, a loadedApk class is created with the ApkPath, ApplicationInfo, PackageInfo, Classloader, and Resource information obtained above for replacement when the system context is obtained. When running normally in the whole package (plugin), resources are loaded and the ClassLoader bytecode file is obtained through the context class. Usually, the resources required by the system's API context's getResources(), getClassLoader(), getApplicationInfo(), and getPackageManager() are set by the system after the APK is installed, and are directly obtained when starting next time.

[0097] In the solution of this application, the plugin apk is decompressed and released in an APK so that it can continue to run normally in this APP. The advantage of this is that the plugin APK can be dynamically upgraded every time it is started.

[0098] 10. In dealPluginPkgInfo, hookPMS is used to replace the getApplicationInfo and getPackageInfo information to be loaded from the APK after startup.

[0099] 11. Execute AppPlugin.dealPluginApp to start the normal startup operation logic of simulating the Application lifecycle of the whole package plugin APK. Invoke attach and onCreate() in the system Application through reflection to execute the code logic in the whole package plugin APK. Briefly, when a normal APK starts, it will first execute onCreate() in the Application, then execute onCreate() in the activity page, and then it's okay. Here, after all the above methods are executed, the onCreate in the plugin will be manually executed. Generally, this contains the global initialization logic of an app. The method AppPlugin.dealPluginApp and all the methods in Stvplugin are for decompressing the APK and replacing resources.

[0100] 12. Use RecPlugin.dealPluginReceiver to save the receiver logic in the AndroidManifest.xml resource file in the loaded APK into the List sBroadcastReceiverList. RecPlugin.dealPluginReceiver is used to obtain the declared BroadcastReceiver in the plugin, and then manually register it in host's context.getApplicationContext().registerReceiver to ensure the logical integrity of the plugin.

[0101] 13. Use ActPlugin.obtainPluginActivity(pInfo); to load the Activity information in the AndroidManifest.xml resource file in the APK.

[0102] 14. Use ServicePlugin.obtainPluginService(pInfo) to load the Service information in the AndroidManifest.xml resource file in the APK.

[0103] 15. Use ProPlugin.getInstance().dealPluginProvider to load the Provider information in the AndroidManifest.xml resource file in the APK.

[0104] 16. After all the information is loaded, you can use the ActPlugin.startActivity method to jump to the first activity entry page of the game.

[0105] Subsequently, when other pages of the APK are jumped to, the required information such as mResource, mApplicationInfo, pInfo, mClassloader, apkPath, and application of the plugin will be automatically obtained from the LoadedApk entity class in the replaced PluginContext.

[0106] Therefore, the above steps 1 to 3 are the work done after the host app is installed on the TV and started. Download the whole package APK (plugin APK).

[0107] Steps 4 to 11 are the processing of the plugin APK PluginContext. The plugin will use the information in Resources, mApplicationInfo, mClassLoader, and loadedApk mentioned above during normal operation. These resources will be processed internally by the system during normal operation. Here, I have integrated the entire process into one APK. It is equivalent to having the HOSTAPK release and process the resource parsing of the plugin. The advantage of this is that the plugin can be dynamically updated before the next startup.

[0108] Steps 12 to 15 are all the processing of the AndroidManifest.xml file. Parse the information of the four major components declared in the plugin: Activity, Service, BroadcastReceiver, and ContentProvider. These are all the information that will be used if declared inside the plugin app. Here, I need to register them into the system service so that the app can obtain them normally during runtime.

[0109] In summary, this text describes a dynamic application architecture implemented through plugin technology. It allows the main application to load different plugins as needed and uses a central PluginManager to manage and coordinate the runtime environment of the plugins. This design is very useful for building highly extensible and modular applications.

[0110] Figure 3 The following is a schematic structural diagram of a software upgrade device provided by an embodiment of the present application. The device may include:

[0111] An installation module 31, configured to install a mobile application software suitable for mobile devices in a smart TV device.

[0112] A download module 32, configured to download an upgrade software package applicable to the mobile device to the smart TV device.

[0113] An analysis module 33, configured to analyze the upgrade software package to obtain at least one upgrade plugin that meets the upgrade requirements of the smart TV device.

[0114] An upgrade module 34, configured to use the upgrade plugin to upgrade the mobile application software in the smart TV device.

[0115] An upgrade module 34, configured to use the upgrade software package to upgrade the mobile application software in the smart TV device; wherein, the upgrade software package is a software package for upgrading the mobile application software in the mobile device.

[0116] If the upgrade fails, call the preset plugin tool for analysis.

[0117] An installation module 31, configured to, when downloading the mobile application software to the mobile device, if the mobile device cannot meet the user's application requirements for the mobile application software after the mobile application software is installed on the mobile device, receive the user's installation request.

[0118] Based on the installation request, obtain the mobile application software from the mobile device.

[0119] Install the mobile application software in the smart TV device.

[0120] An analysis module 33, configured to analyze the upgrade software package to obtain plugin processing information.

[0121] Based on the plugin processing information, generate at least one upgrade plugin.

[0122] Through the main program interface, establish a corresponding relationship between the upgrade plugin and the application program, so that the upgrade plugin meets the upgrade requirements of the smart TV device.

[0123] An analysis module 33, configured to parse and obtain plugin processing information through the main program interface, where the plugin processing information includes at least one of the program information of the mobile application software, resource files, plugin extraction directory, plugin resources, and class loader.

[0124] The generating at least one upgrade plugin based on the plugin processing information includes:

[0125] Based on at least one of the program information of the mobile application software, resource files, plugin extraction directory, plugin resources, and class loader, generate at least one upgrade plugin.

[0126] An upgrade module 34, configured to, after determining that the upgrade plug-in establishes a corresponding relationship with the mobile phone application software, use at least one of the upgrade plug-ins to replace a target plug-in in the mobile phone application software;

[0127] When the mobile phone application software is started, execute the upgrade plug-in in the main program package.

[0128] An upgrade module 34, for the mobile phone application software to obtain a placeholder page registered by an application object including metadata provided by the system;

[0129] When starting to execute the upgrade plug-in in the mobile phone application software, if the upgrade plug-in jumps to a new page, the system jumps to the new page based on the registered placeholder page.

[0130] For the relevant implementation manners of the constituent units involved in the embodiments of the present device, reference may be made to the foregoing content, which will not be elaborated herein.

[0131] The present application further provides an intelligent television device, including: a memory and a processor; wherein, an executable code is stored on the memory, and when the executable code is executed by the processor, the processor is caused to execute the foregoing software upgrade method.

[0132] The present application further provides a system, including a processor and a memory, and at least one instruction, at least one program, a code set or an instruction set is stored in the memory, and the at least one instruction, at least one program, the code set or the instruction set is loaded and executed by the processor to execute the foregoing software upgrade method.

[0133] The present application further provides a computer-readable medium, on which at least one instruction, at least one program, a code set or an instruction set is stored, and the at least one instruction, at least one program, the code set or the instruction set is loaded and executed by a processor to implement the foregoing software upgrade method.

[0134] The device embodiments described above are merely illustrative, and the various modules described as separate components may or may not be physically separated. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative efforts.

[0135] As needed, the systems, methods, and apparatuses of the embodiments of the present application can be implemented as pure software (e.g., a software program written in Java), can be implemented as pure hardware as needed (e.g., a dedicated ASIC chip or an FPGA chip), or can also be implemented as a system combining software and hardware (e.g., a firmware system storing fixed code or a system with a general-purpose memory and a processor).

[0136] The embodiments of the present application have been described above. The above description is exemplary and not exhaustive, and is also not limited to the disclosed embodiments. Many modifications and variations are obvious to those of ordinary skill in the art in the technical field without departing from the scope and spirit of the described embodiments. The scope of the claimed subject matter is defined only by the appended claims.

Claims

1. A software upgrade method, characterized in that: The method comprises: Installing mobile application software suitable for mobile devices in smart TV devices; the mobile application software includes management plug-ins and target plug-ins for realizing different functions; Downloading an upgrade software package applicable to the mobile phone device to the smart TV device; In the smart TV device, the mobile phone application software is upgraded using the upgrade software package; wherein the upgrade software package is a software package for upgrading the mobile phone application software in the mobile phone device; If the upgrade fails, the upgrade software package is parsed using the management plug-in included in the mobile phone application software to obtain plug-in processing information; Based on the plug-in processing information, generating at least one upgrade plug-in; Through the main program interface, a corresponding relationship is established between the upgrade plug-in and the target plug-in, and the target plug-in is replaced with at least one of the upgrade plug-ins; When the mobile phone application software is started, the upgrade plug-in is executed in the mobile phone application software.

2. The method according to claim 1, characterized in that The step of installing the mobile application software suitable for the mobile device in the smart TV device includes: After the mobile phone application software is downloaded to the mobile phone device, if the mobile phone device cannot meet the user's application requirements for the mobile phone application software after the mobile phone application software is installed on the mobile phone device, receiving the user's installation request; Based on the installation request, obtaining the mobile application software from the mobile device; Install the mobile phone application software in the smart TV device.

3. The method according to claim 1, characterized in that The step of parsing the upgrade software package using the management plug-in included in the mobile phone application software to obtain plug-in processing information includes: Obtaining plug-in processing information through the main program interface analysis, wherein the plug-in processing information includes: at least one of the program information of the mobile phone application software, resource files, plug-in decompression directory, plug-in resources and class loader; The generating at least one upgrade plug-in based on the plug-in processing information includes: At least one upgrade plug-in is generated based on at least one of the program information, resource files, plug-in decompression directory, plug-in resources and class loader of the mobile phone application software.

4. The method according to claim 1, characterized in that: When the mobile phone application software is started, executing the upgrade plug-in in the machine application software includes: The mobile phone application software registers a placeholder page with an application object containing metadata provided by the system; When the mobile phone application software is started to execute the upgrade plug-in, if the upgrade plug-in jumps to a new page, the system jumps to the new page based on the registered placeholder page.

5. A software upgrade device, characterized in that: The device comprises: An installation module, used to install mobile application software suitable for mobile devices in the smart TV device; the mobile application software includes a management plug-in and a target plug-in for realizing different functions; A download module, used to download an upgrade software package suitable for the mobile phone device to the smart TV device; An upgrade module, used to upgrade the mobile phone application software in the smart TV device using the upgrade software package; wherein the upgrade software package is a software package for upgrading the mobile phone application software in the mobile phone device; if the upgrade fails, calling the parsing module; A parsing module, configured to parse the upgrade software package using the management plug-in included in the mobile phone application software to obtain plug-in processing information; generate at least one upgrade plug-in based on the plug-in processing information; establish a corresponding relationship between the upgrade plug-in and the target plug-in through a main program interface, and replace the target plug-in with at least one upgrade plug-in; The upgrade module is also used to execute the upgrade plug-in in the mobile phone application software when the mobile phone application software is started.

6. A smart television, comprising: A memory and a processor; wherein the memory stores executable code, and when the executable code is executed by the processor, the processor executes the method as claimed in any one of claims 1 to 4.

7. A computer-readable medium having stored thereon at least one instruction, at least one program, code set or instruction set, wherein the at least one instruction, at least one program, code set or instruction set is loaded and executed by a processor to implement the method as claimed in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Application program updating method and device and network television playing software updating system

    CN115297366A