Upgrading method and device
By introducing interface encapsulation layer and interface mapping unit into embedded devices, and using dynamic mapping and WebAssembly container isolation technology, the independent upgrade problem of hardware capabilities, containers and applications in embedded devices is solved, achieving unified user application experience and efficient upgrade effects.
Patent Information
- Application Number
- CN202311517416.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-14
- Publication Date
- 2025-05-16
AI Technical Summary
The prior art is difficult to independently upgrade hardware capabilities, containers and applications in embedded devices, and it is difficult to achieve simultaneous updates of upper and lower layers or individual updates of one party, resulting in inconsistent user experience and poor upgrade effects.
By providing the interface encapsulation layer and interface mapping unit, the mapping information between the interface and hardware address is determined using dynamic mapping method, and it supports isolated operation and independent updates of containers based on WebAssembly, realizing independent upgrades of hardware capabilities, containers and applications.
It realizes independent upgrades of embedded device hardware capabilities, containers and applications, supports the increase and decrease of functional interfaces, brings a unified user experience and improves the upgrade effect.
Smart Images

Figure CN120010871A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to an upgrading method and device thereof. Background Art
[0002] An embedded device is a computer system designed for a specific application, which has the characteristics of miniaturization, low power consumption, high reliability, low cost and easy integration. In the related technology, it supports the introduction of container technology in embedded devices. For example, a WebAssembly-based container can run on a WebAssembly virtual machine, which can effectively expand the functionality and customization of the client and provide a seamless application experience for mobile and desktop devices. Summary of the invention
[0003] The present disclosure provides an upgrading method and a device thereof.
[0004] According to a first aspect of an embodiment of the present disclosure, there is provided an upgrading method, including:
[0005] Get the upgrade file;
[0006] Determine an object to be upgraded associated with the upgrade file; the object to be upgraded includes at least one of the following: hardware capabilities of an embedded device, a container in the embedded device, and an application running in the container; wherein the embedded device includes an interface encapsulation layer and an interface mapping unit, the interface encapsulation layer includes an application unified interface based on the hardware capabilities, and the interface mapping unit is used to determine mapping information between the interface and the hardware address in a dynamic mapping manner;
[0007] The upgrade file is used to perform upgrade processing on the object to be upgraded.
[0008] In combination with some embodiments of the first aspect, in some embodiments, the object to be upgraded includes the hardware capability of the embedded device, the upgrade file includes a first upgrade file of the hardware capability, and the first upgrade file is a file in binary format; and upgrading the hardware capability using the first upgrade file includes any of the following:
[0009] During the compilation of the first upgrade file, the first original file content of the hardware capability is replaced with the binary content of the first upgrade file; the first original file is a file in binary format;
[0010] During the loading process of the first original file, the binary file at the designated position of the hardware capability is replaced with the first upgrade file, the designated position being the address position determined by the interface mapping unit using the dynamic mapping method;
[0011] The upgrade is performed by using an image replacement method, where the image of the first upgrade file directly replaces the image data in the corresponding original partition, where the original partition is the partition storing the first original file.
[0012] In combination with some embodiments of the first aspect, in some embodiments, the object to be upgraded includes a container in the embedded device, the upgrade file includes a second upgrade file of the container, and the second upgrade file is a file in binary format; and upgrading the container using the second upgrade file includes any of the following:
[0013] During the compilation of the second upgrade file, the second original file content of the container is replaced with the binary content of the second upgrade file; the second original file is a file in binary format;
[0014] Upgrading by image replacement, directly replacing the image data in the corresponding original partition with the image of the second upgraded file, where the original partition is the partition storing the second original file;
[0015] The upgrade file is a system upgrade file of the embedded device. During the process of upgrading the operating system of the embedded device according to the system upgrade file, the second upgrade file is copied to a corresponding preset directory.
[0016] In combination with some embodiments of the first aspect, in some embodiments, the object to be upgraded includes an application running in the container, the upgrade file includes a third upgrade file of the application, and the third upgrade file includes the logic code of the application; using the third upgrade file to upgrade the application includes: updating the logic code of the application to a corresponding preset directory.
[0017] In combination with some embodiments of the first aspect, in some embodiments, when the interface mapping unit determines the mapping information between the interface and the hardware address in a dynamic mapping manner, it uses a dynamic encryption algorithm to encrypt the specified position of the hardware.
[0018] In combination with some embodiments of the first aspect, in some embodiments, the container is a WebAssembly-based container.
[0019] According to a second aspect of an embodiment of the present disclosure, there is provided an upgrading device, including:
[0020] Acquisition module, used to obtain upgrade files;
[0021] A determination module, used to determine an object to be upgraded associated with the upgrade file; the object to be upgraded includes at least one of the following: hardware capabilities of an embedded device, a container in the embedded device, and an application running in the container; wherein the embedded device includes an interface encapsulation layer and an interface mapping unit, the interface encapsulation layer includes an application unified interface based on the hardware capabilities, and the interface mapping unit is used to determine mapping information between the interface and the hardware address in a dynamic mapping manner;
[0022] An upgrade module is used to use the upgrade file to upgrade the object to be upgraded.
[0023] In conjunction with some embodiments of the second aspect, in some embodiments, the object to be upgraded includes the hardware capability of the embedded device, the upgrade file includes a first upgrade file of the hardware capability, and the first upgrade file is a file in binary format; the upgrade module is specifically used to perform any of the following:
[0024] During the compilation of the first upgrade file, the first original file content of the hardware capability is replaced with the binary content of the first upgrade file; the first original file is a file in binary format;
[0025] During the loading process of the first original file, the binary file at the designated position of the hardware capability is replaced with the first upgrade file, the designated position being the address position determined by the interface mapping unit using the dynamic mapping method;
[0026] The upgrade is performed by using an image replacement method, where the image of the first upgrade file directly replaces the image data in the corresponding original partition, where the original partition is the partition storing the first original file.
[0027] In conjunction with some embodiments of the second aspect, in some embodiments, the object to be upgraded includes a container in the embedded device, the upgrade file includes a second upgrade file of the container, and the second upgrade file is a file in binary format; the upgrade module is specifically used to perform any of the following:
[0028] During the compilation of the second upgrade file, the second original file content of the container is replaced with the binary content of the second upgrade file; the second original file is a file in binary format;
[0029] Upgrading by image replacement, directly replacing the image data in the corresponding original partition with the image of the second upgraded file, where the original partition is the partition storing the second original file;
[0030] The upgrade file is a system upgrade file of the embedded device. During the process of upgrading the operating system of the embedded device according to the system upgrade file, the second upgrade file is copied to a corresponding preset directory.
[0031] In combination with some embodiments of the second aspect, in some embodiments, the object to be upgraded includes an application running in the container, the upgrade file includes a third upgrade file of the application, and the third upgrade file includes the logic code of the application; the upgrade module is specifically used to: update the logic code of the application to a corresponding preset directory.
[0032] In combination with some embodiments of the second aspect, in some embodiments, when the interface mapping unit adopts a dynamic mapping method to determine the mapping information between the interface and the hardware address, it adopts a dynamic encryption algorithm to encrypt the specified position of the hardware.
[0033] In combination with some embodiments of the second aspect, in some embodiments, the container is a WebAssembly-based container.
[0034] According to a third aspect of an embodiment of the present disclosure, there is provided an embedded device, comprising: an interface encapsulation layer, the interface encapsulation layer comprising an application unified interface based on the hardware capability; an interface mapping unit, configured to determine mapping information between the interface and the hardware address by a dynamic mapping method; a processor; and a memory for storing instructions executable by the processor, wherein the processor is configured to execute the upgrade method described in the first aspect above.
[0035] According to a fourth aspect of an embodiment of the present disclosure, a storage medium is provided, wherein the storage medium stores instructions, and when the instructions are executed on an embedded device, the embedded device executes the upgrade method of the first aspect.
[0036] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided. When the computer program product is executed by an embedded device, the embedded device executes the upgrade method of the first aspect.
[0037] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0038] The hardware capabilities of embedded devices, containers in embedded devices, and applications running in containers can be upgraded independently without affecting each other. In addition, by encapsulating the unified interface of applications that use system and hardware capabilities in the interface encapsulation layer, it is possible to support the addition and reduction of the function interface. In addition, through the interface encapsulation layer and the interface mapping unit, the upper and lower layers of the embedded device can be updated simultaneously and / or one side can be updated separately. For example, an application written once can be executed and upgraded and maintained on various types of embedded hardware, which can bring users a unified application experience and improve the upgrade effect.
[0039] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0041] Figure 1 The figure is a flowchart of an upgrading method according to an exemplary embodiment.
[0042] Figure 2 The figure is a block diagram of an upgrading device according to an exemplary embodiment.
[0043] Figure 3 The invention is a block diagram of an embedded device according to an exemplary embodiment. DETAILED DESCRIPTION
[0044] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.
[0045] It should be noted that, in the description of the present disclosure, unless otherwise specified, “ / ” means or, for example, A / B can mean A or B; the “and / or” in this article is merely a way to describe the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0046] The terms used in the disclosed embodiments are only for the purpose of describing specific embodiments, and are not intended to limit the disclosed embodiments. The singular forms "a", "an" and "the" used in the disclosed embodiments and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0047] It should be understood that although the terms first, second, third, etc. may be used to describe various information in the disclosed embodiments, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the disclosed embodiments, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein may be interpreted as "at" or "when" or "in response to determination".
[0048] It should be noted that embedded devices are rich in categories, with diverse capability requirements, and the underlying hardware capabilities vary greatly. Modules that provide hardware capabilities also have copyright protection claims. The upper-level interfaces of embedded devices are expected to be unified to give users a consistent experience, and there are also version protection requirements. In order to address software protocol conflicts and copyright protection for the implementation of third-party module capabilities, and to facilitate unified interface upgrades and expansions, the present disclosure is based on the WebAssembly container for isolated operation and independent update of applications above, and can also independently update the system hardware capabilities under the container. In addition, for applications running in WebAssembly, the present disclosure can provide a WebAssembly interface encapsulation layer and an interface mapping unit to support the docking of the underlying system and hardware functional capabilities, including fixed entries, and mapping strategies implemented in fixed storage locations. Exemplarily, the functional interface of the interface encapsulation layer can increase the capability interface or reduce the capability interface. The corresponding underlying implementation can be independently deployed in a specified partition or address location. The entry is fixed and the symbolic representation of the corresponding interface can remain unchanged. Dynamic mapping can be used to find and jump execution between update addresses. The underlying implementation can be updated in units of partitions or mapped. The mapping calculation strategy for the new interface implementation can be added to a fixed storage location. Through this layered isolation method, the system and application isolation can be easily upgraded separately, and problems can be fixed in time through upgrades and new versions and new functions can be updated to improve the user experience.
[0049] Figure 1 is a flowchart of an upgrade method according to an exemplary embodiment. Figure 1 As shown, the upgrade method is used in an embedded device, including but not limited to the following steps.
[0050] In step 101, an upgrade file is obtained.
[0051] In some embodiments, the upgrade file can be obtained from a server based on Over-the-Air Technology (OTA), or the upgrade file can be obtained in other ways, for example, the upgrade file can be obtained from an external storage device via a USB (Universal Serial Bus). The present disclosure does not limit this and will not elaborate on it.
[0052] In some embodiments, the upgrade file may include but is not limited to at least one of the following: an upgrade file for the hardware capability of the embedded device; an upgrade file for the container in the embedded device; an upgrade file for the application running in the container, etc. In some embodiments, the container may be a WebAssembly-based container.
[0053] In this embodiment, the upgrade file may include an upgrade file for the hardware capabilities of the embedded device. In this embodiment, the upgrade file may include an upgrade file for a container in the embedded device. In this embodiment, the upgrade file may include an upgrade file for an application running in a container. It should be noted that the above embodiments are not exhaustive, but are only illustrative of some embodiments, and the above embodiments may be implemented individually or in combination. The above embodiments are only for illustration and are not intended to be specific limitations on the scope of protection of the embodiments of the present disclosure.
[0054] In step 102, an object to be upgraded associated with the upgrade file is determined.
[0055] Exemplarily, when performing an upgrade, the object to be upgraded associated with the acquired upgrade file may be determined first. In other words, the object to be upgraded is determined based on the acquired upgrade file.
[0056] In some embodiments, the object to be upgraded may include, but is not limited to, at least one of the following: hardware capabilities of an embedded device, a container in an embedded device, and an application running in a container. In this embodiment, the object to be upgraded may include the hardware capabilities of an embedded device. In this embodiment, the object to be upgraded may include a container in an embedded device. In this embodiment, the object to be upgraded may include an application running in a container. It should be noted that the above embodiments are not exhaustive, but are only illustrative of some embodiments, and the above embodiments may be implemented individually or in combination, and the above embodiments are only for illustration and are not intended to be specific limitations on the scope of protection of the embodiments of the present disclosure.
[0057] Exemplarily, the present disclosure may independently upgrade the hardware capabilities of an embedded device, a container in the embedded device, and an application running in the container, or may upgrade them all at the same time. This may be implemented based on actual needs and is not specifically limited in the present disclosure.
[0058] In some embodiments, the embedded device may include an interface encapsulation layer and an interface mapping unit. The interface encapsulation layer may include an application unified interface based on hardware capabilities. The interface mapping unit may be used to determine mapping information between an interface and a hardware address in a dynamic mapping manner.
[0059] Exemplarily, the present disclosure may provide an encapsulation implementation layer based on WebAssembly, which may include an interface encapsulation layer and an interface mapping unit. The interface encapsulation layer may provide a unified interface for all applications that need to use system and hardware capabilities. Exemplarily, each interface has a corresponding version number identifier, and the interfaces in the interface encapsulation layer may be increased or decreased.
[0060] Exemplarily, the interface mapping unit can provide dynamic mapping and / or dynamic mapping strategy of the interface in the interface encapsulation layer, for example, the interface in the interface encapsulation layer can be stored in a specified fixed storage location, or the interface in the interface encapsulation layer can also be stored in a specified location, which is a location calculated using a dynamic mapping strategy algorithm.
[0061] In some embodiments, when the interface mapping unit determines the mapping information between the interface and the hardware address in a dynamic mapping manner, the interface mapping unit uses a dynamic encryption algorithm to encrypt the specified location of the hardware. Exemplarily, when the interface mapping unit performs dynamic encryption calculations, a root key may be used for encryption, wherein the root key may be generated using a unique ID (Identity) of the embedded device when it is generated in the factory, or may be generated using other information with a unique identifier, which is not specifically limited here and will not be described in detail.
[0062] It should be noted that, in some embodiments, the present disclosure may provide an entry location for specifying the call of the interface encapsulation layer, and the entry location may be saved in an encrypted manner and may be dynamically stored in a specified storage location. Exemplarily, a mapping relationship between the entry location and the storage location may be determined in a dynamic mapping table manner, and the location may be different and the name may also be different.
[0063] In step 103, the upgrade file is used to perform upgrade processing on the object to be upgraded.
[0064] In some embodiments, the upgrade processing method may be different depending on the object to be upgraded.
[0065] In some embodiments, the object to be upgraded includes the hardware capability of the embedded device, and the upgrade file includes a first upgrade file of the hardware capability, and the first upgrade file may be a binary file. In some embodiments, the first upgrade file may be used to upgrade the hardware capability.
[0066] Exemplarily, for upgrading the hardware capability of an embedded device, the first original file content of the hardware capability can be replaced with the binary content of the first upgrade file during the compilation of the first upgrade file; the first original file is a binary format file. For example, for underlying hardware capabilities with copyright protection and / or without copyright protection, the hardware capability can be upgraded by directly using binary replacement during compilation.
[0067] Exemplarily, for upgrading the hardware capability of an embedded device, during the loading process of the first original file, the binary file at the designated position of the hardware capability can be replaced with the first upgrade file, and the designated position is the address position determined by the interface mapping unit in a dynamic mapping manner. For example, for underlying hardware capabilities with copyright protection and / or without copyright protection, the binary file at the designated position of the hardware capability can be replaced with the first upgrade file of the hardware capability during operation (or loading), that is, the binary file at the designated position of the hardware capability can be replaced to achieve the upgrade of the hardware capability.
[0068] Exemplarily, for upgrading the hardware capability of the embedded device, the upgrade is performed by image replacement, where the image of the first upgrade file is directly replaced with the image data in the corresponding original partition, where the original partition is the partition storing the first original file. For example, for underlying hardware capabilities with copyright protection and / or without copyright protection, the entire partition replacement method can be adopted, where the image of the first upgrade file is directly replaced with the image data in the corresponding original partition to achieve the upgrade of the hardware capability.
[0069] In some embodiments, the object to be upgraded may include a container in an embedded device, and the upgrade file may include a second upgrade file of the container, where the second upgrade file is a binary file. In some embodiments, the second upgrade file may be used to upgrade the container.
[0070] Exemplarily, for a container in an embedded device, during the compilation of the second upgrade file of the container, the second original file content of the container can be replaced with the binary content of the second upgrade file, wherein the second original file is a file in binary format. For example, a binary implementation of a container corresponding to a customized WebAssembly can be stored in a specified file and upgraded in a file manner, such as storing the binary content of the container to be upgraded in a specified file to upgrade the container in a file manner.
[0071] Exemplarily, for a container in an embedded device, an image replacement method can be used to upgrade the container, and the image of the second upgraded file of the container can be directly replaced with the image data in the corresponding original partition, where the original partition is the partition storing the second original file of the container. For example, a container binary implementation corresponding to a customized WebAssembly can be fixed in a partition and upgraded in units of partitions to achieve the upgrade of the container in the embedded device.
[0072] Exemplarily, the upgrade file may be a system upgrade file of an embedded device. For the container in the embedded device, the second upgrade file of the container may be copied to the corresponding preset directory during the process of upgrading the operating system of the embedded device according to the system upgrade file. For example, the corresponding customized WebAssembly container binary implementation may be placed together with the operating system and the container may be upgraded together with the system.
[0073] In some embodiments, the object to be upgraded includes an application running in a container, and the upgrade file includes a third upgrade file of the application, and the third upgrade file includes logic code of the application.
[0074] In some embodiments, the third upgrade file mentioned above can be used to upgrade the application in the container. Exemplarily, for the application in the container, the logic code of the application can be updated to the corresponding preset directory. For example, the application in the container can be an application based on interface implementation, and the corresponding interface can be used by loading and calling the dynamic entry. The system and underlying interfaces used in the implementation logic of the application can find the updated execution entry according to the dynamic mapping method, and the logic of the application itself can be independently saved and updated.
[0075] It should be noted that, in some embodiments, the hardware capabilities of the above-mentioned embedded devices, the containers in the embedded devices, and the applications running in the containers can be upgraded independently or simultaneously, and can be implemented based on actual needs, which is not specifically limited in this disclosure.
[0076] In the above embodiments, the hardware capabilities of the embedded device, the container in the embedded device, and the application running in the container can be upgraded independently without affecting each other; in addition, by encapsulating the unified interface of the application using the system and hardware capabilities in the interface encapsulation layer, the function interface can be supported to increase and decrease functions. In addition, through the interface encapsulation layer and the interface mapping unit, the upper and lower layers of the embedded device can be updated simultaneously and / or one side can be updated separately. For example, an application written once can be executed and upgraded and maintained on various categories of embedded hardware, which can bring users a unified application experience and improve the upgrade effect.
[0077] Figure 2FIG. 1 is a block diagram of an upgrading device according to an exemplary embodiment. Figure 2 The device includes an acquisition module 201, a determination module 202 and an upgrade module 203.
[0078] The acquisition module 201 is used to acquire the upgrade file.
[0079] The determination module 202 is used to determine the object to be upgraded associated with the upgrade file; the object to be upgraded includes at least one of the following: the hardware capabilities of the embedded device, the container in the embedded device, and the application running in the container; wherein the embedded device includes an interface encapsulation layer and an interface mapping unit, the interface encapsulation layer includes a unified application interface based on the hardware capabilities, and the interface mapping unit is used to determine the mapping information between the interface and the hardware address by a dynamic mapping method.
[0080] The upgrade module 203 is used to perform upgrade processing on the object to be upgraded using the upgrade file.
[0081] In some embodiments, the object to be upgraded includes the hardware capabilities of the embedded device, and the upgrade file includes a first upgrade file of the hardware capabilities, and the first upgrade file is a file in binary format; the upgrade module is specifically used to execute any of the following: during the compilation of the first upgrade file, the first original file content of the hardware capabilities is replaced with the binary content of the first upgrade file; the first original file is a file in binary format; during the loading of the first original file, the binary file at a specified position of the hardware capabilities is replaced with the first upgrade file, and the specified position is an address position determined by the interface mapping unit using a dynamic mapping method; the upgrade is performed using a mirror replacement method, and the image of the first upgrade file is directly replaced with the image data in the corresponding original partition, and the original partition is the partition that stores the first original file.
[0082] In some embodiments, the object to be upgraded includes a container in an embedded device, and the upgrade file includes a second upgrade file of the container, and the second upgrade file is a file in binary format; the upgrade module is specifically used to execute any of the following: during the compilation of the second upgrade file, the second original file content of the container is replaced with the binary content of the second upgrade file; the second original file is a file in binary format; the upgrade is performed by image replacement, and the image of the second upgrade file is directly replaced with the image data in the corresponding original partition, and the original partition is the partition for storing the second original file; the upgrade file is a system upgrade file of the embedded device, and in the process of upgrading the operating system of the embedded device according to the system upgrade file, the second upgrade file is copied to the corresponding preset directory.
[0083] In some embodiments, the object to be upgraded includes an application running in a container, the upgrade file includes a third upgrade file of the application, and the third upgrade file includes the logic code of the application; the upgrade module is specifically used to: update the logic code of the application to a corresponding preset directory.
[0084] In some embodiments, when the interface mapping unit determines the mapping information between the interface and the hardware address in a dynamic mapping manner, the interface mapping unit uses a dynamic encryption algorithm to encrypt the designated location of the hardware.
[0085] In some embodiments, the container is a WebAssembly based container.
[0086] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0087] In the above embodiments, the hardware capabilities of the embedded device, the container in the embedded device, and the application running in the container can be upgraded independently without affecting each other; in addition, by encapsulating the unified interface of the application using the system and hardware capabilities in the interface encapsulation layer, the function interface can be supported to increase and decrease functions. In addition, through the interface encapsulation layer and the interface mapping unit, the upper and lower layers of the embedded device can be updated simultaneously and / or one side can be updated separately. For example, an application written once can be executed and upgraded and maintained on various categories of embedded hardware, which can bring users a unified application experience and improve the upgrade effect.
[0088] Figure 3 1 is a block diagram of an embedded device 300 according to an exemplary embodiment. The embedded device 300 may include an interface encapsulation layer 301, an interface mapping unit 302, a processing component 303 and a memory 304. The interface encapsulation layer 301 may include an application unified interface based on hardware capabilities. The interface mapping unit 302 is configured to determine the mapping information between the interface and the hardware address in a dynamic mapping manner.
[0089] In some embodiments, the memory 304 is used to store instructions executable by the processor 303. In some embodiments, the processing component 303 may include one or more processors 311 to execute instructions to complete all or part of the steps of the above method. In addition, the processing component 303 may include one or more modules to facilitate the interaction between the processing component 303 and other components.
[0090] The memory 304 is configured to store various types of data to support operations on the embedded device 300. Examples of such data include instructions for any application or method operating on the embedded device 300, etc. The memory 304 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0091] Exemplarily, the embedded device 300 may also include a power component. The power component provides power to various components of the embedded device 300. The power component may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the embedded device 300.
[0092] Exemplarily, the embedded device 300 may also include a communication component. The communication component is configured to facilitate wired or wireless communication between the embedded device 300 and other devices. The embedded device 300 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0093] In an exemplary embodiment, the embedded device 300 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0094] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 304 including instructions, and the instructions can be executed by a processor 311 of the embedded device 300 to complete the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0095] In an exemplary embodiment, a computer program product is also provided. The computer program product is executed by the processor 311 of the embedded device 300 to complete the above method.
[0096] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed in this disclosure. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.
[0097] It should be understood that the present invention is not limited to the exact construction that has been described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. An upgrading method, characterized in that: include: Get the upgrade file; Determine an object to be upgraded associated with the upgrade file; the object to be upgraded includes at least one of the following: hardware capabilities of an embedded device, a container in the embedded device, and an application running in the container; wherein the embedded device includes an interface encapsulation layer and an interface mapping unit, the interface encapsulation layer includes an application unified interface based on the hardware capabilities, and the interface mapping unit is used to determine mapping information between the interface and the hardware address in a dynamic mapping manner; The upgrade file is used to perform upgrade processing on the object to be upgraded.
2. The method according to claim 1, characterized in that The object to be upgraded includes the hardware capability of the embedded device, the upgrade file includes a first upgrade file of the hardware capability, and the first upgrade file is a file in binary format; upgrading the hardware capability using the first upgrade file includes any of the following: During the compilation of the first upgrade file, the first original file content of the hardware capability is replaced with the binary content of the first upgrade file; the first original file is a file in binary format; During the loading process of the first original file, the binary file at the designated position of the hardware capability is replaced with the first upgrade file, the designated position being the address position determined by the interface mapping unit using the dynamic mapping method; The upgrade is performed by using an image replacement method, where the image of the first upgrade file directly replaces the image data in the corresponding original partition, where the original partition is the partition storing the first original file.
3. The method according to claim 1 or 2, characterized in that The object to be upgraded includes a container in the embedded device, the upgrade file includes a second upgrade file of the container, and the second upgrade file is a binary file; and upgrading the container using the second upgrade file includes any of the following: During the compilation of the second upgrade file, the second original file content of the container is replaced with the binary content of the second upgrade file; the second original file is a file in binary format; Upgrading by image replacement, directly replacing the image data in the corresponding original partition with the image of the second upgraded file, where the original partition is the partition storing the second original file; The upgrade file is a system upgrade file of the embedded device. During the process of upgrading the operating system of the embedded device according to the system upgrade file, the second upgrade file is copied to a corresponding preset directory.
4. The method according to any one of claims 1 to 3, characterized in that The object to be upgraded includes an application running in the container, the upgrade file includes a third upgrade file of the application, and the third upgrade file includes a logic code of the application; The third upgrade file is used to upgrade the application, including: Update the logic code of the application to the corresponding preset directory.
5. The method according to claim 1, characterized in that When the interface mapping unit determines the mapping information between the interface and the hardware address in a dynamic mapping manner, the interface mapping unit uses a dynamic encryption algorithm to encrypt the designated position of the hardware.
6. The method according to any one of claims 1 to 5, characterized in that The container is a WebAssembly-based container.
7. An upgrading device, characterized in that: include: Acquisition module, used to obtain upgrade files; A determination module, used to determine an object to be upgraded associated with the upgrade file; the object to be upgraded includes at least one of the following: hardware capabilities of an embedded device, a container in the embedded device, and an application running in the container; wherein the embedded device includes an interface encapsulation layer and an interface mapping unit, the interface encapsulation layer includes an application unified interface based on the hardware capabilities, and the interface mapping unit is used to determine mapping information between the interface and the hardware address in a dynamic mapping manner; An upgrade module is used to use the upgrade file to upgrade the object to be upgraded.
8. The method according to claim 7, characterized in that When the interface mapping unit determines the mapping information between the interface and the hardware address in a dynamic mapping manner, the interface mapping unit uses a dynamic encryption algorithm to encrypt the designated position of the hardware.
9. An embedded device, characterized in that: include: An interface encapsulation layer, the interface encapsulation layer including an application unified interface based on hardware capabilities; An interface mapping unit, configured to determine mapping information between the interface and the hardware address in a dynamic mapping manner; processor; A memory for storing instructions executable by the processor, wherein the processor is configured to execute the upgrading method according to any one of claims 1 to 6.
10. A storage medium storing instructions, characterized in that: When the instruction is executed on the embedded device, the embedded device is caused to execute the upgrading method according to any one of claims 1 to 6.