Remote application upgrade method, system, computer equipment, and storage medium based on static random access memory (SRAM) dynamic loading.

By releasing the non-upgradeable function partition of the application in the embedded device and loading the bootloader's extended function package, the problems of SRAM resource waste and FLASH space shortage are solved, realizing efficient utilization of SRAM and flexible updates of upgrade functions, and reducing hardware costs.

CN123067903APending Publication Date: 2026-11-10BEIJING WATCH SMART TECH LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611053852.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-15
Publication Date
2026-11-10

AI Technical Summary

Technical Problem

In existing embedded devices, the BOOT and APP share the SRAM in a time-sharing manner, which leads to the waste of SRAM resources and insufficient FLASH space.

Method used

By responding to upgrade requests and releasing the application's non-upgradeable function partition, the bootloader's extended function package is loaded into the released non-upgradeable function partition, and a mapping relationship between the name and interface address of the extended function firmware is established, thereby realizing time-sharing multiplexing of SRAM and functional modular separation.

Benefits of technology

It improves SRAM utilization, saves FLASH space, supports flexible upgrades and updates, and reduces hardware costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123067903A_ABST
    Figure CN123067903A_ABST
Patent Text Reader

Abstract

This application proposes a method, system, computer device, and storage medium for remote application upgrades based on dynamic loading from static random access memory (SRAM). The remote application upgrade method includes: responding to an application upgrade request, releasing the non-upgradeable functional partition of the application in SRAM; loading an extension function package of the bootloader into the released non-upgradeable functional partition; the extension function package includes multiple extension function firmwares and a mapping relationship between the name of each extension function firmware and its corresponding interface address; invoking the basic functional module of the bootloader, determining the interface address of each extension function firmware from the mapping relationship, and jumping to the corresponding interface address to invoke the corresponding extension function firmware, which then performs the upgrade operation on the application. This application can significantly improve the resource utilization of the bootloader's SRAM and reduce the bootloader's flash memory usage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of remote application upgrade technology, specifically to a method, system, computer device, and storage medium for remote application upgrade based on dynamic loading of static random access memory. Background Technology

[0002] The firmware architecture of existing embedded devices (such as digital key control units) generally adopts a design that separates the bootloader (BOOT) and the application (APP). In existing embedded devices, the BOOT and APP share the same static random access memory (SRAM) in a time-sharing manner. The chip's SRAM capacity is selected based on the peak demand of the APP, and the SRAM utilization rate is controlled at 80% during APP runtime. The BOOT is only responsible for upgrade-related logic, and its SRAM utilization rate during runtime is less than 15%. When the device enters the BOOT upgrade phase, a large amount of SRAM resources are idle, resulting in low memory resource utilization, wasted hardware resources, and increased product hardware costs. Summary of the Invention

[0003] In view of this, this application proposes a method, system, computer device and storage medium for remote application upgrade based on dynamic loading of static random access memory, in order to solve the problem that in the prior art, BOOT and APP share SRAM in a time-sharing manner, but BOOT has very low SRAM resource usage during operation, resulting in a large amount of idle and wasted SRAM resources.

[0004] The first aspect of this application proposes a method for remotely upgrading an application based on dynamic loading from a static random access memory, the method comprising: In response to an application upgrade request, the application's non-upgrade function partition in static random access memory is released; the non-upgrade function partition is used to store data required for functions outside the upgrade process. The bootloader's extended feature package is loaded into the released non-upgraded feature partition; the extended feature package includes multiple extended feature firmwares, and a mapping relationship between the name of each extended feature firmware and its corresponding interface address; The basic functional modules of the bootloader are invoked to determine the interface address of each extended function firmware from the mapping relationship, and the corresponding extended function firmware is invoked at the corresponding interface address to perform the upgrade operation on the application.

[0005] This application embodiment releases the non-upgradeable function partition of the application in response to an upgrade request and loads the bootloader's extended function package into the released non-upgradeable function partition. This achieves time-sharing multiplexing of static random access memory resources, significantly improving SRAM utilization during bootloader operation. By dynamically loading extended functions as function packages, complex upgrade logic does not need to reside in flash memory, greatly reducing the bootloader's flash memory usage and providing more available flash memory space for the application. At the same time, by establishing a mapping relationship between extended function firmware names and interface addresses, basic function modules can accurately call dynamically loaded extended function firmware, enabling remote upgrades to be completed under limited hardware resource conditions while ensuring the integrity of upgrade functions.

