Resource transmission method and device, electronic equipment, medium and computer program product

By transmitting target boot loading firmware in dual-core dual-system electronic devices and enabling high-speed data transmission channels, the problem of low resource transmission rates is solved, and the production line production efficiency and user experience are improved.

CN120386747APending Publication Date: 2025-07-29GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410119616.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-26
Publication Date
2025-07-29

AI Technical Summary

Technical Problem

In dual-core and dual-system electronic equipment, the resource transmission rate in the prior art is low, resulting in low production efficiency of production lines and long waiting time for user upgrade process.

Method used

By in the case where the resource to be upgraded is present in the storage space of the first system, the first system transmission target boots the firmware to the second system and triggers the second system to run the firmware, enabling the high-speed transmission of the resource to be upgraded.

Benefits of technology

It shortens the transmission time of resources to be upgraded, improves production line production efficiency and waiting time during user upgrades, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120386747A_ABST
    Figure CN120386747A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a resource transmission method and device, electronic equipment, a medium and a computer program product, and relates to the field of electronic equipment. Comprising the steps that under the condition that to-be-upgraded resources of a second system exist in a first storage space of a first system, the first system transmits target bootstrap loading firmware to the second system through a first data transmission channel; the first system triggers the second system to run the target bootstrap loading firmware; the second system enables a second data transmission channel between the second system and the first system by running the target boot loading firmware, and the data transmission rate of the second data transmission channel is greater than that of the first data transmission channel; and the first system transmits the to-be-upgraded resource to the second system through the second data transmission channel. By adopting the method provided by the embodiment of the invention, the resource transmission efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present application relate to the field of electronic devices, and particularly to a resource transmission method, apparatus, electronic device, medium, and computer program product. Background Art

[0002] With the continuous upgrade of electronic devices, in order to improve the battery life, a dual-core dual-system device that includes both a high-performance processor and a low-power processor has emerged. The dual systems can cooperate with each other, and each system also has the ability to run independently. Therefore, the high-performance processor and the low-power processor need to have complete operating resources.

[0003] In the related art, in the scenarios of production line production or OTA (Over-The-Air), the high-performance processor receives the resources to be upgraded transmitted externally, and transmits the resources to be upgraded to the low-power processor through a UART (Universal Asynchronous Receiver / Transmitter) channel or an SWD (Serial Wire Debug) channel, so that the low-power processor stores and runs the resources to be upgraded. Summary of the Invention

[0004] Embodiments of the present application provide a resource transmission method, apparatus, electronic device, medium, and computer program product. The technical solutions are as follows:

[0005] On the one hand, embodiments of the present application provide a resource transmission method, which is applied to an electronic device that supports running a first system and a second system; the method includes:

[0006] When there are resources to be upgraded for the second system in the first storage space of the first system, the first system transmits a target bootloader firmware to the second system through a first data transmission channel;

[0007] The first system triggers the second system to run the target bootloader firmware;

[0008] By running the target bootloader firmware, the second system enables a second data transmission channel with the first system, and the data transmission rate of the second data transmission channel is greater than that of the first data transmission channel;

[0009] The first system transmits the resources to be upgraded to the second system through the second data transmission channel.

[0010] On the other hand, an embodiment of the present application provides a resource transmission device, which is used for an electronic device that supports running a first system and a second system; the device includes:

[0011] A first system module, configured to transmit a target bootloader firmware to the second system through a first data transmission channel when there is upgrade resource of the second system in a first storage space of the first system;

[0012] The first system module is further configured to trigger the second system to run the target bootloader firmware;

[0013] A second system module, configured to enable a second data transmission channel with the first system by running the target bootloader firmware, and a data transmission rate of the second data transmission channel is greater than that of the first data transmission channel;

[0014] The first system module is further configured to transmit the upgrade resource to the second system through the second data transmission channel.

[0015] On the other hand, an embodiment of the present application provides an electronic device, which includes a processor and a memory; the memory stores at least one instruction, and the at least one instruction is used to be executed by the processor to implement the resource transmission method described in the above aspect.

[0016] On the other hand, an embodiment of the present application provides a computer-readable storage medium, which stores at least one instruction, and the instruction is loaded and executed by a processor to implement the resource transmission method described in the above aspect.

[0017] On the other hand, an embodiment of the present application provides a computer program product, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the resource transmission method described in the above aspect.

[0018] In an embodiment of the present application, when there are upgrade resources of a second system in the first storage space of a first system, the first system transmits a target bootloader firmware to the second system through a first data transmission channel and triggers the second system to run the target bootloader firmware. Since the volume of the target bootloader firmware is very small, the transmission time for the first system to transmit the target bootloader firmware to the second system through the first data transmission channel is very short. The target bootloader firmware can enable a second data transmission channel between the first system and the second system. Since the data transmission rate of the second data transmission channel is greater than that of the first data transmission channel, the transmission time for the first system to transmit the upgrade resources to the second system through the second data transmission channel is shorter than that through the first data transmission channel. The total time for the first system to transmit the target bootloader firmware to the second system through the first data transmission channel and for the second system to run the target bootloader firmware to enable the second data transmission channel and then for the first system to transmit the upgrade resources to the second system through the second data transmission channel is shorter than the time for the first system to transmit the upgrade resources to the second system through the first data transmission channel. Therefore, by using the resource transmission method proposed in the present application, the transmission time of the upgrade resources can be shortened, the transmission efficiency of the upgrade resources can be improved, thereby improving the production line production efficiency, reducing the waiting time of users during the upgrade process, and enhancing the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0020] Figure 1 It is a diagram of a dual-core communication software framework of an Android operating system provided by an exemplary embodiment of the present application;

[0021] Figure 2 It is a dual-core communication software framework of RTOS provided by an exemplary embodiment of the present application;

[0022] Figure 3 It is a flowchart of a resource transmission method provided by an exemplary embodiment of the present application;

[0023] Figure 4 It is a schematic diagram of a dual-core and dual-system provided by an exemplary embodiment of the present application;

[0024] Figure 5 It is a schematic diagram of a dual-core and dual-system provided by another exemplary embodiment of the present application;

[0025] Figure 6 It is a timing diagram of a first system provided by an exemplary embodiment of the present application for transmitting a target bootloader firmware to a second system through a first data transmission channel;

[0026] Figure 7 It is a flowchart of a first system provided by an exemplary embodiment of the present application for triggering a second system to run a bootloader firmware;

[0027] Figure 8 It is a timing diagram of a first system provided by an exemplary embodiment of the present application for transmitting resources to be upgraded to a second system through a second data transmission channel;

[0028] Figure 9 It is a two-stage schematic diagram of a resource transmission method provided by an exemplary embodiment of the present application;

[0029] Figure 10 It is a schematic diagram of a second system provided by an exemplary embodiment of the present application for parallel execution of writing and receiving a resource data packet;

[0030] Figure 11 It is a structural block diagram of a resource transmission device provided by an exemplary embodiment of the present application;

[0031] Figure 12 It is a structural block diagram of an electronic device provided by an exemplary embodiment of the present application. Detailed implementation manners

[0032] To make the objectives, technical solutions and advantages of the present application clearer, the following will further describe the embodiments of the present application in detail with reference to the accompanying drawings.

[0033] In traditional electronic devices, there is often only a single processor, and events are processed through an operating system running on the processor. However, with the increasing demand of users for the use of electronic devices, it is also required that electronic devices have strong data processing capabilities. Therefore, electronic devices equipped with dual-core and dual-system have emerged. In a possible implementation manner, an electronic device is at least provided with a first processor and a second processor with different processing performances and power consumptions, and a first system runs on the first processor, and a second system runs on the second processor. In addition, a system switching mechanism is also provided in the electronic device configured with dual-core and dual-system.

[0034] For example, in products such as smart watches or smart bracelets, a high-performance processor and a low-power processor can be included at the same time, running on the first system and the second system (i.e., dual-core and dual-system) respectively.

