A method and apparatus for updating pre-built plugins
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-14
- Publication Date
- 2026-08-14
AI Technical Summary
[0004]本发明实施例提供一种预置插件更新的方法及装置,以解决现有的预置插件的更新需要网关恢复出厂设置,增加了平台人员的维护成本,导致网关升级之前已安装的第三方插件丢失,无法保障用户正常业务使用的问题
[0017]在本发明中,实现智能网关预置插件的按需更新,并且不影响第三方插件的使用,更新过程无需人工参与,实现插件更新和网关固件升级的解耦。
Smart Images

Figure CN116962172B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of data service technology, and in particular to a method and apparatus for updating pre-built plug-ins. Background Technology
[0002] With the development and popularization of smart home technology, the home gateway, as the core component of the home network, has the important ability to handle device access to the network and data forwarding. In addition, the home gateway can also provide users with additional services by extending third-party plugins. Generally, the plugins running on a home gateway can be categorized into pre-installed plugins and third-party plugins.
[0003] In the existing technology, operators update pre-installed plugins by pre-installing the plugin installation package into the firmware version to be upgraded on the gateway. After the remote platform performs a centralized upgrade on the gateway, the plugin in the new firmware is activated by restoring the factory settings. However, each update of the pre-installed plugin involves restoring the gateway to factory settings before it takes effect, which increases the maintenance cost for platform personnel. Furthermore, restoring the factory settings will cause the loss of third-party plugins installed before the gateway upgrade, which cannot guarantee the normal use of users' services. Summary of the Invention
[0004] This invention provides a method and apparatus for updating pre-installed plugins, which solves the problem that updating existing pre-installed plugins requires restoring the gateway to factory settings, increasing the maintenance costs for platform personnel, and causing the loss of third-party plugins installed before the gateway upgrade, thus failing to guarantee normal business use for users.
[0005] To solve the above-mentioned technical problems, the present invention is implemented as follows: In a first aspect, embodiments of the present invention provide a method for updating a pre-configured plug-in, applied to a smart gateway, comprising: Obtain a new firmware package sent by the remote update platform; the new firmware package includes: a new version of the pre-installed plugin and a plugin decoupling marker file; the plugin decoupling marker file is used to mark whether the pre-installed plugin is updated according to the plugin decoupling function; Load plugins from the cache; the cached plugins include older versions of pre-installed plugins; If the plugin decoupling marker file marks the preset plugin as being updated according to the plugin decoupling function, the plugin decoupling function is used to update the old version of the preset plugin according to the new version of the preset plugin.
[0006] Optionally, the plug-in decoupling function includes: Obtain the new version of the pre-installed plugins and delete the plugin decoupling tag file; the new version of the pre-installed plugins includes: the number of new version pre-installed plugins and the configuration information of the new version pre-installed plugins; the configuration information of the new version pre-installed plugins includes: the name and version number of the new version pre-installed plugins; Determine whether the version number of the new version of the pre-installed plugin is greater than the version number of the old version of the pre-installed plugin; If the version number of the new version of the pre-installed plugin is greater than the version number of the old version of the pre-installed plugin, then delete the old version of the pre-installed plugin and install the new version of the pre-installed plugin. If the version number of the new version of the pre-installed plugin is less than or equal to the version number of the old version of the pre-installed plugin, then the new version of the pre-installed plugin will not be installed.
[0007] Optionally, obtaining the new version of the pre-installed plugin includes: Get the number of pre-installed plugins in the new version; The configuration information of the new version's pre-installed plugins is obtained multiple times using the attribute acquisition tool, based on the number of pre-installed plugins.
[0008] Optionally, the cached plugins may also include older versions of third-party plugins. When using the plugin decoupling function, the older versions of third-party plugins are not processed.
[0009] Secondly, embodiments of the present invention provide a method for updating a pre-configured plugin, applied to a remote update platform, comprising: Configure the updated firmware package; the updated firmware package includes: a new version of the pre-installed plugins; A plugin decoupling marker file is created in the updated firmware package to obtain a new firmware package; the plugin decoupling marker file is used to mark whether the preset plugins are updated according to the plugin decoupling function; The new firmware package is then sent to the smart gateway.
[0010] Thirdly, embodiments of the present invention provide a smart gateway, comprising: The acquisition module is used to acquire new firmware packages sent by the remote update platform; the new firmware package includes: a new version of the pre-installed plugin and a plugin decoupling marker file; the plugin decoupling marker file is used to mark whether the pre-installed plugin is updated according to the plugin decoupling function; The first processing module is used to load plugins from the cache; the plugins in the cache include older versions of pre-installed plugins. The second processing module is used to update the old version of the preset plugin according to the new version of the preset plugin if the preset plugin is updated according to the plugin decoupling function by the plugin decoupling function.
[0011] Optionally, the second processing module includes: The first acquisition submodule is used to acquire the new version of the pre-installed plugins and delete the plugin decoupling tag file; the new version of the pre-installed plugins includes: the number of new version pre-installed plugins and the configuration information of the new version pre-installed plugins; the configuration information of the new version pre-installed plugins includes: the name and version number of the new version pre-installed plugins; The first processing submodule is used to determine whether the version number of the new version of the preset plugin is greater than the version number of the old version of the preset plugin; if the version number of the new version of the preset plugin is greater than the version number of the old version of the preset plugin, then the old version of the preset plugin is deleted and the new version of the preset plugin is installed; if the version number of the new version of the preset plugin is less than or equal to the version number of the old version of the preset plugin, then the new version of the preset plugin is not installed.
[0012] Optionally, the first acquisition submodule includes: The second submodule is used to obtain the number of pre-installed plugins in the new version; The second processing submodule is used to obtain the configuration information of the new version of the pre-installed plugins multiple times using the attribute acquisition tool according to the number of pre-installed plugins.
[0013] Optionally, the cached plugins may also include older versions of third-party plugins. When using the plugin decoupling function, the older versions of third-party plugins are not processed.
[0014] Fourthly, embodiments of the present invention provide a remote update platform, including: The configuration module is used to configure the update firmware package; the update firmware package includes: a new version of the pre-installed plugin; The third processing module is used to create a plugin decoupling marker file in the updated firmware package to obtain a new firmware package; the plugin decoupling marker file is used to mark whether the preset plugins are updated according to the plugin decoupling function; The sending module is used to send the new firmware package to the smart gateway.
[0015] Fifthly, embodiments of the present invention provide an electronic device, including a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein when the program or instructions are executed by the processor, they implement the method for updating a preset plug-in as described in the first aspect, or the steps in the method for updating a preset plug-in as described in the second aspect.
[0016] In a sixth aspect, embodiments of the present invention provide a readable storage medium, characterized in that: a program or instructions are stored on the readable storage medium, and when the program or instructions are executed by a processor, they implement the method for updating a preset plug-in as described in the first aspect, or the steps in the method for updating a preset plug-in as described in the second aspect.
[0017] In this invention, the pre-installed plugins of the smart gateway are updated on demand without affecting the use of third-party plugins. The update process does not require manual intervention, thus decoupling plugin updates and gateway firmware upgrades. Attached Figure Description
[0018] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 This is a flowchart of a method for updating a pre-installed plugin in a smart gateway, provided by an embodiment of the present invention; Figure 2 This is a flowchart illustrating a method for obtaining plugin information in a smart gateway for updating pre-installed plugins, as provided in an embodiment of the present invention. Figure 3 This is a schematic diagram of the overall structure of a method for updating a pre-installed plugin provided in an embodiment of the present invention; Figure 4 This is a general flowchart of a method for updating a pre-built plugin provided in an embodiment of the present invention; Figure 5 This is a flowchart of a method for updating a pre-built plugin applied to a remote update platform, provided by an embodiment of the present invention; Figure 6 This is a flowchart illustrating the creation of a plugin decoupling marker file in a method for updating a pre-configured plugin according to an embodiment of the present invention. Figure 7 This is a schematic diagram of the structure of a smart gateway provided in an embodiment of the present invention; Figure 8 This is a schematic diagram of the structure of a remote update platform provided in an embodiment of the present invention; Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0020] Please refer to Figure 1 This invention provides a method for updating pre-configured plugins, applied to a smart gateway, comprising: Step 11: Obtain the new firmware package sent by the remote update platform; the new firmware package includes: a new version of the pre-installed plugin and a plugin decoupling marker file; the plugin decoupling marker file is used to mark whether the pre-installed plugin is updated according to the plugin decoupling function; In this embodiment of the invention, after the smart gateway updates its firmware according to the new firmware package, it needs to update the pre-installed plugins in the smart gateway.
[0021] Step 12: Load the cached plugins; the cached plugins include older versions of pre-installed plugins; In this embodiment of the invention, since the plugin is deleted due to the smart gateway update, it is necessary to load the plugin from the cache, loading the old version of the pre-installed plugin and the old version of the third-party plugin for subsequent use. In the prior art, after the smart gateway is updated, it is necessary to restore the factory settings, which affects the use of the third-party plugin. However, when the plugin decoupling function is used, the old version of the third-party plugin is not processed, reducing manual operation and improving the user experience.
[0022] Step 13: If the plugin decoupling marker file marks the preset plugin as being updated according to the plugin decoupling function, the old version of the preset plugin is updated according to the new version of the preset plugin using the plugin decoupling function.
[0023] In this embodiment of the invention, the plugin decoupling function only updates the preset plugins as needed, decoupling them from third-party plugins, and the update process does not affect the third-party plugins.
[0024] In this embodiment of the invention, the pre-installed plugins of the smart gateway are updated on demand without affecting the use of third-party plugins. The update process does not require manual intervention, thus decoupling plugin updates and gateway firmware upgrades.
[0025] In this embodiment of the invention, optionally, the plug-in decoupling function includes: Obtain the new version of the pre-installed plugins and delete the plugin decoupling tag file; the new version of the pre-installed plugins includes: the number of new version pre-installed plugins and the configuration information of the new version pre-installed plugins; the configuration information of the new version pre-installed plugins includes: the name and version number of the new version pre-installed plugins; In this embodiment of the invention, deleting the plug-in decoupling marker file is to ensure that the plug-in decoupling process is not entered again when the smart gateway restarts next time.
[0026] Determine whether the version number of the new version of the pre-installed plugin is greater than the version number of the old version of the pre-installed plugin; If the version number of the new version of the pre-installed plugin is greater than the version number of the old version of the pre-installed plugin, then delete the old version of the pre-installed plugin and install the new version of the pre-installed plugin. If the version number of the new version of the pre-installed plugin is less than or equal to the version number of the old version of the pre-installed plugin, then the new version of the pre-installed plugin will not be installed.
[0027] In this embodiment of the invention, before installing the new version of the pre-installed plugin, it is determined whether the pre-installed plugin is already in the currently running plugin list; if it is not in the currently running plugin list, it means that it is a new pre-installed plugin and can be installed normally; if it is already in the currently running plugin list, the version information of the plugin with the same name in the installed plugin list is determined to ensure that it is updated as needed.
[0028] Please refer to Figure 2 In this embodiment of the invention, optionally, obtaining the new version of the preset plugin includes: Get the number of pre-installed plugins in the new version; The configuration information of the new version's pre-installed plugins is obtained multiple times using the attribute acquisition tool, based on the number of pre-installed plugins.
[0029] In this embodiment of the invention, the number of preset plugins is obtained by reading the directory under the file corresponding to the preset plugin; The loop iterates through the number of plugins, retrieving the name of each pre-built plugin JAR file using the plugin's getName method; that is, the loop retrieves the name of the pre-built plugin JAR file as many times as the number of plugins. After obtaining the name object of the pre-built plugin JAR file, the plugin's attribute object is obtained through the corresponding interface method of the plugin; specifically, the plugin's attribute object is obtained through getMainAttributes under getManifest. The plugin name and version number are obtained by calling the corresponding interface method of the plugin based on the plugin's property object; specifically, the plugin's getValue method is called to obtain the fields in the corresponding MANIFEST.MF file, such as the plugin name: Bundle-SymbolicName and the plugin version number: Bundle-Version.
[0030] Please refer to Figure 3 In this embodiment of the invention, the remote update platform, i.e., the RMS platform, specifically includes: a plugin platform and a TR069 platform; the plugin platform is used to manage third-party plugins; and the TR069 platform is used to issue gateway upgrade or factory reset tasks.
[0031] The smart gateway includes: a PLUGIN_PROCESS module, used to forward JSON messages and parse plugin instructions issued by the plugin management module; a TR069 module, used to receive and execute tasks issued by the TR069 platform; an OSGI framework module, used to provide a runtime environment for plugins and manage plugins, enabling functions such as plugin installation, update, startup, shutdown, and uninstallation; wherein, the OSGI framework module specifically includes: management plugins, service plugins, pre-built plugins, third-party plugins, OSCG-Felix, TVM, and JNI (Java Native Interface, using Java native interfaces to write programs); an OSGI support service module, used to check if the OSGI module has exited abnormally and restart the OSGI module when necessary, and can also forward JSON messages; and an upgrade and factory reset module, used for gateway firmware upgrades and factory resets.
[0032] Please refer to Figure 4 The specific process for updating the pre-installed plugins is as follows: Platform maintenance personnel can perform remote upgrades by operating the gateway through the TR069 platform. After receiving the remote upgrade command issued by the remote update platform, the TR069 module of the smart gateway calls the upgrade and factory reset module to perform firmware upgrade; After the smart gateway is successfully upgraded, the OSGI support service module sends a pre-installation command to the management plugin. The plugin management module loads previously installed plugins from the corresponding path / usr / data / o_ins / felix-cache cache directory; that is, it loads the cached plugins; the cached plugins include older versions of pre-installed plugins and older versions of third-party plugins. Check if the plugins in the corresponding path / usr / data / o_ins / felix-cache cache directory have been loaded successfully; If unsuccessful, continue waiting for the plugin to install; if successful, the plugin manager will continue to check if a plugin decoupling tag file exists. If it does not exist, the plugin decoupling function will not be executed; If it exists, the plugin decoupling function is executed. The plugin management function reads the number of pre-installed plugins and plugin information of the new firmware version, and deletes the decoupling marker file to ensure that the plugin decoupling process is not entered again during the next gateway restart. The plugin management function determines whether the plugin is already in the list of currently running plugins. If it does not exist, obtain the plugin installation package through the plugin management and call the install method to install the plugin; If it exists, the version information of the pre-installed plugin for the new firmware version and the plugin with the same name in the list of installed plugins will be read through the plugin management; By managing plugins, determine whether the plugin version number of the new firmware version is greater than the version number of the plugin with the same name in the installed list; If the plugin version number of the new firmware version is not greater than the version number of the plugin with the same name in the installed list, then the installed plugin with the same name will continue to run. If the plugin version number of the new firmware version is greater than the version number of the plugin with the same name in the installed list, the plugin management calls the uninstall method to uninstall the already installed plugin with the same name, and then calls the install method to reinstall the new pre-installed plugin with the greater version number.
[0033] In this embodiment of the invention, the pre-built plugins of the gateway are updated on demand, and the updates of the pre-built plugins no longer affect the use of third-party plugins; moreover, no manual intervention is required, which reduces the maintenance costs of platform personnel and ensures the user experience.
[0034] In this invention, the pre-installed plugins of the smart gateway are updated on demand without affecting the use of third-party plugins. The update process does not require manual intervention, thus decoupling plugin updates and gateway firmware upgrades.
[0035] Please refer to Figure 5 This invention provides a method for updating pre-configured plugins, applied to a remote update platform, comprising: Step 51: Configure the updated firmware package; the updated firmware package includes: a new version of the pre-installed plugin; Step 52: Create a plugin decoupling tag file in the updated firmware package to obtain a new firmware package; the plugin decoupling tag file is used to mark whether the preset plugins are updated according to the plugin decoupling function; In this embodiment of the invention, the process of creating the plug-in decoupling marker file is described in the following reference: Figure 6First, the script for creating the file is run; then, it checks whether the plugin reinstallation function is enabled, i.e., whether the FORCE_REINSTALL_PLUGIN macro is enabled; if it is not enabled, the plugin decoupling tag function is not executed; if it is enabled, the touch processing command is used to create the ForceReinstallNeed decoupling tag file in the directory / usr / local / osgi / local corresponding to the gateway; then, the execution permissions of the decoupling tag file are set, i.e., the chmod command is used to change the file attributes and grant the ForceReinstallNeed decoupling tag file execution permissions.
[0036] In this embodiment of the invention, the decoupling tag file can be flexibly selected. That is, the plug-in decoupling function can be enabled in gateways that can use or allow the use of decoupling tag files; in gateways that cannot use or do not allow the use of decoupling tag files, the old method can be used to update the plug-in.
[0037] Step 53: Distribute the new firmware package to the smart gateway.
[0038] In this embodiment of the invention, the pre-built plugins of the gateway are updated on demand by setting a decoupling tag file, and the update of the pre-built plugins no longer affects the use of third-party plugins; moreover, no manual intervention is required, which reduces the maintenance cost of platform personnel and ensures the user experience.
[0039] Please refer to Figure 7 This invention provides a smart gateway, comprising: The acquisition module 71 is used to acquire a new firmware package sent by the remote update platform; the new firmware package includes: a new version of the pre-installed plugin and a plugin decoupling marker file; the plugin decoupling marker file is used to mark whether the pre-installed plugin is updated according to the plugin decoupling function; The first processing module 72 is used to load plugins from the cache; the plugins in the cache include older versions of pre-installed plugins. The second processing module 73 is used to update the old version of the preset plugin according to the new version of the preset plugin if the preset plugin is updated according to the plugin decoupling function.
[0040] In this embodiment of the invention, optionally, the second processing module includes: The first acquisition submodule is used to acquire the new version of the pre-installed plugins and delete the plugin decoupling tag file; the new version of the pre-installed plugins includes: the number of new version pre-installed plugins and the configuration information of the new version pre-installed plugins; the configuration information of the new version pre-installed plugins includes: the name and version number of the new version pre-installed plugins; The first processing submodule is used to determine whether the version number of the new version of the preset plugin is greater than the version number of the old version of the preset plugin; if the version number of the new version of the preset plugin is greater than the version number of the old version of the preset plugin, then the old version of the preset plugin is deleted and the new version of the preset plugin is installed; if the version number of the new version of the preset plugin is less than or equal to the version number of the old version of the preset plugin, then the new version of the preset plugin is not installed.
[0041] In this embodiment of the invention, optionally, the first acquisition submodule includes: The second submodule is used to obtain the number of pre-installed plugins in the new version; The second processing submodule is used to obtain the configuration information of the new version of the pre-installed plugins multiple times using the attribute acquisition tool according to the number of pre-installed plugins.
[0042] In this embodiment of the invention, optionally, the plugins in the cache also include: older versions of third-party plugins, and when the plugin decoupling function is used, the older versions of third-party plugins are not processed.
[0043] The smart gateway provided in this embodiment of the invention can achieve Figure 1 The various processes implemented in the method embodiment achieve the same technical effect, and will not be described again here to avoid repetition.
[0044] Please refer to Figure 8 This invention provides a remote update platform, comprising: Configuration module 81 is used to configure the update firmware package; the update firmware package includes: a new version of the pre-installed plugin; The third processing module 82 is used to create a plugin decoupling marker file in the updated firmware package to obtain a new firmware package; the plugin decoupling marker file is used to mark whether the preset plugin is updated according to the plugin decoupling function; The sending module 83 is used to send the new firmware package to the smart gateway.
[0045] The remote update platform provided in this embodiment of the invention can achieve Figure 5 The various processes implemented in the method embodiments achieve the same technical effect, and will not be described again here to avoid repetition.
[0046] This invention provides an electronic device 90, see [link to relevant documentation]. Figure 9 As shown, Figure 9 This is a schematic block diagram of an electronic device 90 according to an embodiment of the present invention, including a processor 91, a memory 92, and a program or instructions stored in the memory 92 and executable on the processor 91. When the program or instructions are executed by the processor, they implement the steps in any of the preset plug-in update methods of the present invention.
[0047] This invention provides a readable storage medium on which a program or instruction is stored. When the program or instruction is executed by a processor, it implements various processes of the embodiments of the preset plug-in update method as described above, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0048] Computer-readable media include both permanent and non-permanent, removable and non-removable media, which can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0049] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0050] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0051] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a service classification device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0052] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for updating a pre-built plugin, characterized in that, Applications in smart gateways include: Obtain a new firmware package sent by the remote update platform; the new firmware package includes: a new version of the pre-installed plugin and a plugin decoupling marker file; the plugin decoupling marker file is used to mark whether the pre-installed plugin is updated according to the plugin decoupling function; Load plugins from the cache; the cached plugins include older versions of pre-installed plugins; If the plugin decoupling marker file marks the preset plugin to be updated according to the plugin decoupling function, the plugin decoupling function is used to update the old version of the preset plugin according to the new version of the preset plugin; The plug-in decoupling function includes: Obtain the new version of the pre-installed plugins and delete the plugin decoupling tag file; the new version of the pre-installed plugins includes: the number of new version pre-installed plugins and the configuration information of the new version pre-installed plugins; the configuration information of the new version pre-installed plugins includes: the name and version number of the new version pre-installed plugins; Determine whether the version number of the new version of the pre-installed plugin is greater than the version number of the old version of the pre-installed plugin; If the version number of the new version of the pre-installed plugin is greater than the version number of the old version of the pre-installed plugin, then delete the old version of the pre-installed plugin and install the new version of the pre-installed plugin. If the version number of the new version of the pre-installed plugin is less than or equal to the version number of the old version of the pre-installed plugin, then the new version of the pre-installed plugin will not be installed. The cached plugins also include older versions of third-party plugins. When using the plugin decoupling function, the older versions of third-party plugins are not processed.
2. The method for updating the pre-installed plugin according to claim 1, characterized in that, The process of obtaining the pre-installed plugins of the new version includes: Get the number of pre-installed plugins in the new version; The configuration information of the new version's pre-installed plugins is obtained multiple times using the attribute acquisition tool, based on the number of pre-installed plugins.
3. A method for updating a pre-built plugin, characterized in that, Applications to remote update platforms include: Configure the updated firmware package; the updated firmware package includes: a new version of the pre-installed plugins; A plugin decoupling marker file is created in the updated firmware package to obtain a new firmware package; the plugin decoupling marker file is used to mark whether the preset plugins are updated according to the plugin decoupling function; The new firmware package is then sent to the smart gateway. The smart gateway is used to obtain new firmware packages sent by the remote update platform; the new firmware package includes: a new version of the pre-installed plugin and a plugin decoupling marker file; the plugin decoupling marker file is used to mark whether the pre-installed plugin is updated according to the plugin decoupling function; Load plugins from the cache; the cached plugins include older versions of pre-installed plugins; If the plugin decoupling marker file marks the preset plugin to be updated according to the plugin decoupling function, the plugin decoupling function is used to update the old version of the preset plugin according to the new version of the preset plugin; The plug-in decoupling function includes: Obtain the new version of the pre-installed plugins and delete the plugin decoupling tag file; the new version of the pre-installed plugins includes: the number of new version pre-installed plugins and the configuration information of the new version pre-installed plugins; the configuration information of the new version pre-installed plugins includes: the name and version number of the new version pre-installed plugins; Determine whether the version number of the new version of the pre-installed plugin is greater than the version number of the old version of the pre-installed plugin; If the version number of the new version of the pre-installed plugin is greater than the version number of the old version of the pre-installed plugin, then delete the old version of the pre-installed plugin and install the new version of the pre-installed plugin. If the version number of the new version of the pre-installed plugin is less than or equal to the version number of the old version of the pre-installed plugin, then the new version of the pre-installed plugin will not be installed. The cached plugins also include older versions of third-party plugins. When using the plugin decoupling function, the older versions of third-party plugins are not processed.
4. A smart gateway, characterized in that, include: The acquisition module is used to acquire new firmware packages sent by the remote update platform; The new firmware package includes: a new version of the pre-installed plugin and a plugin decoupling marker file; the plugin decoupling marker file is used to mark whether the pre-installed plugin has been updated according to the plugin decoupling function; The first processing module is used to load plugins from the cache; the plugins in the cache include older versions of pre-installed plugins. The second processing module is used to update the old version of the preset plugin according to the new version of the preset plugin if the preset plugin is updated according to the plugin decoupling function by the plugin decoupling function. The second processing module includes: The first acquisition submodule is used to acquire the new version of the pre-installed plugins and delete the plugin decoupling tag file; the new version of the pre-installed plugins includes: the number of new version pre-installed plugins and the configuration information of the new version pre-installed plugins; the configuration information of the new version pre-installed plugins includes: the name and version number of the new version pre-installed plugins; The first processing submodule is used to determine whether the version number of the new version of the preset plugin is greater than the version number of the old version of the preset plugin; if the version number of the new version of the preset plugin is greater than the version number of the old version of the preset plugin, then the old version of the preset plugin is deleted and the new version of the preset plugin is installed; if the version number of the new version of the preset plugin is less than or equal to the version number of the old version of the preset plugin, then the new version of the preset plugin is not installed. The cached plugins also include older versions of third-party plugins. When using the plugin decoupling function, the older versions of third-party plugins are not processed.
5. A remote update platform, characterized in that, include: The configuration module is used to configure firmware update packages; The updated firmware package includes: a new version of pre-installed plugins; The third processing module is used to create a plugin decoupling marker file in the updated firmware package to obtain a new firmware package; the plugin decoupling marker file is used to mark whether the preset plugins are updated according to the plugin decoupling function; The sending module is used to send the new firmware package to the smart gateway; The smart gateway is used to obtain new firmware packages sent by the remote update platform; the new firmware package includes: a new version of the pre-installed plugin and a plugin decoupling marker file; the plugin decoupling marker file is used to mark whether the pre-installed plugin is updated according to the plugin decoupling function; Load plugins from the cache; the cached plugins include older versions of pre-installed plugins; If the plugin decoupling marker file marks the preset plugin to be updated according to the plugin decoupling function, the plugin decoupling function is used to update the old version of the preset plugin according to the new version of the preset plugin; The plug-in decoupling function includes: Obtain the new version of the pre-installed plugins and delete the plugin decoupling tag file; the new version of the pre-installed plugins includes: the number of new version pre-installed plugins and the configuration information of the new version pre-installed plugins; the configuration information of the new version pre-installed plugins includes: the name and version number of the new version pre-installed plugins; Determine whether the version number of the new version of the pre-installed plugin is greater than the version number of the old version of the pre-installed plugin; If the version number of the new version of the pre-installed plugin is greater than the version number of the old version of the pre-installed plugin, then delete the old version of the pre-installed plugin and install the new version of the pre-installed plugin. If the version number of the new version of the pre-installed plugin is less than or equal to the version number of the old version of the pre-installed plugin, then the new version of the pre-installed plugin will not be installed. The cached plugins also include older versions of third-party plugins. When using the plugin decoupling function, the older versions of third-party plugins are not processed.
6. An electronic device, characterized in that: It includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein when the program or instructions are executed by the processor, they implement the method for updating a preset plug-in as described in any one of claims 1 to 2, or the steps in the method for updating a preset plug-in as described in claim 3.
7. A readable storage medium, characterized in that: The readable storage medium stores a program or instructions that, when executed by a processor, implement the method for updating a preset plug-in as described in any one of claims 1 to 2, or the steps in the method for updating a preset plug-in as described in claim 3.
Citation Information
Patent Citations
Software development kit updating method and device, electronic equipment and storage medium
CN111722857A