[0006] In this embodiment of the application, before responding to an application upgrade request, the method further includes: The boot program stored in flash memory is split into a basic functional module and an extended functional module; the basic functional module has jump function and copy function, and the extended functional module has signature verification function and firmware flashing function; the extended functional module includes multiple extended functional firmware. For any of the multiple extended function firmwares, establish a mapping relationship between the function name and the interface address of the extended function firmware; the interface address is used to characterize the storage location of the extended function firmware in the extended function package; The bootloader's extension function package is constructed based on the multiple extended function firmware and their corresponding mapping relationships.

[0007] This application embodiment achieves modular separation of boot program functions by functionally decomposing the boot program stored in flash memory. Core boot functions such as jump function and copy function are resident in flash memory as basic functional modules, while complex upgrade logic such as signature verification function and firmware flashing function are stored as extended functional modules in the form of extended functional packages. The basic functional modules are simplified and solidified, while the extended functional modules can be flexibly loaded. This not only ensures the reliability of system power-on startup, but also solves the problem that traditional boot program functions cannot be updated after being solidified.

[0008] In this embodiment of the application, before responding to an application upgrade request, the method further includes: The application's data resources in static random access memory are re-divided according to function to obtain upgrade function partitions and non-upgrade function partitions; The upgrade function partition is used to store data required for functions related to the upgrade process, and the upgrade function partition remains occupied before and after receiving an upgrade request; the non-upgrade function partition is used to store data required for functions other than the upgrade process, and is released after receiving an upgrade request. The released non-upgrade function partition is used to load the extension function package of the bootloader.

[0009] This application embodiment re-divides the data resources of the application in the static random access memory according to function, resulting in upgrade function partitions and non-upgrade function partitions, which greatly reduces the amount of basic function code resident in flash memory. Compared with the traditional solution where all functions of the boot program are resident in flash memory, this solution can significantly save flash memory space, freeing up more available storage resources for the application, which is beneficial for realizing functional expansion in embedded platforms with limited hardware costs.

[0010] In this embodiment, the extended functionality firmware includes data receiving firmware, signature verification firmware, and data flashing firmware; the upgrade operation performed on the application by the corresponding extended functionality firmware includes: The data receiving firmware is invoked to receive the new version of the application firmware from the cloud, and the signature verification firmware is invoked to verify the signature of the new version of the application firmware. After the signature verification is passed, the data flashing firmware is invoked to perform an erase operation on the application backup partition in the flash memory, and the new version of the application firmware is written to the application backup partition. The signature verification firmware is invoked to perform an integrity check on the new version of the application firmware already written to the application backup partition. After the integrity verification is passed, the data flashing firmware is invoked to perform an erase operation on the application main partition in the flash memory, and the new version of the application firmware in the application backup partition is copied to the application main partition to complete the remote upgrade of the application.

[0011] In this embodiment, the basic function module includes querying the function firmware; calling the basic function module of the bootloader to determine the interface address of each extended function firmware from the mapping relationship, and jumping to the corresponding interface address to call the corresponding extended function firmware, including: The firmware calls the query function to filter out the interface address of the data receiving firmware, the interface address of the signature verification firmware, and the interface address of the data flashing firmware from the mapping relationship; The interface address of the data receiving firmware is invoked to enable the data receiving firmware to perform the step of receiving the new version of the application firmware from the cloud; The interface address of the signature verification firmware is called so that the signature verification firmware can perform the step of signing the new version of the application firmware, or perform the step of performing integrity verification on the new version of the application firmware already written in the application backup partition. The steps include: calling the interface address of the data flashing firmware to enable the data flashing firmware to perform an erase operation on the application backup partition in the flash memory and write the new version of the application firmware into the application backup partition; or, calling the data flashing firmware to perform an erase operation on the application main partition in the flash memory and copy the new version of the application firmware from the application backup partition to the application main partition.

[0012] In this embodiment of the application, releasing the non-upgrade function partition includes: Suspend all tasks in the application except the upgrade task to ensure that the non-upgrade function partition in the static random access memory is not accessed by actual tasks. Release the data in the non-upgraded function partition; Clear the useless data in the heap region of the static random access memory, and use the released non-upgraded function partition and the heap region as the loading space for the extended function package.

[0013] In this embodiment of the application, the basic functional module occupies 15% of the total storage space of the boot program, and the extended functional module occupies 85% of the total storage space of the boot program.