[0035] To achieve the purpose of reducing power consumption, events with low-performance requirements are often processed by a system running on a low-power processor, and when there are events with high-performance processing requirements, the system switches to a system running on a high-power-consuming processor for high-performance event processing to meet the performance requirements of the electronic device.

[0036] Optionally, the first system runs on a low-power processor and the second system runs on a high-performance processor; optionally, the first system runs on a high-performance processor; the second system runs on a low-power processor.

[0037] In the embodiments of the present application, since the first processor and the second processor work asynchronously, and the first system and the second system need to implement system communication (or called dual-core communication). In a possible application scenario, the first system is the Android operating system running on a Central Processing Unit (CPU), and the second system is the Real Time Operating System (RTOS) running on a Micro Controller Unit (MCU).

[0038] Figure 1 It is a dual-core communication software framework diagram of the Android operating system provided by an exemplary embodiment of the present application. This dual-core communication software framework follows the design principles of "low coupling, high reliability, and high reusability", and includes module development of Kernel (kernel), HIDL (Hardware Abstraction Layer Interface Description Language), Native Service (local service), Framework Service (framework service), Framework API (framework interface), and APP (application) parts.

[0039] Among them, the APP module includes functional modules such as Launcher (desktop launcher), Setting (settings), and SystemUI (system user interface); the Framework API module includes management modules such as MCUManager (MCU management), SensorManager (sensor management), and LocationManager (location management); the Framework Service module includes service modules such as MCUManagerService (MCU management service), SystemSensorManager (system sensor management), and LocationManagerService (location management service); the Native Service module includes service modules such as dccservice (dcc service) and Sensorservice (sensor service); the HIDL module includes modules such as SensorHAL (sensor hardware abstraction layer) and GPS HAL (global positioning system hardware abstraction layer). The Kernel module includes DCC Transfer Drivers such as dcc_data, Mcu_sensor, and Mcu_gps.

[0040] As the interface layer connecting the upper and lower layers in the dual-core communication software framework, the transport layer shields the transport details of the underlying system (data link layer) communication from the application layer and provides a service channel for the application scenario; as the main body of service provision, the application layer responds to human-computer interaction and transmits the data generated during human-computer interaction through the transport layer, as well as responds to external data requests.

[0041] RTOS is designed based on the peer-to-peer principle. Taking an electronic device as a smartwatch as an example, Figure 2 It is the dual-core communication software framework of RTOS provided by an exemplary embodiment of the present application.

[0042] As Figure 2 shown, the dual-core communication software framework of RTOS is divided into an Application Layer, a Service Layer, a Framework Layer, a Hardware abstraction layer, and a Platform Layer.

[0043] Among them, the application layer includes application modules such as watch face, Daily Tracker, Messagecenter, Voice around Apps, Health Apps, Settings, etc.; the service layer includes service modules such as Sport&health task, System managertask, AMS (Activity Management Service), AudioService, Log Service, OFTP Service (Odette File Transfer Protocol Service), BT Service (Bluetooth Service), DelegateService, RPC Service (Remote Call Service), sensor Service, storage Service, etc.; the framework layer includes framework modules such as Message Pub, UIFramework (User Interface Framework), G2D Engine, Audio Middleware, Preference, File system, Algorithms, AsycEvent, etc.; the hardware abstraction layer includes hardware abstraction modules such as Screen / TP (Screen / Touch Screen), sensors, Keypad, Motor, etc.; the platform layer includes Board Support Package (BSP) and LOW level Driver. Among them, BSP includes Screen / TP, Codec (Encoder / Decoder), sensors, Flash (Flash Memory), PSRAM (Pseudo Static Random Access Memory), etc., and the low level driver includes Uart (Universal Asynchronous Receiver / Transmitter), ADC (Analog-to-Digital Converter), GPIO (General Purpose Input / Output), SPI (Serial Peripheral Interface), I2C (Inter-Integrated Circuit), IOS (Input / Output System), PCM (Pulse Code Modulation), I2S (Integrated Audio Bus), HWTimer (Hardware Timer).

[0044] It should be noted that the above dual-core communication software framework is only for illustrative purposes. Those skilled in the art can also add, delete, or modify the above framework according to actual needs. The embodiments of the present application do not limit the specific structure of the dual-core communication software framework.

[0045] When the two systems work, they cooperate with each other, and each system also has the ability to operate independently. Therefore, the high-performance processor and the low-power processor need to have complete operating resources, and the amount of these operating resources is usually large.

[0046] In the related art, during the operation of an application, data related to the operation of the application can be transmitted between the high-performance processor and the low-power processor through an SPI (Serial Peripheral Interface) channel; in the scenarios of production line production or OTA, the high-performance processor receives the resources to be upgraded transmitted externally, and usually transmits the resources to be upgraded to the low-power processor through a UART channel or an SWD channel, so that the low-power processor stores and runs the resources to be upgraded. Among them, the data transmission rate of the UART channel or the SWD channel is smaller than that of the SPI channel.

[0047] In the scenario of production line production, it is necessary to increase the resource download rate to improve production efficiency; after the product leaves the factory, it is necessary to increase the resource download rate to reduce the impact on users during the upgrade process. Therefore, when downloading or updating resources, the dual-core dual-system needs a resource transmission method with a higher transmission rate.

[0048] See Figure 3 , Figure 3 FIG. is a flowchart of a resource transmission method provided by an exemplary embodiment of the present application. This method is applied to an electronic device that supports the operation of a first system and a second system.

[0049] Among them, the electronic device is a dual-core dual-system device. Optionally, the electronic device is a device such as a smart watch or a smart bracelet that includes a high-performance processor and a low-power processor.

[0050] The high-performance processor and the low-power processor in the electronic device run on the first system and the second system respectively. Since the first processor and the second processor work asynchronously, and the first system and the second system need to implement system communication (or called dual-core communication). In a possible application scenario, the first system is the Android operating system running on a Central Processing Unit (CPU), and the second system is the Real Time Operating System (RTOS) running on a Micro Controller Unit (MCU).

[0051] In other embodiments, the low-power processor runs on the first system, the first system is the Real Time Operating System running on the micro control unit, the high-performance processor runs on the second system, and the second system is the Android operating system running on the central processor.

[0052] The method includes the following steps.

[0053] Step 301, when there is a resource to be upgraded of the second system in the first storage space of the first system, the first system transmits a target bootloader firmware to the second system through a first data transmission channel.

[0054] In some embodiments, the first system is a system running on a high-performance processor (such as an Android operating system), and the second system is a system running on a low-power processor (such as a real-time operating system). In other embodiments, the first system is a system running on a low-power processor, and the second system is a system running on a high-performance processor. Hereinafter, taking the first system as an Android operating system running on a central processing unit and the second system as a real-time operating system running on a microcontroller unit as an example, the resource transmission method will be described.

[0055] See Figure 4 , Figure 4 which is a schematic diagram of a dual-core and dual-system provided by an exemplary embodiment of the present application.

[0056] During the production process on the production line, the first system 410 receives resources transmitted by an external device through a USB (Universal Serial Bus) channel 401; during the OTA process, the first system 410 receives resources transmitted by an external device through a WIFI (Wireless Fidelity) channel 402. Among them, the resources received by the first system 410 include the resources to be upgraded of the second system 420, and the resources to be upgraded can be resources for downloading or upgrading the application programs of the second system.

[0057] Optionally, the resources to be upgraded include application firmware and file images of application programs.

[0058] Optionally, the resources to be upgraded further include system resources, which are resources for maintaining the normal operation of the second system, such as the clock required for the operation of the second system, the watchdog for preventing the second system from crashing, etc.

[0059] Optionally, the resources to be upgraded further include peripheral resources, such as analog peripheral resources, timers, etc.

[0060] After receiving the resources to be upgraded from the second system 420 through the USB channel 401 or the WIFI channel 402, the first system 410 stores the resources to be upgraded in the first storage space 411 of the first system. The first storage space 411 of the first system and the second storage space 421 of the second system are non-volatile storage devices. Optionally, the first storage space or the second storage space is an eMMC (embedded Multi Media Card). Optionally, the first storage space or the second storage space can also be of types such as Flash (flash memory), FeRAM (Ferroelectric Random Access Memory), MRAM (Magnetoresistive Random Access Memory), etc. The embodiments of the present application do not limit the specific types of the first storage space and the second storage space.

[0061] Optionally, the first data transmission channel is a UART channel or an SWD channel.

[0062] The target bootloader is used to enable the second data transmission channel between the first system and the second system to achieve high-speed transmission of the resources to be upgraded between the first system and the second system. In the embodiments of the present application, the target bootloader can also be referred to as HS-bootloader (High Speed bootloader).

[0063] In a normal scenario, the volume of the target bootloader is much smaller than the volume of the resources to be upgraded. By way of example only, the volume of the target bootloader is about 200 kb, and the volume of the resources to be upgraded is about 300 M. Therefore, the transmission time for the first system to transmit the target bootloader to the second system through the first data transmission channel is usually very short.

[0064] In a possible implementation manner, the target bootloader is included in the resources to be upgraded and is sent to the first system 410 by an external device through the USB channel 401 or the WIFI channel 402. In some embodiments, before transmitting the target bootloader to the second system 420, the first system 410 can first transmit a program for assisting in downloading the target bootloader, such as progarmmer.bin, to the second system 420 through the first data transmission channel 431.

[0065] In another possible implementation manner, the target bootloader can be pre-stored in the first storage space of the first system 410.

[0066] In some embodiments, after the first system 410 receives the upgrade resource including the target boot firmware sent by the external device, it can compare the target boot firmware with the historical boot firmware stored in the second storage space of the second system. When the target boot firmware is inconsistent with the historical boot firmware, it transmits the target boot firmware to the second system 420 through the first data transmission channel 431.

[0067] It should be noted that the target boot firmware can also be pre-stored in the second storage space of the second system. In the case where the target boot firmware is pre-stored in the second storage space, the first system does not need to transmit the target boot firmware to the second system through the first data transmission channel again.

[0068] Step 302, the first system triggers the second system to run the target boot firmware.

[0069] In a possible implementation, the first system can trigger a reset signal by pulling the reset pin. When the reset signal is detected, the second system runs the target boot firmware. The first system can also trigger the second system to run the target boot firmware in other ways. For example, the first system can send an instruction to the second system through the first data transmission channel. The embodiments of the present application do not limit this.

[0070] Step 303, the second system enables the second data transmission channel between the first system by running the target boot firmware. The data transmission rate of the second data transmission channel is greater than that of the first data transmission channel.

[0071] Optionally, the second data transmission channel is an SPI channel.

[0072] The data transmission rate of the second data transmission channel is greater than that of the first data transmission channel. By way of example only, the second data transmission channel is a 24M SPI transmission channel, and the first data transmission channel is a UART channel. It has been experimentally proven that the data transmission rate of the second data transmission channel is more than 5 times that of the first data transmission channel.

[0073] In some embodiments, when the second system 420 detects the reset signal, it enables the second data transmission channel 432 between the first system 410 by running the target boot firmware.

[0074] Step 304, the first system transmits the upgrade resource to the second system through the second data transmission channel.

[0075] In some embodiments, after the second system receives the resource to be upgraded, it may write the resource to be upgraded into the second storage space. The second storage space may include different storage sub-spaces. Optionally, different storage sub-spaces are used to store different types of resources to be upgraded.

[0076] Optionally, the resource to be upgraded is transmitted in the form of a resource data packet, and the second system writes the resource data packet in parallel with receiving the resource data packet. That is, the second system writes and receives the resource data packet in a pipeline manner.

[0077] In summary, when there is a resource to be upgraded in the second system in the first storage space of the first system, the first system transmits the target bootloader firmware to the second system through the first data transmission channel and triggers the second system to run the target bootloader firmware. Since the volume of the target bootloader firmware is very small, the transmission time for the first system to transmit the target bootloader firmware to the second system through the first data transmission channel is very short; the target bootloader firmware can enable the second data transmission channel between the first system and the second system. Since the data transmission rate of the second data transmission channel is greater than the transmission rate of the first data transmission channel, the transmission time for the first system to transmit the resource to be upgraded to the second system through the second data transmission channel is shorter than the time for transmitting the resource to be upgraded to the second system through the first data transmission channel. The total time for the first system to transmit the target bootloader firmware to the second system through the first data transmission channel and the second system to run the target bootloader firmware to enable the second data transmission channel and then the first system to transmit the resource to be upgraded to the second system through the second data transmission channel is shorter than the time for the first system to transmit the resource to be upgraded to the second system through the first data transmission channel. Therefore, by using the resource transmission method proposed in this application, the transmission time of the resource to be upgraded can be shortened, the transmission efficiency of the resource to be upgraded can be improved, thereby improving the production line production efficiency, reducing the waiting time of users during the upgrade process, and enhancing the user experience.

[0078] In some embodiments, when there is a resource to be upgraded in the second system in the first storage space of the first system, the first system triggers a reset signal.

[0079] Optionally, the first system pulls the reset pin to trigger the reset signal.

[0080] When the reset signal is detected, the second system sends a first handshake request to the first system.

[0081] The first handshake request is used to request the first system to indicate the transmission of the target bootloader firmware (HS-bootloader.bin) or to indicate the second system to run the target bootloader firmware.

[0082] In some embodiments, when the resources to be upgraded in the second system are upgraded, the first system does not respond to the first handshake request to instruct the second system to run the target bootloader firmware.

[0083] In some embodiments, when the resources to be upgraded in the second system are not upgraded, the first system sends a first handshake response corresponding to the first handshake request to the second system.

[0084] The second system sends an acknowledgement response to the first handshake response to the first system.

[0085] When receiving the acknowledgement response, the first system transmits the target bootloader firmware to the second system through the first data transmission channel.

[0086] See Figure 5 , Figure 5 is a timing diagram of the first system transmitting the target bootloader firmware to the second system through the first data transmission channel provided by an exemplary embodiment of the present application.

[0087] Among them, steps 5.1 to 5.2.3 are the process of the first handshake between the first system and the second system.

[0088] Step 5.1, when there are resources to be upgraded in the second system in the first storage space of the first system, the first system pulls the reset pin to trigger a reset signal.

[0089] Step 5.2.1, when detecting the reset signal, the second system sends a first handshake request to the first system.

[0090] Step 5.2.2, when the transmission of the target bootloader firmware to the second system is not completed, the first system sends a first handshake response corresponding to the first handshake request to the second system.

[0091] When the transmission of the target bootloader firmware to the second system is completed, the first system does not send a first handshake response to the second system.

[0092] When not receiving the first handshake response corresponding to the first handshake request, the second system runs the target bootloader firmware.

[0093] Step 5.2.3, the second system sends an acknowledgement response to the first handshake response to the first system.

[0094] In some embodiments, before transmitting the standard bootloader firmware to the second system, the first system may first transmit a program for assisting in downloading the target bootloader firmware, such as progarmmer.bin, to the second system through the first data transmission channel for subsequent assisting in executing the download of HS-bootloader.bin.

[0095] Among them, steps 5.3.1 to 5.3.3 are the process of transmitting progarmmer.bin.

[0096] In step 5.3.1, the first system transmits progarmmer.bin to the second system through the first data channel.

[0097] Optionally, after receiving progarmmer.bin, the second system writes progarmmer.bin into the RAM (Random Access Memory) of the second system.

[0098] In step 5.3.2, the second system returns a transmission success response of progarmmer.bin to the first system through the first data channel.