[0014] An embodiment of the second aspect of this application provides a remote application upgrade system based on dynamic loading from static random access memory, comprising: The non-upgradeable function partition data release module is used to release the non-upgradeable function partition of the application in static random access memory in response to the application's upgrade request; the non-upgradeable function partition is used to store data required for functions other than the upgrade process. An extended function package loading module is used to load the extended function package of the bootloader into the released non-upgrade function partition; the extended function package includes multiple extended function firmwares, and a mapping relationship between the name of each extended function firmware and its corresponding interface address; The application upgrade module is used to call the basic function module of the bootloader, determine the interface address of each extended function firmware from the mapping relationship, and jump to the corresponding interface address to call the corresponding extended function firmware, which then performs the upgrade operation on the application.

[0015] An embodiment of the third aspect of this application provides a computer device including a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to perform the application remote upgrade method based on dynamic loading of static random access memory described in the first aspect.

[0016] An embodiment of the fourth aspect of this application provides a computer-readable storage medium storing computer instructions for causing a computer to execute the application remote upgrade method based on dynamic loading of static random access memory described in the first aspect above.

[0017] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. 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 scope of this application. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 This illustration shows a flowchart of a remote application upgrade method based on dynamic loading of static random access memory according to an embodiment of this application. Figure 2 A schematic diagram of the SRAM resource reallocation process provided in an embodiment of this application is shown; Figure 3 A schematic diagram of the structure of an extended function package of an application provided in an embodiment of this application is shown; Figure 4 This illustration shows a schematic diagram of remote application upgrade based on an extended feature pack according to an embodiment of this application; Figure 5 This illustration shows a schematic diagram of the structure of a remote application upgrade system based on dynamic loading of static random access memory according to an embodiment of this application; Figure 6 This illustration shows a schematic diagram of the structure of a computer device according to an embodiment of this application; Figure 7 A schematic diagram of a storage medium provided in one embodiment of this application is shown. Detailed Implementation

[0019] Exemplary embodiments of this application will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of this application are shown in the drawings, it should be understood that this application may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of this application and to fully convey the scope of this application to those skilled in the art.

[0020] It should be noted that, unless otherwise stated, the technical or scientific terms used in this application shall have the ordinary meaning as understood by one of ordinary skill in the art to which this application pertains.

[0021] The technical scenarios involved in the embodiments of this application are described below.

[0022] In embedded systems, firmware typically consists of two parts: the bootloader and the application program (APP). Both share the system's storage resources, including flash memory and static random access memory (SRAM). In current technology, both the bootloader and the application program run in flash memory. During the hardware selection process for embedded products, the SRAM chip is primarily selected based on the requirements of the application program.

[0023] The existing technology has the following technical defects: 1. SRAM Resource Allocation Issues: Apps typically need to run specific algorithms, requiring significant SRAM resources. An ideal system design would typically keep SRAM utilization around 80%, fully utilizing it while leaving room for future expansion. Boot, on the other hand, only needs to implement upgrade functionality and doesn't require a large SRAM space; its SRAM utilization is usually less than 15%. The two share the same SRAM resources in a time-sharing manner, resulting in considerable waste of SRAM resources during boot execution.

[0024] 2. Insufficient Flash Space: To optimize costs, flash resources are typically selected on demand, with minimal reserve of extra space. However, as app functionality expands, especially when upgrade and backup functions are required, more flash space is needed to store backup data. This leads to a sharp increase in the overall firmware's flash space requirements, exceeding the hardware platform's flash capacity limitations.

[0025] 3. The contradiction between BOOT function and space: Traditional BOOT integrates complete upgrade logic, especially the vehicle networking module. Due to complex functions such as diagnostics, BOOT occupies a lot of FLASH space, which further exacerbates the problem of insufficient FLASH space.

[0026] 4. Fixed BOOT function: In display applications, there will be scenarios where it is necessary to update the UDS flashing process and signature verification algorithm. However, the traditional BOOT function is written once and cannot be updated subsequently, which cannot meet the new requirements for updating parts that have already been installed.

[0027] To address the aforementioned technical shortcomings, this application provides a method for remote application upgrades based on dynamic loading from Static Random Access Memory (SRAM). By utilizing SRAM in a time-sharing manner, it solves the SRAM resource allocation problem and improves the SRAM resource utilization of the bootloader. By splitting the functional logic within the bootloader, code originally running in FLASH is moved to SRAM, reducing the FLASH resource consumption of the bootloader. An address mapping table scheme is used to solve the problem of bootloader function persistence.

[0028] According to an embodiment of this application, an embodiment of a method for remotely upgrading an application based on dynamic loading of static random access memory is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0029] This embodiment provides a method for remote application upgrades based on dynamic loading from static random access memory. Figure 1 This is a flowchart of a remote application upgrade method based on dynamic loading from static random access memory according to an embodiment of this application, such as... Figure 1 As shown, the process includes the following steps: Step S101: In response to the application's upgrade request, release the non-upgradeable function partition of the application in static random access memory.