[0099] In step 5.3.3, the first system sends an instruction to request the execution of programmer.bin to the second system through the first data channel.

[0100] Based on the received instruction, the second system jumps to and executes programmer.bin.

[0101] After the second system executes programmer.bin for assisting in downloading the target bootloader firmware, the first system can notify the second system to erase the historical bootloader firmware for writing the current new target bootloader firmware.

[0102] Among them, steps 5.4.1 to 5.4.4 are the process of erasing the historical bootloader firmware.

[0103] In step 5.4.1, the first system sends a storage space configuration acquisition request to the second system through the first data transmission channel.

[0104] Among them, the storage space configuration information is used to indicate the configuration of the storage space for storing the bootloader firmware.

[0105] Optionally, the storage space configuration information may include the storage partition information of the second system for storing the bootloader firmware. For example, the storage space configuration information includes that the Nor Flash ID is 2, indicating that the second system stores the bootloader firmware in the second storage partition of the Nor Flash.

[0106] Optionally, the storage space configuration information may also include the data alignment method of the bootloader firmware. Among them, the data alignment method indicates that the bootloader firmware is aligned according to the target bit number during transmission and storage. For example, alignment is performed according to 4 bits or 8 bits.

[0107] Step 5.4.2, the second system returns the storage space configuration information to the first system through the first data transmission channel.

[0108] For example, the second system returns to the first system the storage partition information for the bootloader firmware, where the Nor Flash ID is 2.

[0109] Step 5.4.3, the first system sends a firmware erasure instruction to the second system through the first data transmission channel to notify the second system to erase the historical bootloader firmware in the storage partition.

[0110] In a possible scenario, during the previous transmission of the resources to be upgraded, the historical bootloader firmware has been stored in the storage partition of the second system. Therefore, the second system needs to erase the historical bootloader firmware so that the target bootloader firmware corresponding to the resources to be upgraded this time can be written into this storage partition subsequently.

[0111] The second system erases the historical bootloader firmware based on the firmware erasure instruction.

[0112] For example, the second system performs a firmware erasure operation on the storage partition corresponding to the storage partition information with Nor Flash ID 2 to erase the historical bootloader firmware.

[0113] Step 5.4.4, when the erasure of the historical bootloader firmware is completed, the second system returns an erasure completion response to the first system through the first data transmission channel.

[0114] When the erasure of the historical bootloader firmware is completed, the first system transmits the target bootloader firmware to the second system through the first data transmission channel.

[0115] Steps 5.5.1 to 5.5.2 are the process of transmitting the target bootloader firmware.

[0116] Step 5.5.1, the first system transmits the target bootloader firmware (HS-bootloader.bin) to the second system through the first data transmission channel.

[0117] When the erasure of the historical bootloader firmware is completed, the first system transmits the target bootloader firmware to the second system through the first data transmission channel based on the storage space configuration information.

[0118] Optionally, when the storage space configuration information includes the data alignment method of the target bootloader firmware, the first system transmits the target bootloader firmware according to this data alignment method, and the second system writes the target bootloader firmware according to this data alignment method.

[0119] The second system writes the target bootloader firmware into the storage partition corresponding to the storage partition information. For example, write the target bootloader firmware into the storage partition corresponding to Nor Flash ID 2.

[0120] Step 5.5.2, when the transmission of the target bootloader firmware is completed, the second system sends a firmware transmission completion response to the first system.

[0121] Among them, the firmware transmission completion response indicates that the HS-bootloader.bin transmission is completed.

[0122] Step 5.6, when receiving the firmware transmission completion response, the first system triggers a reset signal.

[0123] Optionally, the first system pulls the reset pin again to trigger the reset signal.

[0124] When the second system detects the reset signal again, it sends a first handshake request to the first system again. In the case of not receiving the first handshake response corresponding to the first handshake request, the second system runs the target bootloader firmware.

[0125] In this embodiment, when the first system fails to transmit the target bootloader firmware to the second system, the first system transmits the programmer.bin to the second system to assist in downloading the target bootloader firmware; the first system sends a firmware erase instruction to the second system, which can erase the historical bootloader firmware to write the new target bootloader firmware; when the first system completes the transmission of the target bootloader firmware to the second system, the second system executes the target bootloader firmware to enable the second data transmission channel for subsequent high-rate transmission of the resources to be upgraded.

[0126] In some embodiments, the first system can determine whether the historical bootloader firmware is the same as the target bootloader firmware. If they are the same, the step of transmitting the target bootloader firmware is omitted, thereby further improving the resource transmission efficiency.

[0127] See Figure 6 , Figure 6 is a flowchart of the first system triggering the second system to run the bootloader firmware provided by an exemplary embodiment of the present application. The first system triggering the second system to run the bootloader firmware includes the following steps.

[0128] Step 610, when there is a resource to be updated of the second system in the first storage space of the first system, the first system determines whether the target bootloader firmware corresponding to the resource to be upgraded is the same as the historical bootloader firmware.

[0129] In some embodiments, the first system may first determine whether the file sizes of the target bootloader firmware and the historical bootloader firmware are the same; in the case where the file sizes are the same, it then determines whether the file contents are the same to improve the determination efficiency.

[0130] Regarding the specific method for the first system to determine whether the file contents of the target bootloader firmware and the historical bootloader firmware are the same, in a possible implementation, the update probabilities corresponding to different file regions in the bootloader firmware can be set in the first system in advance. The first system compares the file contents of the target bootloader firmware and the historical bootloader firmware one by one in the order of decreasing update probability to determine whether the target bootloader firmware and the historical bootloader firmware are the same, further improving the determination efficiency.

[0131] Step 621, in the case where the target bootloader firmware is different from the historical bootloader firmware, the first system sends a firmware erasure instruction to the second system.

[0132] Step 622, the second system erases the historical bootloader firmware based on the firmware erasure instruction.

[0133] Step 623, in the case where the historical bootloader firmware has been erased, the first system transmits the target bootloader firmware to the second system through the first data transmission channel.

[0134] Step 624, the first system triggers the second system to run the target bootloader firmware.

[0135] Step 631, in the case where the bootloader firmware is the same as the historical bootloader firmware, the first system triggers the second system to run the historical bootloader firmware.

[0136] Step 640, the second system enables the second data transmission channel with the first system by running the bootloader firmware, and the data transmission rate of the second data transmission channel is greater than that of the first data transmission channel.

[0137] Wherein, in the case of executing step 624, the bootloader firmware is the target bootloader firmware; in the case of executing step 631, the bootloader firmware is the historical bootloader firmware.

[0138] Step 650, the first system transmits the resource to be upgraded to the second system through the second data transmission channel.

[0139] In this embodiment, the first system compares the target bootloader firmware with the historical bootloader firmware. When the target bootloader firmware is the same as the historical bootloader firmware, the second system directly runs the historical bootloader firmware, thus eliminating the steps of the first system transmitting the target bootloader firmware through the first data transmission channel, the second system erasing the historical bootloader firmware and then writing the bootloader firmware into the storage space, thereby improving the efficiency of the resource transmission process.

[0140] See Figure 7 , Figure 7 which is a timing diagram of the first system transmitting the resources to be upgraded to the second system through the second data transmission channel provided by an exemplary embodiment of the present application.

[0141] Among them, steps 7.1.1 to 7.1.4 are the process of the first system and the second system performing the second handshake.

[0142] In step 7.1.1, the first system triggers an upgrade signal. The upgrade signal is used to indicate the current transmission requirement for the resources to be upgraded.

[0143] Exemplarily, the first system triggers the upgrade signal by pulling the reset pin and pulling up the upgrade request pin.

[0144] In step 7.1.2, when the upgrade signal is detected, the second system initializes the second data transmission channel by running the target bootloader firmware.

[0145] Exemplarily, when the second system detects that the upgrade request pin is at a high level, it initializes the second data transmission channel.

[0146] In step 7.1.3, the first system sends a second handshake request to the second system through the second data transmission channel.

[0147] The second handshake request is used to request the transmission of the resources to be upgraded through the second data transmission channel.

[0148] In step 7.1.4, the second system sends a second handshake response corresponding to the second handshake request to the first system through the second data transmission channel to enable the second data transmission channel.

[0149] In some embodiments, the first system can read the version information corresponding to each resource to be upgraded from the second system and determine whether to transmit each resource to be upgraded based on the version information.

[0150] In step 7.2.1, the first system sends a version information acquisition request to the second system.

[0151] The version information acquisition request is used to acquire the version information corresponding to the resources to be upgraded, for example, the version number.

[0152] Optionally, the first system sends a version information acquisition request to the second system through the first data transmission channel or the second data transmission channel.

[0153] Step 7.2.2, the second system returns the current resource version information to the first system.

[0154] The current resource version information refers to the version information of the resource corresponding to the resource to be upgraded stored in the second storage space of the second system. For example, if the version number corresponding to the resource to be upgraded is version 2.0 and the current resource version information is version 1.0.

[0155] Optionally, the second system returns the version information to the first system through the first data transmission channel or the second data transmission channel.

[0156] When the current resource version information is consistent with the version information of the resource to be upgraded, the first system stops transmitting the resource to be upgraded to the second system and stops triggering the upgrade signal to indicate that the resource upgrade is completed.

[0157] When the current resource version information is inconsistent with the version information of the resource to be upgraded, the first system sends a resource transmission request to the second system through the second data transmission channel.

[0158] The second system sends a request response to the resource transmission request to the first system.

[0159] When receiving the request response, the first system transmits the resource to be upgraded to the second system through the second data transmission channel.

[0160] Among them, different types of resources to be upgraded correspond to different types of resource transmission requests. In some embodiments, the resource transmission request includes at least two resource transmission sub-requests for different types of resources.

[0161] For example, if the resource to be upgraded is a file image, the corresponding resource transmission sub-request is a file image transmission sub-request; if the resource to be upgraded is an application firmware, the corresponding resource transmission request is an application firmware transmission sub-request.

[0162] To store different types of resources to be upgraded, in some embodiments, the second storage space of the second system includes at least two storage sub-spaces. The second system determines the target storage sub-space corresponding to the sub-resource to be upgraded based on the resource transmission sub-request through the running target bootloader firmware; and the second system writes the sub-resource to be upgraded into the target storage sub-space.

[0163] For example, when the resource transfer sub-request is a file resource transfer sub-request, the second system determines, through the running target bootloader firmware, that the target storage subspace is the eMMC; when the resource transfer sub-request is a firmware resource transfer sub-request, the second system determines, through the running target bootloader firmware, that the target storage subspace is the NorFlash.

[0164] Steps 7.3.1 to 7.3.8 are the process of the first system transferring file resources to the second system through the second data transfer channel.

[0165] In step 7.3.1, the first system sends a file resource transfer sub-request to the second system through the second data transfer channel. The file resource transfer sub-request is used to request the transfer of file resources to the second system.

[0166] In some embodiments, the resource transfer request includes storage partition information, which is used to indicate the partition for storing the resource to be upgraded.

[0167] For example, the file resource transfer sub-request includes storage partition information with a Nor Flash ID of 3, indicating that the partition for the second system to store the file resource is the 3rd storage partition in the Nor Flash.

[0168] In some embodiments, the resource transfer request further includes a target check value.

[0169] The target check value is generated by the first system based on the resource to be upgraded, and is used to compare with the read-back check value during the process of writing the resource to ensure the accuracy of the resource writing.

[0170] Optionally, the target check value is a parity check value or other types of check values.

[0171] In step 7.3.2, the second system performs a validity check on the storage partition information included in the resource transfer request and records the target check value.

[0172] In a possible implementation, the second system compares the storage partition information with the information corresponding to each storage partition in the second storage space one by one to determine the validity of the storage partition.

[0173] For example, if the storage partition information has an eMMC ID of 3 and there is a storage partition numbered 3 in the eMMC of the second storage space, then the storage partition information is valid; if the storage partition information has an eMMC ID of 999 and there is no storage partition numbered 999 in the eMMC of the second storage space, then the storage partition information is invalid.

[0174] Exemplarily, if the target verification value in the resource transfer request is also 0, the second system records the target verification value 0.

[0175] Step 7.3.3, when the storage partition information passes the validity verification, the second system sends a request response to the first system for the resource transfer request.

[0176] Step 7.3.4, when receiving the request response, the first system transfers the file resource to the second system through the second data transfer channel.

[0177] Step 7.3.5, during the process of receiving the resource to be upgraded transferred by the first system, the second system performs a read-back verification on the written resource to obtain a read-back verification value.

[0178] In some embodiments, when receiving the first file resource package corresponding to the file resource transferred by the first system, the second system writes the first file resource package into the storage partition numbered 3 in the eMMC and immediately performs a read-back verification on the first file resource package to obtain the read-back verification value corresponding to the first file resource package (assumed to be 1).

[0179] In some embodiments, the read-back verification value corresponding to the first file resource package is generated by the second system based on the first file resource package.

[0180] When receiving the second file resource package corresponding to the file resource transferred by the first system, the second system writes the second file resource package into the storage partition numbered 3 in the eMMC and immediately performs a read-back verification on the second file resource package to obtain the read-back verification value corresponding to the second file resource package (assumed to be 2).

[0181] In some embodiments, the read-back verification value corresponding to the second file resource package is generated by the second system based on the second file resource package and the read-back verification value corresponding to the first file resource package.

[0182] ……

[0183] When receiving the last file resource package corresponding to the file resource transferred by the first system, the second system writes the last file resource package into the storage partition numbered 3 in the eMMC and immediately performs a read-back verification on the last file resource package to obtain the read-back verification value corresponding to the last file resource package (assumed to be 0).

[0184] When the resource to be upgraded is completely written, the second system performs a write verification on the written resource to be upgraded based on the read-back verification value and the target verification value to obtain a write verification result.

[0185] In some embodiments, when the read-back verification value is consistent with the target verification value, the second system determines that the write verification result is a correct write.

[0186] Step 7.3.6, when the second system receives the file resources sent by the first system through the second data transmission channel, the second system sends a transmission result response to the first system through the second data transmission channel.

[0187] Optionally, for each file resource package, the second system sends a transmission result response corresponding to the file resource package to the first system.

[0188] Optionally, the second system only replies with the transmission result responses corresponding to some of the file resource packages to reduce the data transmission volume. For example, the second system can only reply with the transmission result response corresponding to the last file resource package.

[0189] Step 7.3.7, when the file resource transmission is completed, the first system sends a file resource upgrade result reading request to the second system.

[0190] Step 7.3.8, based on the write verification result of the file resources, the second system sends the file resource upgrade result to the first system through the second data transmission channel.

[0191] In some embodiments, when the write verification result is a correct write, the second system sends a file resource upgrade result indicating a successful upgrade to the first system through the second data transmission channel.

[0192] In some embodiments, when the write verification result is not a correct write, the second system sends a file resource upgrade result indicating a failed upgrade to the first system through the second data transmission channel to instruct the first system to retransmit the resources to be upgraded through the second data transmission channel.

[0193] In this embodiment, during the process of receiving the resources to be upgraded transmitted by the first system, the second system performs a read-back verification on the written resources to obtain a read-back verification value. And when the resources to be upgraded are completely written, the second system determines the write verification result based on the read-back verification value and the target verification value. On the one hand, it can ensure the correctness of the write and improve the upgrade quality of the resources to be upgraded; on the other hand, verifying while writing can save the read-back verification time, and the read-back verification can be completed as soon as possible after the transmission is completed, improving the efficiency of resource transmission.