[0030] Specifically, during normal operation of the application, it can receive upgrade requests from the cloud-based OTA server via the vehicle communication module (such as CAN bus, Bluetooth, or cellular network). This upgrade request includes metadata such as the version information of the new application firmware, file size, and download address.

[0031] In some specific embodiments, before receiving an upgrade request, the application's Static Random Access Memory (SRAM) storage resources are re-partitioned according to function to obtain upgrade function partitions and non-upgrade function partitions.

[0032] like Figure 2As shown, the left side is a schematic diagram of SRAM allocation in the traditional scheme. In this scheme, SRAM is uniformly divided into the internal SRAM region, the heap region, and the stack region. The compiler uniformly allocates the data area and the uninitialized data area (bss) in the internal SRAM region. The application uses all of them during runtime, while the boot program only uses a small amount of independent SRAM space, resulting in low resource utilization.

[0033] The diagram in the middle illustrates the initial SRAM partitioning of this solution. The SRAM is re-divided into an upgrade function-allocated SRAM area (i.e., the upgrade function partition), an other function-allocated SRAM area (i.e., the non-upgrade function partition), a heap area, and a stack area. The upgrade function-allocated SRAM area stores data required for functions related to the upgrade process, such as upgrade status flags, data reception buffers, and packet sequence number counters. The other function-allocated SRAM area stores data required for functions outside the upgrade process, such as business algorithm data (e.g., UWB positioning algorithm buffer), global variables of the communication protocol stack (e.g., Bluetooth connection status, L2CAP layer buffer), and business logic variables (e.g., digital key authorization status).

[0034] Figure 2 The two columns on the right illustrate the time-sharing multiplexing process of SRAM resources in this scheme: when the application receives an upgrade request, the other function-allocated SRAM area is released (marked as FREE), and the heap area is synchronously cleared of useless data; subsequently, the bootloader's extended function package is loaded into the released other function-allocated SRAM area to run, and the upgrade function-allocated SRAM area remains occupied.

[0035] In this embodiment, the upgrade function partition and the non-upgrade function partition together constitute the static random access memory (SRAM) resource of the application. The upgrade function partition remains occupied both before and after receiving an upgrade request to ensure that data related to the upgrade process is not corrupted. The non-upgrade function partition is a time-sharing resource, used by business functions during normal application operation, and released and reused to load the bootloader's extended function package during the upgrade process.

[0036] In some specific embodiments, the method further includes: in response to the upgrade request, the application suspends other tasks besides the upgrade task.

[0037] Specifically, through the task scheduling mechanism of the real-time operating system (RTOS), non-upgrade-related tasks (such as UWB positioning tasks, Bluetooth protocol stack tasks, digital key service processing tasks, etc.) are set to a suspended state. After the tasks are suspended, the SRAM space corresponding to the non-upgrade function partitions is no longer accessed by the actual tasks, ensuring the security of subsequent release operations.

[0038] In some specific embodiments, the method further includes: releasing the data in the non-upgraded function partition after confirming that the non-upgraded task has been completely suspended.

[0039] Specifically, the release operation does not physically erase the SRAM, but rather marks the non-upgraded function partition as available, and its original data is overwritten when the extension function pack is loaded subsequently. Simultaneously, useless data in the heap region of the static random access memory is cleared, and allocated but unused memory blocks in the heap region are reclaimed. The released non-upgraded function partition and the heap region together serve as the loading space for the extension function pack.

[0040] Step S102: Load the bootloader's extended feature package into the released non-upgrade feature partition.

[0041] In some specific embodiments, the extension package needs to be built before loading it. The specific building process is as follows: The bootloader stored in flash memory (FLASH) is functionally split into basic functional modules and extended functional modules. The basic functional modules, which include functions such as jumping and copying, occupy 15% of the total storage space of the bootloader and reside permanently in the FLASH. The extended functional modules, which include functions such as data reception, signature verification, and firmware flashing, occupy 85% of the total storage space of the bootloader and exist as an extended functional package.

[0042] More specifically, the extended functionality module is further broken down into multiple extended functionality firmware, such as Figure 3 "FUNC1" and "FUNC2" refer to data receiving firmware, signature verification firmware, and data flashing firmware. For any of the multiple extended function firmwares, a mapping relationship is established between the function name and interface address of the extended function firmware, such as... Figure 3 The address mapping table is used to represent the storage location of the extended function firmware in the extended function package, specifically the actual entry address after the extended function firmware is loaded into SRAM. The extended function package of the bootloader is constructed based on the multiple extended function firmwares and their corresponding mapping relationships. The data structure of the extended function package includes: header information (version number, package size, checksum), address mapping table (correspondence between external interface names and interface addresses), and extended function firmware binary code.