[0194] Steps 7.4.1 to 7.4.8 are the process of the first system transmitting firmware resources to the second system through the second data transmission channel.

[0195] Step 7.4.1, the first system sends a firmware resource transmission sub-request to the second system through the second data transmission channel. The firmware resource transmission sub-request is used to request to transmit firmware resources to the second system.

[0196] It should be noted that the firmware resource refers to the application program firmware to be upgraded, rather than the HS-bootloader firmware that enables the second data transmission channel.

[0197] Exemplarily, the firmware resources include m55.bin, SensorHub.bin, etc. Among them, SensorHub.bin is the application program firmware corresponding to the sensor management component.

[0198] In some embodiments, the resource transmission request includes storage partition information, which is used to indicate the partition for storing the resources to be upgraded.

[0199] For example only, the firmware resource transmission sub-request includes storage partition information with Nor Flash ID 5, indicating that the partition for storing the second system's file resources is the 5th storage partition in Nor Flash.

[0200] In some embodiments, the firmware resource transmission sub-request further includes the target check value corresponding to the storage partition.

[0201] Step 7.4.2, the second system erases the old firmware according to the storage partition information included in the firmware resource transmission sub-request.

[0202] For example only, the second system erases the old firmware from the 5th storage partition in Nor Flash.

[0203] Step 7.4.3, the second system sends a request response to the first system for the firmware resource transmission sub-request.

[0204] Step 7.4.4, upon receiving the request response, the first system transmits the firmware resources to the second system through the second data transmission channel.

[0205] Step 7.4.5, during the process of receiving the resources to be upgraded, the second system performs a read-back check to obtain a read-back check value; and based on the target check value and the read-back check value, determines the write check result.

[0206] The process of performing a read-back check on the firmware resources is similar to the process of performing a read-back check on the file resources. For more details about the read-back check, refer to Step 5.3.5, which will not be elaborated here.

[0207] Step 7.4.6, upon receiving the firmware resources sent by the first system through the second data transmission channel, the second system sends a transmission result response to the first system through the second data transmission channel.

[0208] Optionally, for each firmware resource package, the second system will send a transmission result response corresponding to the firmware resource package to the first system.

[0209] Optionally, the second system only replies to the transmission result responses corresponding to some of the firmware resource packages to reduce the data transmission volume. For example, the second system can only reply to the transmission result response corresponding to the last firmware resource package.

[0210] Step 7.4.7, when the firmware resource transmission is completed, the first system sends a firmware resource upgrade result reading request to the second system.

[0211] Step 7.4.8, based on the write verification result of the firmware resource, the second system sends the firmware resource upgrade result to the first system through the second data transmission channel.

[0212] Step 7.5, when the transmission of the resources to be upgraded is completed, the first system stops triggering the upgrade signal.

[0213] Optionally, when the resource upgrade results of all the resources to be upgraded are all upgrade successes, the first system pulls the reset pin again and pulls down the upgrade request pin to stop triggering the upgrade signal.

[0214] See Figure 8 , Figure 8 which is a schematic diagram of a dual-core and dual-system provided by another exemplary embodiment of the present application.

[0215] As Figure 8 shown, the target bootloader firmware can be transmitted between the first system 810 and the second system 820 through the first data transmission channel 831. When the transmission of the target bootloader firmware is completed, the target bootloader firmware enables the second data transmission channel 832, and the first system 5810 transmits the resources to be upgraded to the second system 820 through the second data transmission channel 832.

[0216] In addition, the first processor corresponding to the first system 810 and the second processor corresponding to the second system 820 are connected through the reset pin 841 and the upgrade request pin 842. The first storage space of the first system 810 includes eMMC-1 (811); the second storage space of the second system 820 includes eMMC-2 (821) and Nor Flash (822).

[0217] See Figure 9 , Figure 9 which is a two-stage schematic diagram of the resource transmission method provided by an exemplary embodiment of the present application.

[0218] As Figure 9 shown, in the resource transmission method proposed in the present application, there are two data transmission stages, where the first stage 901 is the MCU-Boot stage. In the first stage, the first system and the second system transmit the HS-bootloader through the first data transmission channel.

[0219] The first stage 901 includes a first sub-stage 911, and the second system downloads the HS-bootloader to the second storage space through the first data transmission channel.

[0220] In some embodiments, the first data transmission channel is a UART channel or an SWD channel.

[0221] In some embodiments, the second storage space of the second system includes Nor Flash and eMMC-2, and the second system stores the HS-bootloader in Nor Flash.

[0222] Among them, the HS-bootloader is the target bootloader firmware. By running the target bootloader firmware, the second system enables the second data transmission channel with the first system, and the data transmission rate of the second data transmission channel is greater than that of the first data transmission channel.

[0223] The second stage 902 is the HS-bootloader stage. In the second stage, the first system and the second system transmit the resources to be upgraded through the second data transmission channel.

[0224] In some embodiments, the second data transmission channel is an SPI channel.

[0225] In some embodiments, through the running target bootloader firmware, the second system determines the target storage subspace corresponding to the sub-resource to be upgraded based on the resource transmission sub-request, and the second system writes the sub-resource to be upgraded into the target storage subspace.

[0226] The target storage subspace includes Nor Flash and eMMC. Among them, Nor Flash is used to write the firmware resources in the resources to be upgraded, and eMMC (referring to eMMC-2) is used to write the file resources in the resources to be upgraded.

[0227] The second stage 902 includes a second sub-stage 921 and a third sub-stage 922.

[0228] In the second sub-stage 921, the second system downloads the firmware resources to NorFlash through the second data transmission channel.

[0229] In the third sub-stage 922, the second system downloads the file resources to eMMC through the second data transmission channel.

[0230] Among them, the second sub-stage 921 and the third sub-stage 922 do not have a sequential execution order. The first system can choose to download the firmware resources first or the file resources first according to needs, and the embodiments of the present application do not limit this.

[0231] In a possible implementation, the first system can obtain the priorities corresponding to different resource types of the resources to be upgraded, and preferentially transmit the data corresponding to the resource types with higher priorities. Among them, the priorities can be determined based on historical resource transmission records. For example, the first system can obtain the historical resource transmission records with a transmission time less than the time threshold, and count the first average time for completing the transmission of all resources in the historical resource transmission records that preferentially transmit file resources, and the second average time for completing the transmission of all resources in the historical resource transmission records that preferentially transmit firmware resources; in the case where the first average time is greater than the second average time, it is determined that the priority of the firmware resources is higher than that of the file resources, and in the case where the first average time is less than the second average time, it is determined that the priority of the file resources is higher than that of the firmware resources.

[0232] See Figure 10 , Figure 10 FIG. is a schematic diagram showing the parallel execution of writing a resource data packet and receiving a resource data packet by the second system provided by an exemplary embodiment of the present application.

[0233] The resources to be upgraded are transmitted in the form of resource data packets. The first system sequentially transmits resource data packet X-1, resource data packet X, resource data packet X+1,... to the second system through the second data transmission channel.

[0234] The second system executes writing the resource data packet and receiving the resource data packet in parallel.

[0235] As Figure 10 shown, the second system executes writing resource data packet X-1 and receiving resource data packet X in parallel, writing resource data packet X and receiving resource data packet X+1 in parallel, and writing resource data packet X+1 and receiving resource data packet X+2 in parallel, that is, the second system writes the previous resource data packet while receiving the current resource data packet.

[0236] Since writing the resource data packet and receiving the resource data packet are the two steps that take the longest time in the upgrade process of the resources to be upgraded, therefore, by the above-mentioned method of executing writing the resource data packet and receiving the resource data packet in parallel, the resource upgrade duration can be reduced and the resource upgrade efficiency can be improved.

[0237] See Figure 11 , Figure 11 FIG. is a structural block diagram of a resource transmission device provided by an exemplary embodiment of the present application. The device includes:

[0238] A first system module 1101, configured to transmit a target boot loader firmware to the second system through a first data transmission channel when the resources to be upgraded of the second system exist in a first storage space of the first system;

[0239] The first system module 1101 is further configured to trigger the second system to run the target bootloader firmware;

[0240] The second system module 1102 is configured to enable a second data transmission channel with the first system by running the target bootloader firmware, and the data transmission rate of the second data transmission channel is greater than that of the first data transmission channel;

[0241] The first system module 1101 is further configured to transmit the resource to be upgraded to the second system through the second data transmission channel.

[0242] Optionally, the first system module 1101 is configured to:

[0243] Send a firmware erasure instruction to the second system;

[0244] The second system module 1102 is further configured to erase the historical bootloader firmware based on the firmware erasure instruction;

[0245] After the historical bootloader firmware is erased, the first system module 1101 is further configured to transmit the target bootloader firmware to the second system through the first data transmission channel.

[0246] Optionally, the first system module 1101 is configured to:

[0247] Send a storage space configuration acquisition request to the second system;

[0248] The second system module 1102 is further configured to send storage space configuration information to the first system, and the storage space configuration information is used to indicate the configuration of the storage space for storing the bootloader firmware;

[0249] After the historical bootloader firmware is erased, the first system module 1101 is further configured to transmit the target bootloader firmware to the second system through the first data transmission channel based on the storage space configuration information.

[0250] Optionally, the first system module 1101 is configured to:

[0251] Send the firmware erasure instruction to the second system when the target bootloader firmware is different from the historical bootloader firmware;

[0252] When there is a resource to be upgraded for the second system in the first storage space of the first system and the bootloader firmware is the same as the historical bootloader firmware, trigger the second system to run the historical bootloader firmware.

[0253] Optionally, the first system module 1101 is configured to:

[0254] When there is a resource to be upgraded of the second system in the first storage space of the first system, trigger a reset signal;

[0255] The second system module 1102 is further configured to send a first handshake request to the first system when detecting the reset signal;

[0256] The first system module 1101 is further configured to send a first handshake response corresponding to the first handshake request to the second system;

[0257] The second system module 1102 is further configured to send a confirmation response to the first handshake response to the first system;

[0258] The first system module 1101 is further configured to transmit the target bootloader firmware to the second system through the first data transmission channel when receiving the confirmation response.

[0259] Optionally, the second system module 1102 is configured to:

[0260] Send a firmware transmission completion response to the first system when the transmission of the target bootloader firmware is completed;

[0261] The first system module 1101 is further configured to trigger the reset signal when receiving the firmware transmission completion response;

[0262] The second system module 1102 is further configured to send a first handshake request to the first system when detecting the reset signal;

[0263] Run the target bootloader firmware when the first handshake response corresponding to the first handshake request is not received.

[0264] Optionally, the first system module 1101 is configured to:

[0265] Trigger an upgrade signal;

[0266] The second system module 1102 is further configured to initialize the second data transmission channel by running the target bootloader firmware when detecting the upgrade signal;

[0267] The first system module 1101 is further configured to send a second handshake request to the second system through the second data transmission channel;

[0268] The second system module 1102 is further configured to send a second handshake response corresponding to the second handshake request to the first system through the second data transmission channel, so as to enable the second data transmission channel;

[0269] The first system module 1101 is further configured to stop triggering the upgrade signal when the resource to be upgraded is completely transmitted.

[0270] Optionally, the first system module 1101 is configured to:

[0271] Send a version information acquisition request to the second system;

[0272] The second system module 1102 is further configured to return the current resource version information to the first system;

[0273] The first system module 1101 is further configured to, when the current resource version information is inconsistent with the version information of the resource to be upgraded, send a resource transmission request to the second system through the second data transmission channel;

[0274] The second system module 1102 is further configured to send a request response to the resource transmission request to the first system;

[0275] The first system module 1101 is further configured to, when receiving the request response, transmit the resource to be upgraded to the second system through the second data transmission channel.

[0276] Optionally, the resource transmission request includes storage partition information, and the storage partition information is used to indicate the partition for storing the resource to be upgraded; the second system module 1102 is configured to:

[0277] Perform validity verification on the storage partition information included in the resource transmission request;

[0278] When the storage partition information passes the validity verification, send the request response to the resource transmission request to the first system.

[0279] Optionally, the resource transmission request includes a target verification value, and the target verification value is generated by the first system based on the resource to be upgraded; the second system module 1102 is configured to:

[0280] During the process of receiving the resource to be upgraded transmitted by the first system, perform a read-back verification on the written resource to obtain a read-back verification value;

[0281] When the resource to be upgraded is completely written, perform a write verification on the written resource to be upgraded based on the read-back verification value and the target verification value;

[0282] Based on the write verification result, send an upgrade result response to the first system through the second data transmission channel.

[0283] Optionally, the second storage space of the second system includes at least two storage sub-spaces, and the resource transmission request includes at least two resource transmission sub-requests for different types of resources; the second system module 1102 is configured to:

[0284] Based on the resource transmission sub-request, determine the target storage sub-space corresponding to the sub-resource to be upgraded through the running target bootloader firmware;

[0285] Write the sub-resource to be upgraded into the target storage sub-space.

[0286] Optionally, the second storage space of the second system includes Nor Flash and eMMC. The NorFlash is used to write the firmware resources in the resource to be upgraded, and the eMMC is used to write the file resources in the resource to be upgraded.

[0287] Optionally, the resource to be upgraded is transmitted in the form of a resource data packet, and the second system writes the resource data packet and receives the resource data packet in parallel.

[0288] Optionally, the first data transmission channel is a UART channel or an SWD channel, and the second data transmission channel is an SPI channel.

[0289] Please refer to Figure 12 , Figure 12 is a block diagram of the structure of an electronic device provided by an exemplary embodiment of the present application. The electronic device in the present application may include one or more of the following components: a processor 1210 and a memory 1220.

[0290] Optionally, the processor 1210 includes at least a first processor 1211 and a second processor 1212. Among them, the first processor 1211 is used to run the first system, and the second processor 1212 is used to run the second system. In some embodiments, the power consumption of the first processor 1211 is lower than that of the second processor 1212, and the performance of the first processor 1211 is lower than that of the second processor 1212. In other embodiments, the power consumption of the first processor 1211 is higher than that of the second processor 1212, and the performance of the first processor 1211 is higher than that of the second processor 1212. The processor 1210 connects various parts within the entire electronic device using various interfaces and lines, and executes various functions of the electronic device and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 1220, and by calling the data stored in the memory 1220. Optionally, the processor 1210 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), or programmable logic array (PLA). The processor 1210 can integrate one or a combination of several of a central processing unit (CPU), a graphics processing unit (GPU), a neural-network processing unit (NPU), and a modem, etc. Among them, the CPU mainly processes the operating system, user interface, application programs, etc.; the GPU is responsible for rendering and drawing the content required to be displayed on the touch display screen; the NPU is used to implement artificial intelligence (AI) functions; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 1210 and can be implemented separately by a single chip.

[0291] The memory 1220 may include a Random Access Memory (RAM), and may also include a Read-Only Memory (ROM). Optionally, the memory 1220 includes a non-transitory computer-readable storage medium. The memory 1220 can be used to store instructions, programs, codes, code sets, or instruction sets. The memory 1220 may include a program storage area and a data storage area. Among them, the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc.; the data storage area may store data created according to the use of the electronic device (such as audio data, phone book), etc.

[0292] The electronic device in the embodiments of the present application further includes a communication component 1230 and a display component 1240. Among them, the communication component 1230 may be a Bluetooth component, a WiFi (Wireless Fidelity) component, an NFC (Near Field Communication) component, etc., and is used to communicate with external devices (servers or other terminal devices) through a wired or wireless network; the display component 1240 is used to display a graphical user interface and / or receive user interaction operations.