[0043] In some specific embodiments, during the process of loading the bootloader's extended feature package into the released non-upgrade feature partition, the extended feature firmware binary code in the extended feature package can be sequentially written to the starting position of the non-upgrade feature partition, while the address mapping table is written to a designated mapping table cache area in the upgrade feature partition.

[0044] Step S103: Invoke the basic function module of the bootloader, determine the interface address of each extended function firmware from the mapping relationship, and jump to the corresponding interface address to call the corresponding extended function firmware, so that the corresponding extended function firmware can perform the upgrade operation on the application.

[0045] Specifically, the basic functional modules include a query function firmware, which resides in the FLASH memory.

[0046] More specifically, after the extended feature package is loaded, the basic function module detects the upgrade flag, which is a pre-set flag in FLASH or SRAM to indicate whether it is currently in upgrade mode. If the upgrade flag is detected, the upgrade execution process begins; if the upgrade flag is not detected, an integrity check of the application is performed, and if the check passes, the system jumps to the application.

[0047] In some specific embodiments, step S103 includes steps S1031-S1033: Step S1031: Call the query function firmware to filter out the interface addresses of each extended function firmware from the mapping relationship.

[0048] Specifically, the function firmware reads the address mapping table, determines the function name of the extended function firmware based on the function requirements to be invoked, and then retrieves the corresponding interface address, such as... Figure 4 As shown in "c1". For example, when a data receiving operation is required, the query function firmware retrieves the function name of "data receiving firmware" from the mapping relationship and obtains its corresponding interface address, such as 0x2000_8000; when a signature verification operation is required, the interface address of "signature verification firmware" is obtained, such as 0x2000_9000; when a data flashing operation is required, the interface address of "data flashing firmware" is obtained, such as 0x2000_A000.

[0049] Step S1032: Based on the interface address obtained from the query, redirect to the corresponding interface address to call the corresponding extended function firmware, such as... Figure 4 As shown in “c2”.

[0050] Specifically, the jump operation is implemented through function pointer calls or assembly jump instructions, setting the program counter (PC) to the interface address, thereby entering the execution entry point of the extended function firmware.

[0051] Step S1033 involves performing an upgrade operation on the application using the corresponding extended functionality firmware, specifically including the following sub-steps: Step a1: Call the data receiving firmware to establish a secure connection with the cloud OTA server through the vehicle communication module and receive the new version of the application firmware.

[0052] Specifically, the data receiving firmware has complete communication protocol processing capabilities, supporting breakpoint resumption, packet reassembly, and transmission verification. During the receiving process, the new application firmware is temporarily stored in the SRAM buffer or FLASH temporary area.

[0053] Step a2: Invoke the signature verification firmware to perform signature verification on the new application firmware.

[0054] Specifically, the signature verification firmware incorporates an RSA or ECC asymmetric encryption algorithm. It uses a pre-set public key to decrypt and verify the digital signature of the new firmware, while simultaneously calculating the hash value of the firmware data and comparing it with the hash value in the signature. If the signature verification passes, the firmware is confirmed to be legitimate and untampered with, and the process proceeds to the next step; if verification fails, the upgrade process terminates and an error is reported.

[0055] Step a3: After successful signature verification, the data flashing firmware is invoked to perform an erase operation on the application backup partition in the flash memory. After erasure, the new application firmware is written to the application backup partition. During the writing process, a page-by-page programming method is used, and a readback verification is performed after each page is written to ensure data correctness.

[0056] Step a4: Invoke the signature verification firmware to perform integrity verification on the new version of the application firmware already written in the application backup partition.

[0057] Specifically, the integrity verification includes CRC check, hash check, and full data comparison to ensure that the new firmware written to the backup partition is completely consistent with the original firmware received.

[0058] Step a5: After the integrity verification passes, the data flashing firmware is invoked to perform an erase operation on the application main partition in the flash memory, and the new version of the application firmware in the application backup partition is copied to the application main partition. After the copy is completed, verification is performed again, and then the upgrade mark is cleared to complete the remote upgrade of the application.

[0059] Step a6: After the upgrade is complete, the system performs a soft reset and re-enters the basic function module. If the basic function module does not detect an upgrade flag, it performs an integrity check on the application. If the check passes, it redirects to the application, and the system resumes normal operation. If the integrity check fails, the system remains in the basic function module awaiting another upgrade, or it rolls back to an older version from the application backup partition.