[0293] In addition, those skilled in the art can understand that the structure of the electronic device shown in the above drawings does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the drawings, or combine some components, or have different component arrangements. For example, the electronic device further includes components such as a radio frequency circuit, an input unit, a sensor, an audio circuit, a speaker, a microphone, and a power supply, which will not be elaborated here.

[0294] The embodiments of the present application further provide a computer-readable storage medium, in which at least one instruction is stored, and the at least one instruction is loaded and executed by a processor to implement the resource transmission method described in any of the above embodiments.

[0295] Optionally, the computer-readable storage medium may include: ROM, RAM, Solid State Drives (SSDs), or optical discs, etc. Among them, the RAM may include a Resistance Random Access Memory (ReRAM) and a Dynamic Random Access Memory (DRAM).

[0296] An embodiment of the present application further provides a computer program product, which includes computer instructions stored in a computer-readable storage medium; a processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the electronic device to execute and implement the resource transmission method described in any of the above embodiments.

[0297] The above are only optional embodiments of the present application, and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A resource transmission method, characterized in that, The method is applied to an electronic device that supports running a first system and a second system; The method includes: When there is an upgrade resource of the second system in a first storage space of the first system, the first system transmits a target bootloader firmware to the second system through a first data transmission channel; The first system triggers the second system to run the target bootloader firmware; By running the target bootloader firmware, the second system enables a second data transmission channel with the first system, and the data transmission rate of the second data transmission channel is greater than that of the first data transmission channel; The first system transmits the upgrade resource to the second system through the second data transmission channel.

2. The method according to claim 1, wherein The first system transmitting the target bootloader firmware to the second system through the first data transmission channel includes: The first system sends a firmware erasure instruction to the second system; Based on the firmware erasure instruction, the second system erases the historical bootloader firmware; When the erasure of the historical bootloader firmware is completed, the first system transmits the target bootloader firmware to the second system through the first data transmission channel.

3. The method according to claim 2, characterized in that, The method further includes: The first system sends a storage space configuration acquisition request to the second system; The second system sends storage space configuration information to the first system, and the storage space configuration information is used to indicate the configuration of the storage space for storing the bootloader firmware; When the erasure of the historical bootloader firmware is completed, the first system transmitting the target bootloader firmware to the second system through the first data transmission channel includes: When the erasure of the historical bootloader firmware is completed, the first system transmits the target bootloader firmware to the second system through the first data transmission channel based on the storage space configuration information.

4. The method according to claim 2, wherein The first system sending the firmware erasure instruction to the second system includes: When the target bootloader firmware is different from the historical bootloader firmware, the first system sends the firmware erasure instruction to the second system; The method further includes: When there is an upgrade resource of the second system in a first storage space of the first system and the bootloader firmware is the same as the historical bootloader firmware, the first system triggers the second system to run the historical bootloader firmware.

5. The method according to claim 1, characterized in that, When there is an upgrade resource of the second system in a first storage space of the first system, the first system transmitting the bootloader firmware to the second system through the first data transmission channel includes: When there is an upgrade resource of the second system in a first storage space of the first system, the first system triggers a reset signal; When the reset signal is detected, the second system sends a first handshake request to the first system; The first system sends a first handshake response corresponding to the first handshake request to the second system. The second system sends an acknowledgement response to the first system for the first handshake response; Upon receiving the acknowledgement response, the first system transmits the target bootloader firmware to the second system via the first data transmission channel.

6. The method according to claim 5, characterized in that, After the first system transmits the target bootloader firmware to the second system via the first data transmission channel, the method further includes: Upon completion of the transmission of the target bootloader firmware, the second system sends a firmware transmission completion response to the first system; The first system triggers the second system to run the target bootloader firmware, including: Upon receiving the firmware transmission completion response, the first system triggers the reset signal; Upon detecting the reset signal, the second system sends a first handshake request to the first system; In the case where the first handshake response corresponding to the first handshake request is not received, the second system runs the target bootloader firmware.

7. The method according to claim 1, wherein The second system enables a second data transmission channel with the first system by running the target bootloader firmware, including: The first system triggers an upgrade signal; Upon detecting the upgrade signal, the second system initializes the second data transmission channel by running the target bootloader firmware; The first system sends a second handshake request to the second system via the second data transmission channel; The second system sends a second handshake response corresponding to the second handshake request to the first system via the second data transmission channel to enable the second data transmission channel; The method further includes: Upon completion of the transmission of the resource to be upgraded, the first system stops triggering the upgrade signal.

8. The method according to claim 1, wherein The first system transmits the resource to be upgraded to the second system via the second data transmission channel, including: The first system sends a version information acquisition request to the second system; The second system returns the current resource version information to the first system; In the case where the current resource version information is inconsistent with the version information of the resource to be upgraded, the first system sends a resource transmission request to the second system via the second data transmission channel; The second system sends a request response to the resource transmission request to the first system; Upon receiving the request response, the first system transmits the resource to be upgraded to the second system via the second data transmission channel.

9. The method according to claim 8, wherein The resource transmission request includes storage partition information for indicating the partition for storing the resource to be upgraded; The second system sends a request response to the resource transmission request to the first system, including: The second system performs a validity check on the storage partition information included in the resource transmission request; In the case where the storage partition information passes the validity check, the second system sends the request response to the resource transmission request to the first system.

10. The method according to claim 8, characterized in that, The resource transfer request includes a target verification value, which is generated by the first system based on the resource to be upgraded; The method further includes: During the process of receiving the resource to be upgraded transmitted by the first system, the second system performs a read-back verification on the written resource to obtain a read-back verification value; When the resource to be upgraded is completely written, the second system performs a write verification on the written resource to be upgraded based on the read-back verification value and the target verification value; Based on the write verification result, an upgrade result response is sent to the first system through the second data transmission channel.

11. The method according to claim 8, wherein The second storage space of the second system includes at least two storage sub-spaces, and the resource transfer request includes at least two resource transfer sub-requests for different types of resources; The method further includes: The second system determines the target storage sub-space corresponding to the sub-resource to be upgraded based on the resource transfer sub-request through the running target bootloader firmware; The second system writes the sub-resource to be upgraded into the target storage sub-space.

12. The method according to claim 11, wherein The second storage space of the second system includes a Nor Flash and an eMMC. The Nor Flash is used to write the firmware resource in the resource to be upgraded, and the eMMC is used to write the file resource in the resource to be upgraded.

13. The method according to claim 1, characterized in that, The resource to be upgraded is transmitted in the form of a resource data packet, and the second system writes the resource data packet in parallel with receiving the resource data packet.

14. The method according to claim 1, characterized in that, The first data transmission channel is a UART channel or an SWD channel, and the second data transmission channel is an SPI channel.

15. A resource transmission device, characterized in that, The device is used for an electronic device, and the electronic device supports running the first system and the second system; The device includes: A first system module, configured to transmit a target bootloader firmware to the second system through a first data transmission channel when there is a resource to be upgraded of the second system in the first storage space of the first system; The first system module is further configured to trigger the second system to run the target bootloader firmware; A second system module, configured to enable a second data transmission channel with the first system by running the target bootloader firmware, and the data transmission rate of the second data transmission channel is greater than the data transmission rate of the first data transmission channel; The first system module is further configured to transmit the resource to be upgraded to the second system through the second data transmission channel.

16. An electronic device, characterized in that, The electronic device includes a processor and a memory; the memory stores at least one instruction, and the at least one instruction is used to be executed by the processor to implement the resource transfer method according to any one of claims 1 to 14.

17. A computer-readable storage medium, characterized in that, At least one program code is stored in the computer-readable storage medium, and the program code is loaded and executed by the processor to implement the resource transfer method according to any one of claims 1 to 14.

18. A computer program product, characterized in that, The computer program product includes computer instructions stored in a computer-readable storage medium; a processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the resource transmission method according to any one of claims 1 to 14.