[0060] Through the above implementation methods, this embodiment achieves the following technical effects: 1. Efficient SRAM resource utilization: By leveraging the time-sharing nature of applications and bootloaders, the non-upgradeable function partitions of applications are released and reused for loading extended function packages during upgrades, increasing the SRAM utilization of the bootloader from 10% in traditional solutions to 70%, without affecting the SRAM requirements of applications during normal operation.

[0061] 2. Significantly reduced FLASH space: By separating complex upgrade logic from the bootloader, basic functional modules reside in FLASH and occupy only 5% of space, saving approximately 15% of FLASH resources compared to traditional solutions, providing more available space for applications.

[0062] 3. Flexible and updatable upgrade functionality: The extended function package supports independent OTA updates. When it is necessary to adjust the UDS flashing process or upgrade the signature verification algorithm, only the extended function package needs to be updated. There is no need to modify the basic function modules that reside in the FLASH memory, which solves the problem that traditional BOOT cannot be updated after one-time flashing.

[0063] 4. Reduced hardware costs: Full OTA upgrade functionality can be achieved with limited SRAM and FLASH resources, eliminating the need to reserve a large amount of hardware resources for upgrade functionality, thus reducing chip selection costs and overall hardware costs.

[0064] Corresponding to the above implementation of the application remote upgrade method based on dynamic loading of static random access memory, this application embodiment also provides an application remote upgrade system based on dynamic loading of static random access memory, used to execute the application remote upgrade method based on dynamic loading of static random access memory described in any of the above embodiments. Figure 5 As shown, the application remote upgrade system based on static random access memory dynamic loading includes: The non-upgradeable function partition data release module is used to release the non-upgradeable function partition of the application in static random access memory in response to the application's upgrade request; the non-upgradeable function partition is used to store data required for functions other than the upgrade process. An extended function package loading module is used to load the extended function package of the bootloader into the released non-upgrade function partition; the extended function package includes multiple extended function firmwares, and a mapping relationship between the name of each extended function firmware and its corresponding interface address; The application upgrade module is used to call the basic function module of the bootloader, determine the interface address of each extended function firmware from the mapping relationship, and jump to the corresponding interface address to call the corresponding extended function firmware, which then performs the upgrade operation on the application.

[0065] Optionally, the system further includes: an extended function package construction module, used to split the bootloader stored in flash memory into a basic function module and an extended function module; the basic function module has a jump function and a copy function, and the extended function module has a signature verification function and a firmware flashing function; the extended function module includes multiple extended function firmwares; for any one of the multiple extended function firmwares, a mapping relationship between the function name and the interface address of the extended function firmware is established; the interface address is used to characterize the storage location of the extended function firmware in the extended function package; and the extended function package of the bootloader is constructed based on the multiple extended function firmwares and the corresponding mapping relationship.

[0066] Optionally, the system further includes: a partitioning module, used to repartition the data resources of the application in the static random access memory according to function, to obtain an upgrade function partition and a non-upgrade function partition; wherein, the upgrade function partition is used to store data required for functions related to the upgrade process, and the upgrade function partition remains occupied before and after receiving an upgrade request; the non-upgrade function partition is used to store data required for functions other than the upgrade process, and is released after receiving an upgrade request, and the released non-upgrade function partition is used to load the extension function package of the bootloader.

[0067] Optionally, the application upgrade module is further configured to: invoke the data receiving firmware to receive a new version of the application firmware from the cloud; invoke the signature verification firmware to perform signature verification on the new version of the application firmware; after the signature verification is successful, invoke the data flashing firmware to perform an erase operation on the application backup partition in the flash memory and write the new version of the application firmware into the application backup partition; invoke the signature verification firmware to perform an integrity check on the new version of the application firmware already written in the application backup partition; after the integrity check is successful, invoke the data flashing firmware to perform an erase operation on the application main partition in the flash memory and copy the new version of the application firmware from the application backup partition to the application main partition, thereby completing the remote upgrade of the application.

[0068] Optionally, the application upgrade module is further configured to: call the query function firmware to filter out the interface address of the data receiving firmware, the interface address of the signature verification firmware, and the interface address of the data flashing firmware from the mapping relationship; call the interface address of the data receiving firmware to enable the data receiving firmware to perform the step of receiving the new version of the application firmware from the cloud; call the interface address of the signature verification firmware to enable the signature verification firmware to perform the step of signing and verifying the new version of the application firmware, or to perform the step of verifying the integrity of the new version of the application firmware already written in the application backup partition; call the interface address of the data flashing firmware to enable the data flashing firmware to perform the step of erasing the application backup partition in the flash memory and writing the new version of the application firmware into the application backup partition; or, call the data flashing firmware to perform the step of erasing the application main partition in the flash memory and copying the new version of the application firmware in the application backup partition to the application main partition.

[0069] Optionally, the non-upgrade function partition data release module is also used to suspend other tasks in the application besides the upgrade task to ensure that the non-upgrade function partition in the static random access memory is not accessed by actual tasks; release the data in the non-upgrade function partition; clear the useless data in the heap area of ​​the static random access memory, and use the released non-upgrade function partition and the heap area as the loading space of the extended function package.

[0070] The remote application upgrade system based on dynamic loading of static random access memory provided in the above embodiments of this application and the remote application upgrade method based on dynamic loading of static random access memory provided in the embodiments of this application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the applications stored therein.

[0071] This application also provides a computer device for executing the above-described method for remotely upgrading applications based on dynamic loading from static random access memory. Please refer to... Figure 6 This illustrates a schematic diagram of a computer device provided by some embodiments of this application. For example... Figure 6 As shown, the computer device 6 includes: a processor 600, a memory 601, a bus 602, and a communication interface 603. The processor 600, the communication interface 603, and the memory 601 are connected via the bus 602. The memory 601 stores a computer program that can run on the processor 600. When the processor 600 runs the computer program, it executes the application remote upgrade method based on dynamic loading of static random access memory provided in any of the foregoing embodiments of this application.

[0072] The memory 601 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 603 (which can be wired or wireless), such as the Internet, wide area network, local area network, or metropolitan area network.

[0073] Bus 602 can be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. Memory 601 is used to store programs. After receiving an execution instruction, the processor 600 executes the program. The remote application upgrade method based on dynamic loading of static random access memory disclosed in any of the foregoing embodiments can be applied to the processor 600, or implemented by the processor 600.

[0074] The processor 600 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 600 or by instructions in software form. The processor 600 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules may reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 601. Processor 600 reads the information in memory 601 and, in conjunction with its hardware, completes the steps of the above method.

[0075] The computer device provided in this application embodiment and the application remote upgrade method based on dynamic loading of static random access memory provided in this application embodiment are based on the same inventive concept and have the same beneficial effects as the methods they adopt, run or implement.

[0076] This application also provides a computer-readable storage medium corresponding to the remote application upgrade method based on dynamic loading of static random access memory provided in the foregoing embodiments. Please refer to... Figure 7 The computer-readable storage medium shown is an optical disc 30, on which a computer program (i.e., a program product) is stored. When the computer program is run by a processor, it executes the application remote upgrade method based on dynamic loading of static random access memory provided in any of the foregoing embodiments.

[0077] It should be noted that examples of the computer-readable storage medium may also 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 optical and magnetic storage media, which will not be elaborated here.

[0078] The computer-readable storage medium provided in the above embodiments of this application and the application remote upgrade method based on static random access memory dynamically loaded in the embodiments of this application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the applications stored therein.

[0079] It should be noted that: Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of this application may be practiced without these specific details. In some instances, well-known structures and techniques have not been shown in detail so as not to obscure the understanding of this specification.

[0080] Similarly, it should be understood that, for the sake of brevity and to aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of this application, various features of this application are sometimes grouped together in a single embodiment, figure, or description thereof. However, this disclosure should not be construed as reflecting a schematic diagram in which the claimed application requires more features than expressly recited in each claim. Rather, as reflected in the following claims, inventive aspects lie in fewer than all features of a single foregoing disclosed embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into that detailed description, wherein each claim itself is a separate embodiment of this application.

[0081] Furthermore, those skilled in the art will understand that although some embodiments described herein include certain features but not others included in other embodiments, combinations of features from different embodiments are intended to be within the scope of this application and form different embodiments. For example, in the following claims, any of the claimed embodiments can be used in any combination.

[0082] The above description is merely a preferred embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for remotely upgrading applications based on dynamic loading from static random access memory, characterized in that, The method includes: In response to an application upgrade request, the application's non-upgrade function partition in static random access memory is released; the non-upgrade function partition is used to store data required for functions outside the upgrade process. The bootloader's extended feature package is loaded into the released non-upgraded feature partition; the extended feature package includes multiple extended feature firmwares, and a mapping relationship between the name of each extended feature firmware and its corresponding interface address; The basic functional modules of the bootloader are invoked to determine the interface address of each extended function firmware from the mapping relationship, and the corresponding extended function firmware is invoked at the corresponding interface address to perform the upgrade operation on the application.

2. The method according to claim 1, characterized in that, Prior to responding to an application upgrade request, the method further includes: The boot program stored in flash memory is split to obtain a basic functional module and an extended functional module; the extended functional module has signature verification function and firmware flashing function; the extended functional module includes multiple extended functional firmware; For any of the multiple extended function firmwares, establish a mapping relationship between the function name and the interface address of the extended function firmware; the interface address is used to characterize the storage location of the extended function firmware in the extended function package; The bootloader's extension package is constructed based on the multiple extended function firmware and their corresponding mapping relationships.

3. The method according to claim 1 or 2, characterized in that, Prior to responding to an application upgrade request, the method further includes: The application's data resources in static random access memory are re-divided according to function to obtain upgrade function partitions and non-upgrade function partitions; The upgrade function partition is used to store data required for functions related to the upgrade process, and the upgrade function partition remains occupied before and after receiving an upgrade request; the non-upgrade function partition is used to store data required for functions other than the upgrade process, and is released after receiving an upgrade request. The released non-upgrade function partition is used to load the extension function package of the bootloader.

4. The method according to claim 1, characterized in that, The extended functionality firmware includes data receiving firmware, signature verification firmware, and data flashing firmware. The application is upgraded by the corresponding extended functionality firmware, including: The data receiving firmware is invoked to receive the new version of the application firmware from the cloud, and the signature verification firmware is invoked to verify the signature of the new version of the application firmware. After the signature verification is passed, the data flashing firmware is invoked to perform an erase operation on the application backup partition in the flash memory, and the new version of the application firmware is written to the application backup partition. The signature verification firmware is invoked to perform an integrity check on the new version of the application firmware already written to the application backup partition. After the integrity verification is passed, the data flashing firmware is invoked to perform an erase operation on the application main partition in the flash memory, and the new version of the application firmware in the application backup partition is copied to the application main partition to complete the remote upgrade of the application.

5. The method according to claim 4, characterized in that, The basic functional module includes querying the firmware; calling the basic functional module of the bootloader to determine the interface address of each extended functional firmware from the mapping relationship, and jumping to the corresponding interface address to call the corresponding extended functional firmware, including: The firmware calls the query function to filter out the interface address of the data receiving firmware, the interface address of the signature verification firmware, and the interface address of the data flashing firmware from the mapping relationship; The interface address of the data receiving firmware is invoked to enable the data receiving firmware to perform the step of receiving the new version of the application firmware from the cloud; The interface address of the signature verification firmware is called so that the signature verification firmware can perform the step of signing the new version of the application firmware, or perform the step of performing integrity verification on the new version of the application firmware already written in the application backup partition. The steps include: calling the interface address of the data flashing firmware to enable the data flashing firmware to perform an erase operation on the application backup partition in the flash memory and write the new version of the application firmware into the application backup partition; or, calling the data flashing firmware to perform an erase operation on the application main partition in the flash memory and copy the new version of the application firmware from the application backup partition to the application main partition.

6. The method according to claim 4 or 5, characterized in that, The release of the non-upgraded function partition includes: Suspend all tasks in the application except the upgrade task to ensure that the non-upgrade function partition in the static random access memory is not accessed by actual tasks. Release the data in the non-upgraded function partition; Clear the useless data in the heap region of the static random access memory, and use the released non-upgraded function partition and the heap region as the loading space for the extended function package.

7. The method according to claim 2, characterized in that, The basic functional modules occupy 15% of the total storage space of the bootloader, and the extended functional modules occupy 85% of the total storage space of the bootloader.

8. A remote application upgrade system based on static random access memory (SRAM) for dynamic loading, characterized in that, The system includes: The non-upgradeable function partition data release module is used to release the non-upgradeable function partition of the application in static random access memory in response to the application's upgrade request; the non-upgradeable function partition is used to store data required for functions other than the upgrade process. An extended function package loading module is used to load the extended function package of the bootloader into the released non-upgrade function partition; the extended function package includes multiple extended function firmwares, and a mapping relationship between the name of each extended function firmware and its corresponding interface address; The application upgrade module is used to call the basic function module of the bootloader, determine the interface address of each extended function firmware from the mapping relationship, and jump to the corresponding interface address to call the corresponding extended function firmware, which then performs the upgrade operation on the application.

9. A computer device, characterized in that, include: A memory and a processor are interconnected, the memory stores computer instructions, and the processor executes the computer instructions to perform the application remote upgrade method based on dynamic loading of static random access memory as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to execute the application remote upgrade method based on dynamic loading of static random access memory as described in any one of claims 1 to 7.