Methods, devices, domain controllers and systems for upgrading vehicle camera firmware

By dividing the storage chip of the vehicle camera into running and backup upgrade partitions, and using an independent control channel to receive and verify firmware data, the problem of image acquisition interruption during the vehicle camera upgrade process is solved, and reliable firmware iteration and visual perception continuity are achieved.

CN123067902APending Publication Date: 2026-11-10CHONGQING CHANGAN AUTOMOBILE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611573608.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-12
Publication Date
2026-11-10

AI Technical Summary

Technical Problem

In existing technologies, firmware upgrade solutions for vehicle cameras cannot complete firmware iterations while ensuring the continued availability of the camera and the reliability of upgrades, leading to risks of image acquisition interruption and startup failure.

Method used

The storage chip of the vehicle camera is divided into a first operating partition, a second backup upgrade partition, and a parameter partition. Firmware data is received and written through an independent control channel to ensure that the first operating partition continuously outputs video streams. After the second backup upgrade partition is completed, a verification and soft reboot are performed to complete the upgrade.

Benefits of technology

It achieves continuous visual perception during the upgrade process, improves the reliability and controllability of the upgrade, and reduces the risk of link interruption and startup failure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123067902A_ABST
    Figure CN123067902A_ABST
Patent Text Reader

Abstract

This invention provides a method, apparatus, domain controller, and system for firmware upgrade of an in-vehicle camera, relating to the fields of automotive electronics and visual perception technology. The method, applied to an in-vehicle camera, includes: receiving firmware data from the vehicle's domain controller while the current firmware is running in a first operating partition and continuously outputting a video stream; writing the firmware data to a second backup upgrade partition, the writing process not affecting the operation of the first operating partition; verifying the firmware data in the second backup upgrade partition after writing, and synchronizing the verification result to the domain controller; if the verification passes and the partition switching conditions are met, receiving a partition switching command from the domain controller, modifying the effective partition flag in the parameter partition, and performing a soft reboot to load the firmware in the second backup upgrade partition and start its operation, thus completing the firmware upgrade of the in-vehicle camera, thereby ensuring that firmware iteration is completed under the premise of continuous camera availability and reliable upgrades.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automotive electronics and visual perception technology, specifically to a method, apparatus, domain controller, and system for upgrading firmware for an automotive camera. Background Technology

[0002] With the rapid development of intelligent connected vehicles and Advanced Driver Assistance Systems (ADAS), the deployment density and functional complexity of in-vehicle cameras, as core sensors for vehicle visual perception, have significantly increased. Currently, passenger vehicles are typically equipped with 4 to 12 high-definition cameras, primarily used to achieve key driving functions such as panoramic surround view, automatic parking, lane keeping, blind spot monitoring, and forward collision warning. Throughout the vehicle's lifecycle, to continuously optimize image signal processing (ISP) parameters, fix underlying driver defects, enhance target recognition algorithms, or meet newly enacted safety regulations, remote iterative upgrades to camera firmware are required via Over-The-Air (OTA) technology.

[0003] In related technologies, firmware upgrades for automotive cameras typically employ a single-partition overwrite upgrade scheme. This scheme requires the camera to be forced out of normal operating mode during the upgrade process, completely stopping image acquisition, ISP processing, and video stream output; then, the new firmware data is directly overwritten into the existing single storage area; after the flashing is complete, the device is restarted and the new firmware is loaded. However, the existing single-partition overwrite upgrade scheme cannot complete firmware iteration while ensuring the continued usability of the camera and the reliability of the upgrade. Summary of the Invention

[0004] This invention provides a method, apparatus, domain controller, and system for upgrading the firmware of an in-vehicle camera, which addresses the problem that solutions in related technologies cannot complete firmware iteration while ensuring the continuous availability and reliable upgrades of the camera.

[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0006] In a first aspect, the present invention provides a firmware upgrade method for an in-vehicle camera, applicable to an in-vehicle camera, wherein the storage chip of the in-vehicle camera is divided into a first operating partition, a second backup and upgrade partition, and a parameter partition, and the method includes:

[0007] While running the current firmware in the first running partition and continuously outputting video streams, receive firmware data sent by the vehicle's domain controller;

[0008] The received firmware data is written to the second backup upgrade partition. The process of writing to the second backup upgrade partition does not affect the operation of the first running partition.

[0009] After the second backup upgrade partition is written, the firmware data in the second backup upgrade partition is verified, and the verification result is synchronized to the domain controller.

[0010] If the verification result is successful and the partition switching conditions are met, the partition switching command issued by the domain controller is received, the effective partition flag bit in the parameter partition is modified, and a soft reboot is performed to load the firmware in the second backup upgrade partition and start running, thus completing the firmware upgrade of the vehicle camera.

[0011] In one possible embodiment, receiving firmware data from the vehicle's domain controller includes: receiving firmware data from the domain controller via a control channel independent of the video channel in the serial link between the vehicle camera and the domain controller; wherein the control channel includes an Inter-Integrated Circuit (I2C) channel or a Serial Peripheral Interface (SPI) channel; when the firmware data is transmitted through the control channel, it does not occupy the bandwidth of the video stream in the serial link.

[0012] In one possible embodiment, the parameter partition also stores the firmware version number of the first running partition, the firmware version number of the second backup upgrade partition, the upgrade status flag, and local verification information; the method further includes: after the second backup upgrade partition is written, updating the firmware version number of the second backup upgrade partition to the firmware version number written this time, updating the upgrade status flag to the pending switch status, and updating the verification result of the local verification information to verification passed.

[0013] In one possible embodiment, writing the received firmware data to the second backup upgrade partition includes: after each data packet is received, performing data packet verification on the data packet; if the data packet verification fails, requesting the domain controller to retransmit the corresponding data packet; if the data packet verification passes, writing the corresponding data packet to the second backup upgrade partition.

[0014] In one possible embodiment, the firmware data in the second backup upgrade partition is verified, including: performing Cyclic Redundancy Check (CRC) and / or Secure Hash Algorithm (SHA) verification on the firmware data in the second backup upgrade partition to obtain an integrity verification result; performing signature verification on the firmware data in the second backup upgrade partition to obtain a signature verification result; and determining that the firmware data in the second backup upgrade partition has passed verification if both the integrity verification result and the signature verification result are successful.

[0015] In one possible embodiment, the zone switching conditions include: the vehicle is powered off or the vehicle is in an idling stop state.

[0016] In one possible embodiment, the vehicle camera firmware upgrade method further includes: after a successful soft reboot and loading of the firmware in the second backup upgrade partition, using the second backup upgrade partition as the new first running partition, and using the original first running partition as the new second backup upgrade partition.

[0017] In one possible embodiment, the storage chip of the vehicle camera is further divided into a bootloader partition; the bootloader partition is used to read the effective partition flag bit in the parameter partition when the vehicle camera starts up, and select to load the firmware in the first running partition or the second backup upgrade partition according to the effective partition flag bit.

[0018] In one possible embodiment, the vehicle camera firmware upgrade method further includes an abnormal rollback mechanism, which includes startup abnormal rollback and function abnormal rollback. Startup abnormal rollback includes: if the firmware in the second backup upgrade partition fails to start, the vehicle camera's bootloader detects the loading failure and automatically rolls back to the first running partition for startup. Function abnormal rollback includes: if the firmware in the second backup upgrade partition has a functional problem, receiving a rollback command from the domain controller, modifying the effective partition flag in the parameter partition, and performing a soft reboot to load the firmware in the first running partition and start it.

[0019] Secondly, embodiments of the present invention provide a firmware upgrade method for an in-vehicle camera, applied to a vehicle's domain controller, wherein the domain controller connects to multiple in-vehicle cameras, and the method includes:

[0020] In response to receiving the camera firmware package from the Over-The-Air Technology (OTA) platform, an upgrade start command is sent to all target vehicle cameras in the group, so that each target vehicle camera enters the background upgrade ready state while continuously outputting video stream in the first operating partition.

[0021] After each target vehicle camera enters the background upgrade ready state, the firmware data in the camera firmware package is sent to each target vehicle camera in batches so that each target vehicle camera writes the firmware data to the second backup upgrade partition.

[0022] The system receives the verification results from each target vehicle camera. If all target vehicle cameras in the group pass the verification, it sends a partition switching command to all target vehicle cameras in the group. This causes each target vehicle camera to modify the effective partition flag in the parameter partition and perform a soft reboot, thereby loading the firmware in the second backup upgrade partition and starting up.

[0023] In one possible embodiment, the vehicle camera firmware upgrade method further includes: if the verification result of a single or part of the target vehicle cameras in the group is a verification failure, then the partition switching command is not triggered to all target vehicle cameras in the group, only the target vehicle cameras that failed the verification are marked, and the remaining target vehicle cameras maintain the original firmware version and run normally.

[0024] In one possible embodiment, sending a zone switching command to all target vehicle cameras in the group includes: sending a zone switching command to all target vehicle cameras in the group when the zone switching conditions are met; the zone switching conditions include the vehicle being powered off or the vehicle being in an idling parking state.

[0025] In one possible embodiment, the vehicle camera firmware upgrade method also includes a multi-camera firmware consistency guarantee mechanism: all target vehicle cameras in the group execute the flashing of the second backup upgrade partition in parallel; after all the verification results of all target vehicle cameras in the group are verified as passed, a partition switching command is uniformly issued so that all target vehicle cameras in the group run the new version of firmware at the same time.

[0026] In one possible embodiment, the vehicle camera firmware upgrade method further includes a version verification mechanism: after each power-on, the current firmware version and partition status of all target vehicle cameras are polled; if a target vehicle camera with an inconsistent firmware version is found, the target vehicle camera with the inconsistent version is triggered to perform a firmware upgrade individually, or the remaining target vehicle cameras are triggered to perform a version rollback, so that the firmware versions of all target vehicle cameras in the group are consistent.

[0027] Thirdly, the present invention provides a vehicle-mounted camera firmware upgrade device, applied to a vehicle-mounted camera, wherein the storage chip of the vehicle-mounted camera is divided into a first operating partition, a second backup and upgrade partition, and a parameter partition, and the device includes:

[0028] The firmware data receiving module is used to receive firmware data sent by the vehicle's domain controller when the current firmware is running in the first running partition and continuously outputting video streams.

[0029] The firmware data writing module is used to write the received firmware data to the second backup upgrade partition, wherein the process of writing to the second backup upgrade partition does not affect the operation of the first running partition;

[0030] The firmware data verification module is used to verify the firmware data in the second backup upgrade partition after the second backup upgrade partition is written, and to synchronize the verification result to the domain controller.

[0031] The firmware upgrade module is used to receive the partition switching command issued by the domain controller when the verification result is successful and the partition switching conditions are met. It then modifies the effective partition flag bit in the parameter partition and performs a soft reboot to load the firmware in the second backup upgrade partition and start running, thus completing the firmware upgrade of the vehicle camera.

[0032] Fourthly, the present invention provides a vehicle-mounted camera firmware upgrade device, applied to a vehicle's domain controller, the domain controller connecting multiple vehicle-mounted cameras, the device comprising:

[0033] The upgrade start command distribution module is used to respond to the camera firmware package received from the OTA platform and send upgrade start commands to all target vehicle cameras in the group, so that each target vehicle camera can enter the background upgrade ready state while continuously outputting video stream in the first running partition.

[0034] The firmware data delivery module is used to send the firmware data in the camera firmware package to each target vehicle camera in batches after each target vehicle camera enters the background upgrade ready state, so that each target vehicle camera writes the firmware data to the second backup upgrade partition.

[0035] The partition switching command issuing module is used to receive the verification results of each target vehicle camera, and when the verification results of all target vehicle cameras in the group are all passed, it issues a partition switching command to all target vehicle cameras in the group, so that each target vehicle camera modifies the effective partition flag bit in the parameter partition and performs a soft reboot, thereby loading the firmware in the second backup upgrade partition and starting it up.

[0036] Fifthly, the present invention provides a vehicle camera firmware upgrade system, including a domain controller and multiple vehicle cameras;

[0037] The domain controller is used to execute the vehicle camera firmware upgrade method provided in any of the second aspects above;

[0038] The vehicle-mounted camera is used to perform the vehicle-mounted camera firmware upgrade method provided in any of the first aspects above.

[0039] Sixthly, embodiments of the present invention provide a vehicle, comprising:

[0040] Vehicle body;

[0041] The vehicle camera firmware upgrade system provided in the fifth aspect above is installed on the vehicle itself.

[0042] In a seventh aspect, the present invention provides a domain controller, comprising: a processor, and a memory communicatively connected to the processor; the memory stores computer-executed instructions;

[0043] The processor executes computer execution instructions stored in memory to implement the vehicle camera firmware upgrade method provided in any of the second aspects.

[0044] Eighthly, the present invention provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the vehicle camera firmware upgrade method provided in the first and / or second aspects.

[0045] Ninthly, the present invention provides a computer program product, comprising: a computer program that, when executed by a processor, implements the vehicle camera firmware upgrade method as provided in the first and / or second aspects.

[0046] The beneficial effects of this invention are:

[0047] This invention provides a firmware upgrade method for an in-vehicle camera. The in-vehicle camera's storage chip is divided into a first operating partition, a second backup upgrade partition, and a parameter partition. The method includes: while the current firmware is running in the first operating partition and continuously outputting a video stream, receiving firmware data from the vehicle's domain controller; writing the received firmware data to the second backup upgrade partition, wherein the writing process to the second backup upgrade partition does not affect the operation of the first operating partition; after writing to the second backup upgrade partition, verifying the firmware data in the second backup upgrade partition and synchronizing the verification result to the domain controller; if the verification result is successful and the partition switching conditions are met, receiving a partition switching command from the domain controller, modifying the effective partition flag bit in the parameter partition, and performing a soft reboot to load the firmware in the second backup upgrade partition and start running, thus completing the firmware upgrade of the in-vehicle camera.

[0048] This invention receives firmware data from the domain controller while the current firmware is continuously running and outputting video streams in the first running partition, and writes the firmware data to a second backup upgrade partition that is independent of the running partition. This avoids interference with current image acquisition and video output during the upgrade writing process, thus ensuring the continuity of visual perception of the vehicle camera during the upgrade. By verifying the firmware data after writing to the second backup upgrade partition and synchronizing the verification result to the domain controller, the integrity and validity of the upgrade data can be confirmed in a timely manner, thereby improving the reliability and controllability of the upgrade process. By receiving the partition switching command when the verification is successful and the partition switching conditions are met, modifying the effective partition flag bit in the parameter partition, and performing a soft reboot to load the firmware in the second backup upgrade partition, a smooth switch can be completed while ensuring the correctness of the upgrade result, thereby reducing the risk of startup failure caused by link interruption, power failure, or verification anomalies. Attached Figure Description

[0049] Figure 1 This is a flowchart illustrating a method for upgrading the firmware of an in-vehicle camera provided in an embodiment of the present invention.

[0050] Figure 2 A schematic diagram of the partitioning on the storage chip of an in-vehicle camera provided in an embodiment of the present invention;

[0051] Figure 3 This is another flowchart illustrating the vehicle camera firmware upgrade method provided in an embodiment of the present invention;

[0052] Figure 4 This is a schematic diagram of the structure of the vehicle-mounted camera module and the domain controller provided in an embodiment of the present invention;

[0053] Figure 5 A schematic diagram of the structure of the vehicle camera firmware upgrade device provided in an embodiment of the present invention;

[0054] Figure 6 This is another structural schematic diagram of the vehicle camera firmware upgrade device provided in an embodiment of the present invention;

[0055] Figure 7 This is a schematic diagram of the architecture of the vehicle camera firmware upgrade system provided in an embodiment of the present invention;

[0056] Figure 8 This is a schematic diagram of the structure of a domain controller provided in an embodiment of the present invention.

[0057] The accompanying drawings have illustrated specific embodiments of the invention, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the invention in any way, but rather to illustrate the concept of the invention to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0058] The embodiments of the present invention will be described below with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention and not for limiting the scope of protection of the present invention.

[0059] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. The drawings only show the components related to the present invention and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.

[0060] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the invention as detailed in the appended claims.

[0061] The terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, product, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, product, or apparatus. Without further limitation, the presence of other identical or equivalent elements in the process, method, product, or apparatus that includes elements is not excluded. For example, the use of terms such as "first," "second," etc., to indicate names does not imply any particular order.

[0062] In related technologies, when using a single-partition overlay upgrade scheme to upgrade the firmware of automotive cameras, the camera cannot output images during the flashing process, causing functions that rely on the camera, such as ADAS and panoramic surround view, to suspend, affecting the user experience. Furthermore, if a power outage or transmission abnormality occurs during the upgrade process, the original firmware will be overwritten, and the camera will fail to start normally, posing a risk of becoming bricked, requiring a re-upgrade or return to the factory for repair.

[0063] To address the technical problems existing in related technologies, this invention provides a firmware upgrade solution for vehicle-mounted cameras. This solution involves dividing the existing storage chip of the vehicle-mounted camera into a first operating partition, a second backup upgrade partition, and a parameter partition. The current firmware continuously outputs video streams in the first operating partition while simultaneously receiving firmware data from the domain controller. New data is then written to the second backup upgrade partition before verification and status synchronization. Since the first operating partition and the second backup upgrade partition are independent, the flashing process does not interfere with real-time video output. The effective partition flag in the parameter partition controls the boot direction, and a soft reboot completes the switching of the operating environment. This processing mechanism effectively reduces visual interruption and the risk of camera bricking during the upgrade process, enabling firmware updates to be completed while maintaining perceptual continuity. This ensures continuous camera availability and reliable upgrades while completing firmware iterations.

[0064] The application scenarios of the embodiments of the present invention will be described below first.

[0065] The vehicle camera firmware upgrade method, device, domain controller, and system provided in this invention are applicable to scenarios where vehicle cameras undergo remote firmware iteration upgrades throughout the entire vehicle lifecycle. Specifically, they are applied to the firmware upgrade process of functional modules that rely on continuous video stream output from cameras, such as ADAS visual perception, panoramic surround view, automatic parking, lane keeping, blind spot monitoring, and forward collision warning.

[0066] In this invention, the vehicle-mounted camera firmware upgrade system is deployed in an architecture that coordinates the vehicle-side domain controller and the vehicle-mounted camera. The domain controller receives the camera firmware package issued by the OTA platform through the vehicle communication terminal (Telematics BOX, or T-Box for short), and after verifying the integrity of the firmware package, issues an upgrade start command to all target vehicle-mounted cameras in the group; the domain controller sends the firmware data to each target vehicle-mounted camera in batches through the low-speed control channel in the high-speed serial link, and the writing traffic does not occupy the video stream bandwidth. The vehicle-mounted camera logically divides its storage chip into a first operating partition, a second backup upgrade partition, and a parameter partition. While continuously outputting a video stream to the first operating partition, it writes the received firmware data to the second backup upgrade partition. This writing process does not affect the normal operation of the first operating partition. After writing, the firmware data in the second backup upgrade partition is verified, and the verification result is synchronized to the domain controller. If the verification results for all target vehicle-mounted cameras in the group are successful, the domain controller issues a unified partition switching command to all target vehicle-mounted cameras in the group. Each target vehicle-mounted camera modifies the effective partition flag in its parameter partition and performs a soft reboot. The bootloader loads the firmware from the second backup upgrade partition based on the modified effective partition flag and starts running, completing the firmware upgrade. This embodiment of the invention does not limit the number of cameras, the type of high-speed serial link, the type of low-speed control channel, or the vehicle-to-cloud communication method.

[0067] The following describes in detail the specific implementation of the vehicle camera firmware upgrade method provided in this invention, using a vehicle-mounted camera as the execution subject and specific embodiments.

[0068] Figure 1 This is a flowchart illustrating a method for upgrading the firmware of an in-vehicle camera according to an embodiment of the present invention. The method is applied to an in-vehicle camera, where the storage chip has a first running partition, a second backup / upgrade partition, and a parameter partition. Figure 1 As shown, a specific implementation of this vehicle-mounted camera firmware upgrade method may include the following steps:

[0069] S101, while the current firmware is running in the first running partition and continuously outputting video streams, receive firmware data sent by the vehicle's domain controller.

[0070] The system is divided into three partitions: Partition A (first operating partition) and Partition B (second operating partition). Partition A is the default working partition, used to store the firmware currently running on the vehicle camera. During normal operation, the camera loads the firmware and image quality (IQ) parameters from this partition and performs image acquisition, encoding, and output functions. Partition B is a backup upgrade partition, independent of Partition A. It receives and stores new firmware and IQ parameters. The flashing process does not affect the operation of Partition A, maintaining the continuity of the vehicle's visual perception link. The storage chip is the physical storage medium that carries the above partitions. It can typically be NAND / NOR flash memory or electrically erasable programmable read-only memory (EEPROM). The partitions are logically divided into the first operating partition, the second backup upgrade partition, and the parameter partition. The three partitions share the same storage chip resources but are independent of each other in address space. The domain controller is the upper-level control unit in the vehicle, responsible for aggregating upgrade strategies, firmware versions, and upgrade trigger conditions, and sending the firmware data to be upgraded to the vehicle camera through the vehicle network. The firmware data can be transmitted via the vehicle communication link. It can be received as a whole packet or received in segments and then reassembled locally, as long as a complete firmware image to be written can be formed. In one possible embodiment, the domain controller sends the firmware data when the vehicle is parked, off, charging, or in a preset upgrade state. The vehicle camera maintains the current firmware in the first operating partition and receives upgrade data while continuously outputting video streams, thus enabling upgrade communication and real-time sensing services to be executed in parallel. For example, the firmware data may include a program image, verification information, version number, and upgrade header information. During reception, the vehicle camera can buffer, assemble, and sequentially arrange data frames for subsequent writing processing.

[0071] S102. Write the received firmware data to the second backup upgrade partition. The process of writing to the second backup upgrade partition does not affect the operation of the first running partition.

[0072] The second backup upgrade partition stores the new firmware to be replaced. Its storage address is isolated from the first running partition. When writing to this partition, the vehicle camera continues to load and execute the current firmware from the first running partition, so the existing video output link does not need to be stopped due to the upgrade. In specific implementation, the vehicle camera can write the firmware data to the second backup upgrade partition after receiving it, or it can write it to disk sequentially in a slice-by-slice manner. In another possible embodiment, the writing process can also be combined with a buffer, temporarily storing the received data in memory first, and then the writing task writes it to the second backup upgrade partition page by page, block by block, or sector by sector to adapt to the smallest erase and write unit of the storage chip. The writing action is controlled by the upgrade management program, which runs on the processor or control chip of the vehicle camera and performs erase, programming, and write confirmation operations on the second backup upgrade partition through the storage controller. Since the first running partition and the second backup upgrade partition are independent of each other in address space, writing to the second backup upgrade partition will not overwrite the currently running firmware content, nor will it change the code and data on which video acquisition and output depend. Therefore, the image output remains continuous during the upgrade. For example, necessary write status recording can also be performed during writing to enable writing to resume after a link interruption.

[0073] S103. After the second backup upgrade partition is written, the firmware data in the second backup upgrade partition is verified, and the verification result is synchronized to the domain controller.

[0074] The verification process confirms the integrity of the image in the second backup upgrade partition and its usability for subsequent booting. This is typically performed by the upgrade verification module within the vehicle-mounted camera. This module reads the firmware content within the second backup upgrade partition and compares the data according to a pre-agreed verification method. Verification can include integrity verification, signature verification, or other methods suitable for confirming firmware validity. Specifically, it can be performed based on the verification field in the firmware header or verification parameters pre-issued by the domain controller. In one possible embodiment, the vehicle-mounted camera verifies the image in the second backup upgrade partition after writing to confirm that the firmware content has not been damaged during transmission or writing. In another possible embodiment, the firmware release source can be verified using a digital signature to confirm the trustworthiness of the firmware to be upgraded. After verification, the vehicle-mounted camera generates a verification result and sends it back to the domain controller. The verification result can simply include "verification passed" or "verification failed," or it can include status information such as version number, image size, verification summary, and upgrade status flags, enabling the domain controller to uniformly summarize and judge the upgrade progress of multiple cameras. After synchronizing the verification results to the domain controller, the domain controller can uniformly decide whether to enter the switching phase based on the verification status of multiple cameras, thereby avoiding premature switching when individual nodes are not ready. For example, when the verification of a certain camera fails, the domain controller can keep that node running the old firmware in the first running partition and reissue the upgrade data or terminate this round of upgrade.

[0075] S104. If the verification result is successful and the partition switching conditions are met, receive the partition switching command issued by the domain controller, modify the effective partition flag bit in the parameter partition and perform a soft reboot to load the firmware in the second backup upgrade partition and start running, thus completing the firmware upgrade of the vehicle camera.

[0076] The parameter partition stores control information related to boot selection and upgrade status. The effective partition flag indicates whether the bootloader should load firmware from the first running partition or the second backup upgrade partition upon the next boot. Partition switching conditions can include successful verification; switching is only allowed when these conditions are met. Upon receiving the partition switching command from the domain controller, the vehicle camera first rewrites the effective partition flag in the parameter partition from pointing to the first running partition to pointing to the second backup upgrade partition, triggering a soft reboot. A soft reboot refers to the process of resetting the processor, reloading the bootloader, and restarting the firmware under software control without disconnecting the vehicle's power supply. After rebooting, the system loads the new firmware from the second backup upgrade partition based on the effective partition flag in the parameter partition and enters normal operation. Because the switching action is completed by modifying the flag and the system determining the boot partition, it is not necessary to directly overwrite the first running partition with the new firmware. Therefore, the first running partition remains operational until verification is successful. After loading the firmware from the second backup upgrade partition and starting operation, the new firmware takes over image acquisition and video output tasks.

[0077] Based on the above analysis, this invention provides a method for upgrading the firmware of an in-vehicle camera. This method involves continuously running the current firmware and outputting a video stream in a first running partition while simultaneously receiving firmware data from the domain controller. The firmware data is then written to a second backup upgrade partition, independent of the running partition. The firmware in the upgrade partition is then verified, and the result is synchronized to the domain controller. Finally, when the switching conditions are met, a soft reboot is performed based on the effective partition flag in the parameter partition to complete the boot partition switch. This implementation separates the upgrade writing from real-time video output, avoiding interruptions and boot failures caused by directly overwriting the running partition. Furthermore, the boot direction is controlled by the flag in the parameter partition, ensuring that the upgrade switch depends on status confirmation and a software reboot. This facilitates continuous operation, status synchronization, and partition switching during the firmware update process in an in-vehicle environment.

[0078] The vehicle camera firmware upgrade method provided in this invention receives firmware data from the domain controller while the current firmware is continuously running and outputting video streams in the first running partition, and writes the firmware data to a second backup upgrade partition that is independent of the running partition. This avoids interference with current image acquisition and video output during the upgrade writing process, thus ensuring the continuity of visual perception of the vehicle camera during the upgrade. After the firmware data is written to the second backup upgrade partition, the integrity and validity of the upgrade data can be confirmed in a timely manner, thereby improving the reliability and controllability of the upgrade process. By receiving a partition switching command when the verification is successful and the partition switching conditions are met, modifying the effective partition flag bit in the parameter partition, and performing a soft reboot to load the firmware in the second backup upgrade partition, a smooth switch can be completed while ensuring the correctness of the upgrade result, thereby reducing the risk of startup failure caused by link interruption, power failure, or verification anomalies.

[0079] In some embodiments, receiving firmware data from the vehicle's domain controller includes: receiving firmware data from the domain controller via a control channel independent of the video channel in the serial link between the vehicle camera and the domain controller; wherein the control channel includes an I2C channel or an SPI channel; when the firmware data is transmitted through the control channel, it does not occupy the bandwidth of the video stream in the serial link.

[0080] The serial link is a data connection link between the vehicle-mounted camera and the domain controller, used to carry video and control channels. For example, multiple cameras (typically four surround-view cameras) are connected via high-speed serial links such as Gigabit Multimedia Serial Link (GMSL), Flat Panel Display Link (FPD-Link), or High-Speed ​​Media Transport (HSMT) protocols. The video stream is transmitted through the high-speed channel, while firmware flashing commands and firmware data are transmitted through a built-in low-speed control channel, including I2C or SPI channels. The control channel and the video channel transmitting the video stream are logically separate. When firmware data is transmitted via the control channel, it only occupies control channel resources without encroaching on video stream resources. The I2C channel is suitable for a two-wire connection, simplifying wiring and facilitating compatibility with existing camera control interfaces. In practical applications, other models of this component can also be selected; this invention does not limit this choice. The SPI channel is suitable for implementation using four-wire or multi-wire connections, and its data throughput capability can meet the firmware packet transmission requirements. In practical applications, other models of this component can also be selected, and this invention does not limit them.

[0081] During the actual reception process, the domain controller breaks down the firmware to be upgraded into multiple transmission units and sends them to the vehicle-mounted camera via the control channel. Under the scheduling of the controller, the vehicle-mounted camera completes the reception buffering, frame verification, and sequence reassembly. It then writes the reassembled firmware data into the storage area to be upgraded, i.e., the second backup upgrade partition. Because the firmware data is transmitted only through the control channel, while the video channel continues to carry image data, the video stream bandwidth in the serial link remains unchanged. The camera can maintain video output while receiving upgrade data, ensuring that the domain controller does not interfere with the video output of the vehicle-mounted camera when sending firmware data. This allows the camera to complete the background firmware reception while maintaining visual perception continuity, thus providing a stable data foundation for subsequent writing, verification, and partition switching.

[0082] In some embodiments, the parameter partition also stores the firmware version number of the first running partition, the firmware version number of the second backup upgrade partition, the upgrade status flag, and local verification information; the method further includes: after the second backup upgrade partition is written, updating the firmware version number of the second backup upgrade partition to the firmware version number written this time, updating the upgrade status flag to the pending switch status, and updating the verification result of the local verification information to verification passed.

[0083] The parameter partition stores configuration data such as the currently active partition flag, A / B partition firmware version numbers (i.e., the firmware version numbers of the first running partition and the second backup upgrade partition), upgrade status flag, and local verification information. The firmware version numbers of the first running partition and the second backup upgrade partition respectively identify the currently running firmware version and the firmware version to be switched, facilitating version consistency confirmation before and after partition switching. The upgrade status flag records the current upgrade stage of the second backup upgrade partition and, in conjunction with the active partition flag in the parameter partition, indicates whether the conditions for subsequent switching are met. The local verification information stores the verification results of the firmware data within the second backup upgrade partition. Verification results can include hash checksums, integrity verification conclusions, or corresponding verification pass flags, supporting local confirmation of written content before switching.

[0084] In practical implementation, the parameter partition can be composed of an independent logical area within the storage chip. Non-volatile storage units are used to store the version number, upgrade status flag, and local verification information. Each field can be written at a fixed offset address for quick location during firmware upgrade reading. After the second backup upgrade partition is written, the firmware version number written this time is generated based on the version identifier carried in the firmware data issued by the domain controller and written back to the corresponding field in the parameter partition. Simultaneously, the upgrade status flag is changed to a pending switch status, indicating that the second backup upgrade partition has been written and is awaiting subsequent switch commands. The verification result of the local verification information is updated to "verification passed" after hash comparison or integrity comparison of the firmware image within the second backup upgrade partition. The verification conclusion is then written to the parameter partition for subsequent boot judgment.

[0085] In practice, version number updates, status flag updates, and verification result updates can be completed sequentially by the same upgrade management module, or they can be atomically written in a single parameter area write operation to reduce inconsistencies in status. After the write is complete, the version number, the status to be switched, and the verification result stored in the parameter partition together form the basis for subsequent partition switching, enabling the vehicle camera to synchronize the status of the partition to be upgraded while keeping the operating partition unaffected.

[0086] In this embodiment of the invention, by synchronously recording the version number, upgrade status flag, and local verification information of two partitions in the parameter partition, and immediately updating them to a ready-to-switch state and verification passed after writing, the upgrade control logic can accurately identify the ready state of the second backup upgrade partition and provide a consistent status basis for subsequent switching and restarting, thereby improving the predictability of the upgrade process and the reliability of partition switching.

[0087] In some embodiments, writing the received firmware data to the second backup upgrade partition includes: after each data packet is received, performing data packet verification on the data packet; if the data packet verification fails, requesting the domain controller to retransmit the corresponding data packet; if the data packet verification passes, writing the corresponding data packet to the second backup upgrade partition.

[0088] In this system, a data packet is a fragmented transmission unit of firmware data in the transmission link. Each data packet carries a verification field for consistency determination. The verification field can be a cyclic redundancy check (CRC) code, a checksum, or a digest value corresponding to the data content. After receiving the data packet from the domain controller, the vehicle-mounted camera first temporarily stores the data packet in its receive buffer and compares it with the data content in the buffer according to preset verification rules. When the verification field matches the locally calculated result, the data packet is deemed to have passed verification; when the two do not match, the data packet is deemed to have failed verification.

[0089] For example, when packet verification fails, the vehicle-mounted camera sends a retransmission request to the domain controller through a control channel independent of the video channel. The retransmission request carries the sequence number, offset address, or frame identifier of the currently failed packet, so that the domain controller can resend the corresponding packet. Upon receiving the retransmission request, the domain controller resends the same packet to the vehicle-mounted camera, which then re-performs the verification until the packet meets the write conditions before allowing further writing. It should be noted that the verification can be performed by the vehicle-mounted camera or by the domain controller reading back and verifying. Specifically, after receiving the retransmission request, the domain controller resends the same packet to the vehicle-mounted camera, which performs the write operation. The domain controller reads back the written packet and compares it with the sent packet. If they match, the verification is successful, and further writing is allowed; if they do not match, the verification fails, and the packet can be resent until verification succeeds.

[0090] Upon successful data packet verification, the vehicle-mounted camera writes the corresponding data packet to the reserved write address of the second backup upgrade partition according to its order in the firmware data. The write address can be updated incrementally according to the data packet sequence number to ensure that multiple data packets are arranged consecutively in the original firmware order within the second backup upgrade partition. The second backup upgrade partition can be set as a pre-divided contiguous storage area. The writing can be completed using on-chip flash memory programming or block writing. In practical applications, other models of the write controller can also be selected, and this invention does not limit this.

[0091] In this embodiment of the invention, by independently verifying each data packet and immediately triggering retransmission when verification fails and immediately writing to disk when verification passes, the vehicle-mounted camera can complete the data loading of the second backup upgrade partition packet by packet without interrupting the output of the first running partition. This ensures that the writing process always maintains data consistency and address continuity, thereby providing a complete and reliable firmware foundation for subsequent whole packet verification and partition switching.

[0092] In some embodiments, the firmware data in the second backup upgrade partition is verified, including: performing CRC and / or SHA verification on the firmware data in the second backup upgrade partition to obtain an integrity verification result; performing signature verification on the firmware data in the second backup upgrade partition to obtain a signature verification result; and determining that the firmware data in the second backup upgrade partition has passed verification if both the integrity verification result and the signature verification result are passed.

[0093] Among them, CRC is used to perform error detection on data blocks in the second backup upgrade partition, SHA is used to generate a hash digest of the firmware image and compare it with a preset digest. Both of them are verification methods to confirm the integrity of the write result; signature verification is used to verify the firmware signature based on a preset public key to confirm that the firmware source is genuine and has not been tampered with. The public key can be stored in the parameter partition or the secure storage unit inside the camera.

[0094] In practice, the firmware data in the second backup upgrade partition can be organized into fixed-size data blocks. After writing, the domain controller reads the CRC or SHA value of each data block and compares it with the checksum generated before writing, thus outputting the integrity verification result. Simultaneously, the domain controller calls the signature verification module to verify the digital signature carried in the firmware header or tail and outputs the signature verification result. When both verification results indicate success, the second backup upgrade partition is marked as switchable; if either verification result fails, the partition remains unusable, and the first running partition continues to be used.

[0095] This verification mechanism simultaneously constrains data integrity and source authenticity. Integrity verification identifies transmission errors, write anomalies, or storage corruption, while signature verification identifies illegitimate or replaced firmware. Only after both types of verifications pass are the firmware in the second backup upgrade partition deemed to meet the conditions for subsequent partition switching, thus providing a reliable basis for soft reboot loading.

[0096] By adopting the above implementation method, the firmware in the second backup upgrade partition can complete dual confirmation before entering the switching process, which can effectively reduce the probability of loading erroneous images and make the partition switching based on complete and reliable data, thereby improving the reliability and consistency of the vehicle camera firmware upgrade results.

[0097] In some embodiments, the zone switching conditions include: the vehicle is powered off or the vehicle is in an idling stop state.

[0098] Among them, "vehicle power down" means that the vehicle controller cuts off the power supply to the vehicle camera and its related power supply circuits, or enters a power-off state, so that the camera is no longer in the working mode of continuous acquisition and video output; "vehicle in idling parking state" means that the vehicle power system is running but the vehicle speed is zero and the vehicle is not in a driving state. At this time, the domain controller can determine that the vehicle has entered a stationary window suitable for maintenance operations and allow the issuance of zone switching commands to the camera.

[0099] In practical implementation, the domain controller can jointly determine whether the partition switching conditions are met by using vehicle power management signals, ignition status signals, vehicle speed signals, and parking status signals. When the vehicle is detected to be powered down, or when the vehicle is running and its speed is zero and the idling stop judgment threshold is met, the domain controller sends a partition switching permission command to the on-board camera. The on-board camera then modifies the effective partition flag bit in the parameter partition and performs a soft reboot, causing the startup loading to point to the second backup upgrade partition. To adapt to the power management logic of different vehicle models, the vehicle power-down condition can be directly triggered by the vehicle power-down signal, or it can be identified by the camera detecting bus sleep or voltage drop below a preset threshold for a continuous period of time. The idling stop state can be jointly confirmed by engine speed, braking signal, and vehicle speed signal. In practical applications, other models or threshold configurations can also be selected for this judgment parameter, which is not limited in this invention.

[0100] In this embodiment of the invention, by limiting the partition switching to be performed when the vehicle is powered off or idling, the camera can switch between the running partition and the backup upgrade partition only within the non-driving risk window. This allows the soft reboot and new firmware loading process to avoid interference with the vehicle's driving process, ensuring that the impact of the switching process on the vehicle's visual link remains within a controllable range.

[0101] Based on the above embodiments, in some embodiments, the vehicle camera firmware upgrade method further includes: after a successful soft reboot and loading of the firmware in the second backup upgrade partition, using the second backup upgrade partition as the new first running partition, and using the original first running partition as the new second backup upgrade partition.

[0102] In its implementation, after receiving the partition switching command, the camera first updates the effective partition flag in the parameter partition, making the boot loading target point to the second backup upgrade partition, and then performs a soft reboot to complete the boot loading. After the firmware in the second backup upgrade partition completes initialization, self-test, and video output recovery, it can be determined that the boot is successful. At this time, the control logic remaps the partition roles, making the original second backup upgrade partition assume the responsibilities of the running partition, while the original first running partition is remarked as the backup upgrade partition and reserved as the storage area for subsequent firmware writing.

[0103] In this embodiment, partition role switching can be achieved through partition table updates. The partition table is stored in the parameter partition or an independent control information area. The control program reads the corresponding partition address based on the effective partition flag and completes the relocation. For example, during the reboot process, the bootloader reads the partition flag and loads the new firmware of partition B for startup. After successful startup, partition B becomes the new first running partition, and the original partition A becomes the new second backup upgrade partition, completing the version upgrade. To ensure continuous operation after the switch, the new first running partition continues to carry out the execution of the current version of firmware and video output, while the new second backup upgrade partition remains idle or preset to be upgraded for subsequent upgrade writing.

[0104] Through the aforementioned partition swapping mechanism, the upgraded firmware becomes the primary running version after successful boot, and the original running partition is automatically converted into a backup partition. This allows the camera to retain rollbackable storage space while completing the version switch, and enables subsequent upgrades to continue in an independent partition, effectively reducing the boot risks and version management chaos caused by overwrite.

[0105] In some embodiments, the storage chip of the vehicle camera is also divided into a Bootloader partition; the Bootloader partition is used to read the effective partition flag bit in the parameter partition when the vehicle camera starts up, and select to load the firmware in the first running partition or the second backup upgrade partition according to the effective partition flag bit.

[0106] The Bootloader partition can be composed of a pre-reserved boot code area within the storage chip. The boot code written therein is executed first after the vehicle camera is powered on, and is used to complete processor basic initialization, memory access configuration, and parameter partition reading. The effective partition flag bit stored in the parameter partition is used to indicate the partition where the currently loaded valid firmware is located. When the flag bit points to the first running partition, the boot code will read the firmware image from the first running partition and jump to execution; when the flag bit points to the second backup upgrade partition, the boot code will read the firmware image from the second backup upgrade partition and jump to execution. The effective partition flag bit can be stored using a single-bit flag, enumeration encoding, or partition numbering method to quickly identify the currently valid partition during boot determination. Those skilled in the art will understand that the program in the Bootloader partition can be implemented using Bootloader code adapted to the vehicle camera processor architecture. In practical applications, other models or implementation methods can also be selected, and this invention does not limit this.

[0107] For example, Figure 2 This is a schematic diagram illustrating the partitioning of the storage chip on an in-vehicle camera provided in an embodiment of the present invention. For example... Figure 2As shown, the storage chip of the vehicle camera is divided into a Bootloader partition, an A running partition (i.e., the first running partition), a B backup upgrade partition (i.e., the second backup upgrade partition), a parameter partition, and a reserved partition. The Bootloader partition stores the bootloader program, which reads the effective partition flag in the parameter partition upon power-up and selects to load firmware from either the A running partition or the B backup upgrade partition based on the effective partition flag. The A running partition (i.e., the first running partition) is the default working partition, used to store the currently running firmware and IQ parameters, and performs image acquisition, encoding, and output functions. The B backup upgrade partition (i.e., the second backup upgrade partition) receives and stores new firmware and IQ parameters; firmware flashing does not affect the normal operation of the A running partition. The parameter partition stores the effective partition flag, the firmware version number of the A / B partitions (i.e., the firmware version number of the first running partition and the firmware version number of the second backup upgrade partition), upgrade status flags, and verification information. The reserved area provides space for firmware upgrades and function expansions, avoiding the need to re-divide the entire storage layout due to insufficient partition capacity.

[0108] Through the above processing mechanism, the camera selects the running partition based on the flag bit in the parameter partition when it starts up, and decouples the boot loading path from the firmware storage location. This allows the switching between the first running partition and the second backup upgrade partition to be completed by modifying the flag bit and a soft reboot. Since the Bootloader partition directly completes partition identification and loading during the boot phase, the camera can switch stably between different firmware versions and maintain boot consistency and firmware takeover reliability after the upgrade.

[0109] Considering that in related technologies, if the new firmware has problems, rolling back to the old version requires completely reflashing the old firmware package, which is time-consuming and complex. Therefore, based on the above embodiments, some embodiments of the vehicle camera firmware upgrade method also include an abnormal rollback mechanism, which includes startup abnormal rollback and function abnormal rollback; wherein, startup abnormal rollback includes: if the firmware in the second backup upgrade partition has a startup abnormality, the vehicle camera's bootloader detects the loading failure and automatically rolls back to the first running partition for startup; function abnormal rollback includes: if the firmware in the second backup upgrade partition has a functional problem, receiving the rollback command issued by the domain controller, modifying the effective partition flag bit in the parameter partition and performing a soft reboot to load the firmware in the first running partition and start running.

[0110] The abnormal rollback mechanism is used to switch the loading of the vehicle camera back to the firmware corresponding to the first running partition when the firmware in the second backup upgrade partition fails to boot or malfunctions. The bootloader, a startup management program stored in the bootloader partition, first reads the effective partition flag bit in the parameter partition after power-on reset and determines the target partition to be loaded. The effective partition flag bit can be written as a binary flag value to indicate whether the first running partition or the second backup upgrade partition is in an effective state. The update of the flag bit can be executed by the camera's internal control logic or triggered by a rollback command initiated by the domain controller.

[0111] In practical implementation, when the firmware in the second backup upgrade partition fails to boot normally due to image corruption, verification errors, incorrect boot entry addresses, or initialization failures, the bootloader, upon detecting the loading failure, automatically switches the boot target to the first running partition. It then reloads the firmware in the first running partition and completes the boot process, effectively rolling back to the first running partition (partition A) and restoring the camera to normal operation. This rollback process does not require rewriting firmware data and can directly utilize the available version retained in the first running partition to restore camera operation. For functional anomaly rollbacks, when the firmware in the second backup upgrade partition exhibits image output anomalies, interface response anomalies, or communication anomalies with the domain controller after booting, the domain controller sends a rollback command to the camera. Upon receiving this command, the camera writes the effective partition flag in the parameter partition, causing the bootloader to select the first running partition (partition A) on the next boot. It then performs a soft reboot to exit the current running state and re-enter the boot state, thereby loading the firmware in the first running partition and starting operation. This process does not require flashing the old firmware package.

[0112] In this embodiment, the first running partition, the second backup upgrade partition, and the parameter partition are all located within the same storage chip. Partition switching only involves modifying the flag bits in the parameter partition and software reset control, without overwriting the original firmware image again. The bootloader performs a local automatic rollback upon detecting a boot failure, enabling the restoration of basic boot capabilities without the domain controller's involvement. Functional anomaly rollback, on the other hand, is triggered by the domain controller after confirming a business function problem with the new firmware, using a rollback command to uniformly trigger partition switching, ensuring that the camera continues to provide visual data with a known usable version.

[0113] By employing the aforementioned rollback mechanism, even if an anomaly occurs in the second backup upgrade partition during the startup or runtime phase, the firmware can be quickly restored to the stable firmware in the first running partition without needing to completely re-flash the old firmware package. This helps reduce the duration of device unavailability after an upgrade failure and lowers the risk of camera malfunction due to firmware anomalies. Since the rollback process relies solely on partition marker updates and a soft reboot, it can be used in conjunction with the aforementioned partitioned upgrade method to achieve rapid recovery and operational continuity during the upgrade process, significantly reducing time and operational complexity.

[0114] Figure 3 This is another schematic flowchart illustrating the vehicle camera firmware upgrade method provided in this embodiment of the invention. The vehicle camera firmware upgrade method provided in this embodiment of the invention is applied to the domain controller of a vehicle, and the domain controller connects to multiple vehicle cameras. Figure 3 As shown, a specific implementation of this vehicle-mounted camera firmware upgrade method may include the following steps:

[0115] S301, in response to receiving the camera firmware package from the OTA platform, sends an upgrade start command to all target vehicle cameras in the group, so that each target vehicle camera enters the background upgrade ready state while continuously outputting video stream in the first running partition.

[0116] For example, Figure 4 This is a schematic diagram of the structure of the vehicle-mounted camera module and domain controller provided in an embodiment of the present invention. Figure 4 As shown, a single automotive camera module mainly consists of Flash Memory or EEPROM, an image sensor, and a serializer. Externally, it is typically connected to a deserializer via a coaxial cable. The domain controller system-on-chip (SOC) communicates with the deserializer for data transmission and control operations via the Mobile Industry Processor Interface (MIPI) bus and I2C / General-Purpose Input / Output (GPIO).

[0117] In one possible embodiment, the domain controller establishes a communication connection with multiple vehicle-mounted cameras and receives camera firmware packages from an OTA platform. These firmware packages contain at least the firmware image to be upgraded, version information, and a data digest for verification. After confirming that the firmware package source and version information meet the upgrade requirements, the domain controller sends an upgrade start command to all target vehicle-mounted cameras within the group, according to the camera grouping information. All target vehicle-mounted cameras within the group refer to multiple cameras managed by the same domain controller and participating in the same batch of firmware upgrades. The upgrade start command notifies each target vehicle-mounted camera to enter a background upgrade-ready state without immediately interrupting the current video service. Upon receiving the command, each target vehicle-mounted camera maintains the existing firmware within its first running partition. The first running partition stores the currently running firmware program; its internal data is not overwritten during the upgrade preparation phase, thus allowing continuous video output during the upgrade preparation period. The background upgrade-ready state can be recorded through the camera's internal status register or running status flag. The domain controller can also confirm that each target vehicle-mounted camera has entered the ready state based on the status responses reported by the cameras before proceeding to the next step. For example, in one implementation, the upgrade start command is sent via a bus message, which includes the target camera identifier, firmware version number, and start flag. In another implementation, the upgrade start command is sent via an Ethernet control message, and the camera returns a ready confirmation frame upon receiving it. Through this step, the domain controller can establish a unified upgrade entry point without stopping the video output of the first running partition, enabling multiple cameras within the group to simultaneously enter a writable and verifiable controlled state, providing consistent starting conditions for subsequent firmware data distribution and partition switching.

[0118] S302. After each target vehicle camera enters the background upgrade ready state, the firmware data in the camera firmware package is sent to each target vehicle camera in batches so that each target vehicle camera writes the firmware data to the second backup upgrade partition.

[0119] In one possible embodiment, after receiving upgrade-ready confirmations from each target vehicle camera, the domain controller reads firmware data from the camera firmware package and splits it into preset batches. Each batch of firmware data contains consecutive image segments or write blocks divided by address ranges. Based on the camera's receiving bandwidth, buffer capacity, and current bus load, the domain controller sends each batch of firmware data to the corresponding target vehicle camera via a low-speed control channel. Each target vehicle camera receives the data and temporarily stores it in its receiving buffer. Then, the write control unit writes the data to the second backup upgrade partition, i.e., the B backup upgrade partition. The A partition remains unaffected throughout the process, and image acquisition, processing, and output functions operate normally. Batch transmission can be performed sequentially according to the address order of the firmware images, or it can be synchronously scheduled based on the receiving response time of each camera in the group, ensuring that each camera receives the next batch of data only after completing the current batch. If a camera experiences insufficient buffer, link latency, or partial write failure during the writing process, the domain controller can adjust the transmission rhythm of subsequent batches based on the feedback from that camera, without affecting the normal upgrade process of other cameras. For example, batch transmission can use fixed-length data blocks or data blocks based on partition page size, so that the second backup upgrade partition can be continuously written page by page or block by block. Through this step, firmware data is written to a backup partition that is independent of the current operating environment. The upgrade writing process will not overwrite the operating partition that is currently outputting video streams, thus enabling the camera to complete the new firmware write to disk while continuously operating.

[0120] S303: Receive the verification results of each target vehicle camera, and if the verification results of all target vehicle cameras in the group are all passed, send a partition switching command to all target vehicle cameras in the group so that each target vehicle camera modifies the effective partition flag bit in the parameter partition and performs a soft reboot, thereby loading the firmware in the second backup upgrade partition and starting it up.

[0121] In one possible embodiment, after each target vehicle camera completes the writing to the second backup upgrade partition, it performs an integrity check on the firmware in the backup partition. The check includes image length comparison, digest value comparison, and optional intra-partition address consistency check. After the check is completed, the check result is reported to the domain controller. The domain controller summarizes the check results of each camera in the group. Only when the check results of all target vehicle cameras pass the check will a partition switching command be uniformly issued to all target vehicle cameras in the group. The partition switching command is used to trigger the camera to switch from the current running partition to the second backup upgrade partition. Its execution process includes modifying the effective partition flag bit in the parameter partition and performing a soft reboot after the flag bit is updated. The parameter partition is used to store non-volatile configuration data related to startup. The effective partition flag bit in it is used to indicate the target partition to be loaded at startup. When the flag bit is updated from the value corresponding to the first running partition to the value corresponding to the second backup upgrade partition, the camera is read by the startup program during the soft reboot process, and the startup entry is redirected to the new firmware in the second backup upgrade partition. A soft reboot restarts the camera control program without disconnecting external power, reloading the operating environment with new boot parameters and firmware, without requiring a complete re-flashing process. After the soft reboot, each target vehicle camera restarts with the firmware in the second backup upgrade partition as the current running version. For example, in one implementation, the verification result is generated by the camera's local verification module and reported to the domain controller via the communication interface; in another implementation, the domain controller can perform a secondary verification of the received verification digest before deciding whether to send a partition switching command. Through this step, cameras within the group synchronously switch partitions when all writes are successful and verification is consistent. The effective partition flag in the parameter partition, in conjunction with the soft reboot, completes boot redirection, enabling multiple cameras to complete the upgrade and take effect under a consistent version state, avoiding inconsistencies in version states within the group due to single-path anomalies.

[0122] Based on the above analysis, this invention provides a method for upgrading the firmware of vehicle-mounted cameras. It employs a domain controller as a unified scheduling center. After receiving the camera firmware package from the OTA platform, it first sends an upgrade start command to all target vehicle-mounted cameras in the group, enabling each camera to enter a background upgrade-ready state while continuously outputting video streams in the first running partition. Then, the firmware data in the firmware package is sent to each camera in batches and written to the second backup upgrade partition. Finally, after all verifications are passed, a unified partition switching command is issued. The new firmware is loaded using the effective partition flag in the parameter partition and a soft reboot. Through this processing mechanism, the running data and the data to be upgraded are separated during the upgrade process, allowing the cameras to complete firmware updates while maintaining continuous video output, and enabling multiple cameras in the group to synchronously switch to the same version after verification.

[0123] Considering that in related technologies, for a 4-channel surround / panoramic camera group, a single camera upgrade failure or version mismatch can lead to abnormal image stitching, affecting the overall system availability, some embodiments of the vehicle camera firmware upgrade method further include: if the verification result of a single or part of the target vehicle cameras in the group is a verification failure, then a partition switching command is not triggered to be issued to all target vehicle cameras in the group; only the target vehicle cameras that failed the verification are marked, and the remaining target vehicle cameras maintain the original firmware version and operate normally.

[0124] The verification result refers to the judgment result obtained by comparing the integrity of the written content, confirming version consistency, and verifying signature validity after the target vehicle camera completes the firmware data writing to the second backup upgrade partition. Marking a target vehicle camera as failing verification means that after the domain controller receives the verification failure information, it writes the corresponding camera's device identifier, current version number, and abnormal status into the management table so that it can be isolated and processed separately in subsequent control. The partition switching command is the control command used to drive the target vehicle camera to modify the effective partition flag bit in the parameter partition and perform a soft reboot. Normal operation means that the camera continues to maintain image acquisition, video output, and communication response according to the first operating partition where the original firmware version is located.

[0125] In practical implementation, after receiving the verification results returned by each target vehicle camera, the domain controller compares the results one by one. When a verification failure is detected, a failure identifier is generated only for the camera corresponding to the failure and written to the status cache. At the same time, the unified partition switching command is stopped from being broadcast to that group of cameras. For cameras that do not show verification failures, the domain controller does not change their existing running partition marker or their current firmware loading state, allowing them to continue running in the first running partition corresponding to the original firmware version. The status cache can be set as a table structure in the vehicle memory or a record unit in a non-volatile storage area. Its record fields include camera number, upgrade batch number, verification result, exception reason, and subsequent processing flag. This structure facilitates direct reading of status information during subsequent upgrades or version restorations. In practical applications, other types of storage media can also be selected for the status cache, which is not limited in this invention.

[0126] In this embodiment of the invention, when the verification result of a single or partial target vehicle camera in the group fails, a partition switching command is not triggered to be sent to all target vehicle cameras in the group, thereby ensuring the consistency of camera firmware versions in the group and reducing the impact of single-camera upgrade anomalies on the overall surround view / panoramic view function.

[0127] In some embodiments, sending a zone switching command to all target vehicle cameras in the group includes: sending a zone switching command to all target vehicle cameras in the group when the zone switching conditions are met; the zone switching conditions include the vehicle being powered off or the vehicle being in an idling parking state.

[0128] For example, after receiving the vehicle power status signal, ignition status signal and vehicle speed status signal, the domain controller can determine whether the partition switching conditions are met based on the preset status judgment logic. The vehicle power-off corresponds to the whole vehicle entering the power-off or low power holding state, and the vehicle idling parking state corresponds to the engine maintaining idling speed and the vehicle speed being zero or below a preset threshold parking state.

[0129] When the partition switching conditions are met, the domain controller synchronously sends partition switching commands to all target vehicle cameras within the group, enabling each target vehicle camera to perform partition switching and soft reboot under a safe and stable vehicle condition. This command can be transmitted via vehicle Ethernet, CAN bus, or other vehicle communication links. After receiving the command, the camera reads the currently active partition flag in the parameter partition and switches the boot pointer to the second backup upgrade partition based on this flag to load the written and verified firmware data.

[0130] In this embodiment of the invention, since partition switching is only triggered when the vehicle is powered off or idling, and the camera typically does not perform real-time driving visual perception tasks when completing the switch, batch partition switching can be completed without interfering with driving scene perception. After the above processing, all target vehicle cameras within the group can complete consistent partition switching under unified triggering conditions, and the startup state after switching remains synchronized, thereby improving the consistency of firmware upgrades and operational stability of multiple cameras.

[0131] In some embodiments, the vehicle camera firmware upgrade method also includes a multi-camera firmware consistency guarantee mechanism: all target vehicle cameras in the group execute the flashing of the second backup upgrade partition in parallel; after the verification results of all target vehicle cameras in the group are all verified as passed, a partition switching command is uniformly issued so that all target vehicle cameras in the group run the new version firmware at the same time.

[0132] The multi-camera firmware consistency guarantee mechanism ensures the consistency of upgraded versions across multiple target vehicle cameras within a group. It suppresses upgrade progress differences between cameras through parallel flashing, unified verification, and synchronous switching. The second backup upgrade partition is a pre-defined independent write area within the storage chip of each target vehicle camera. After receiving the camera firmware package, the domain controller sends firmware data of the same version to each target vehicle camera in the group according to a unified schedule, ensuring that while the first running partition continues to operate, it writes data to the corresponding second backup upgrade partition. The verification result is generated by each target vehicle camera based on the written verification value. The verification value can be a hash value, CRC value, or signature comparison result. After receiving all verification results, the domain controller only broadcasts a partition switching command to all target vehicle cameras in the group when all results indicate successful verification. It then drives each target vehicle camera to synchronously modify the effective partition flag in the parameter partition and perform a soft reboot, thereby loading the new version firmware from the second backup upgrade partition.

[0133] For example, all cameras within the group perform B partition flashing in parallel. After all verifications pass, the domain controller issues a unified switch command to ensure that all cameras run the new firmware version simultaneously after rebooting, avoiding version inconsistencies that could affect system functionality or performance. In this mechanism, the same data packet order and write window are used when flashing the target vehicle cameras in parallel. The domain controller uniformly controls the write bandwidth and transmission cycle, ensuring that each camera completes the data write to the second backup upgrade partition within the same time period. The partition switch command is issued via group broadcast, with the command payload carrying a consistent target version identifier and switch confirmation flag. Each camera is only allowed to switch the startup partition after receiving the same round of switch authorization, thereby ensuring that all target vehicle cameras within the group start on the same version baseline.

[0134] By employing the above method, the written content, verification results, and effective version of each target vehicle camera within the group remain consistent, enabling them to switch to the new firmware version and run synchronously at the same time, thereby achieving consistent firmware management for multiple cameras. Since the second backup upgrade partition and the first running partition are independent of each other, the writing process does not affect existing video output, and the unified switching command is only triggered after all verifications pass, keeping the upgrade status within the group at the same version. This helps reduce coordination deviations caused by asynchronous versions of multiple cameras.

[0135] Based on the above embodiments, in some embodiments, the vehicle camera firmware upgrade method further includes a version verification mechanism: after each power-on, the current firmware version and partition status of all target vehicle cameras are polled; if a target vehicle camera with an inconsistent firmware version is found, the target vehicle camera with the inconsistent version is triggered to perform a firmware upgrade individually, or the other target vehicle cameras are triggered to perform a version rollback, so that the firmware versions of all target vehicle cameras in the group are consistent.

[0136] The version verification mechanism is used by the domain controller to verify the version consistency of each target vehicle camera in the group after each vehicle power-on. The current firmware version can be obtained from the version number returned to the domain controller after the camera starts up. The partition status can include the currently active partition, the partition to be upgraded, and the tag information in the parameter partition. The domain controller can query the version identifier and partition tag of each camera in a preset polling order, and compare the query results with the baseline version in the group to identify whether there are any nodes with version deviations.

[0137] In a specific implementation, the domain controller can send a version query message via CAN, Ethernet, or vehicle serial link during the initialization communication phase after power-on. Upon receiving the query message, the target vehicle camera returns its current firmware version number and the effective partition flag in the parameter partition. If a camera's firmware version is detected to be inconsistent with other cameras, the domain controller can mark that camera as a version-inconsistent node and, according to a preset upgrade strategy, only send the corresponding firmware package to that node, allowing it to restore to the unified version after completing writing, verification, and partition switching in the second backup upgrade partition. In another implementation, the domain controller can also send a rollback command to the remaining cameras, causing them to switch their current effective partition back to the same historical version partition as the inconsistent node, thus maintaining version consistency within the group. The firmware version number, partition flag, and rollback target version can be stored in the domain controller's version management table, which can be saved using non-volatile memory. In practical applications, other models of this component can also be selected; this invention does not limit this.

[0138] In this embodiment of the invention, the version verification mechanism uses version polling and partition status verification after power-on, and triggers a targeted upgrade or unified rollback when version inconsistency is detected, so that each target vehicle camera is back in a consistent software environment. This allows the camera group to maintain version matching during subsequent image stitching, calibration calls, and collaborative perception, which helps reduce interface incompatibility and operational deviations caused by version differences, thereby improving the version consistency and operational stability of the multi-camera system.

[0139] In summary, the present invention has at least the following advantages:

[0140] 1. By isolating A / B partitions, firmware flashing is performed in the background on the backup upgrade partition, while the running partition continuously outputs images. The entire upgrade process does not affect the normal use of ADAS, panoramic surround view and other functions, effectively eliminating security blind spots during the upgrade.

[0141] Second, by not overwriting the original firmware during the upgrade process, even if the flashing fails or the power is interrupted, the camera can still start normally from the original operating partition without functional failure, and there is no need to upgrade the firmware again or return it to the factory for repair.

[0142] Third, version rollback only requires modifying the effective partition flag in the parameter partition and performing a soft reboot, without having to re-flash the complete firmware package, which reduces rollback time from several minutes to seconds, greatly improving operation and maintenance efficiency.

[0143] Fourth, the unified management and control mechanism for the 4-channel surround / panoramic camera group not only ensures version consistency during normal upgrades, but also achieves abnormal isolation of single-camera failures, significantly improving the robustness of the overall system.

[0144] Fifth, logical partitioning is performed based on the existing flash memory chip of the camera, without the need to add additional storage hardware. This is compatible with the existing hardware platform of automotive cameras and is easy to mass-produce and deploy.

[0145] In summary, by receiving firmware data from the domain controller while continuously running the current firmware and outputting video streams in the first running partition, and writing the firmware data to a second backup upgrade partition independent of the running partition, interference with current image acquisition and video output during the upgrade writing process can be avoided, thus ensuring the continuity of visual perception of the vehicle camera during the upgrade. By verifying the firmware data after writing to the second backup upgrade partition and synchronizing the verification result to the domain controller, the integrity and validity of the upgrade data can be confirmed in a timely manner, thereby improving the reliability and controllability of the upgrade process. By receiving the partition switching command when the verification is successful and the partition switching conditions are met, modifying the effective partition flag bit in the parameter partition, and performing a soft reboot to load the firmware in the second backup upgrade partition, a smooth switch can be completed while ensuring the correctness of the upgrade result, thereby reducing the risk of startup failure caused by link interruption, power failure, or verification anomalies. By constructing an A / B dual-partition architecture on the camera side, the upgrade fault tolerance capability is significantly improved, ensuring that upgrade failure does not affect the normal function of the camera, and facilitating rapid version rollback with a single reboot. In addition, the above processing mechanism can be adapted to multi-camera group application scenarios, ensuring the consistency of camera firmware versions within the group and effectively reducing the impact of a single upgrade anomaly on the overall surround / panoramic view function.

[0146] The following are embodiments of the apparatus of the present invention, which can be used to execute embodiments of the method of the present invention. For details not disclosed in the embodiments of the apparatus of the present invention, please refer to the embodiments of the method of the present invention. Figure 5This is a schematic diagram of a vehicle-mounted camera firmware upgrade device provided in an embodiment of the present invention. The vehicle-mounted camera firmware upgrade device provided in this embodiment is applied to a vehicle-mounted camera, and the storage chip of the vehicle-mounted camera is divided into a first operating partition, a second backup upgrade partition, and a parameter partition. Figure 5 As shown, the vehicle camera firmware upgrade device 50 includes a firmware data receiving module 51, a firmware data writing module 52, a firmware data verification module 53, and a firmware upgrade module 54.

[0147] Among them, the firmware data receiving module 51 is used to receive firmware data sent by the vehicle's domain controller when the current firmware is running in the first running partition and continuously outputting video stream.

[0148] Firmware data writing module 52 is used to write the received firmware data to the second backup upgrade partition, wherein the process of writing to the second backup upgrade partition does not affect the operation of the first running partition;

[0149] Firmware data verification module 53 is used to verify the firmware data in the second backup upgrade partition after the second backup upgrade partition is written, and to synchronize the verification result to the domain controller.

[0150] The firmware upgrade module 54 is used to receive the partition switching command issued by the domain controller when the verification result is successful and the partition switching conditions are met. It modifies the effective partition flag bit in the parameter partition and performs a soft reboot to load the firmware in the second backup upgrade partition and start running, thereby completing the firmware upgrade of the vehicle camera.

[0151] In one possible implementation, the firmware data receiving module 51 can be specifically used to: receive firmware data issued by the domain controller through a control channel independent of the video channel in the serial link between the vehicle camera and the domain controller; wherein, the control channel includes an I2C channel or an SPI channel; when the firmware data is transmitted through the control channel, it does not occupy the bandwidth of the video stream in the serial link.

[0152] In one possible embodiment, the parameter partition also stores the firmware version number of the first running partition, the firmware version number of the second backup upgrade partition, the upgrade status flag, and local verification information; the firmware data writing module 52 can be specifically used to: after the second backup upgrade partition is written, update the firmware version number of the second backup upgrade partition to the firmware version number written this time, update the upgrade status flag to the pending switch status, and update the verification result of the local verification information to verification passed.

[0153] In one possible embodiment, the firmware data writing module 52 may be specifically used to: verify the data packet after each data packet is received; if the data packet verification fails, request the domain controller to retransmit the corresponding data packet; if the data packet verification passes, write the corresponding data packet to the second backup upgrade partition.

[0154] In one possible embodiment, the firmware data verification module 53 may be specifically used to: perform CRC and / or SHA verification on the firmware data in the second backup upgrade partition to obtain an integrity verification result; perform signature verification on the firmware data in the second backup upgrade partition to obtain a signature verification result; and determine that the firmware data in the second backup upgrade partition has passed verification if both the integrity verification result and the signature verification result are successful.

[0155] In one possible embodiment, the zone switching conditions include: the vehicle is powered off or the vehicle is in an idling stop state.

[0156] In one possible embodiment, the firmware upgrade module 54 may be specifically used to: after a successful soft reboot and loading of the firmware in the second backup upgrade partition, use the second backup upgrade partition as the new first running partition, and use the original first running partition as the new second backup upgrade partition.

[0157] In one possible embodiment, the storage chip of the vehicle camera is further divided into a Bootloader partition; the Bootloader partition is used to read the effective partition flag bit in the parameter partition when the vehicle camera starts up, and select to load the firmware in the first running partition or the second backup upgrade partition according to the effective partition flag bit.

[0158] In one possible embodiment, the vehicle camera firmware upgrade method further includes an abnormal rollback mechanism, which includes startup abnormal rollback and function abnormal rollback. The firmware upgrade module 54 can also be used to: if the firmware in the second backup upgrade partition experiences a startup abnormality, the vehicle camera's bootloader detects the loading failure and automatically rolls back to the first running partition for startup; the firmware upgrade module 54 can also be used to: if the firmware in the second backup upgrade partition has a functional problem, receive a rollback command from the domain controller, modify the effective partition flag in the parameter partition, and perform a soft reboot to load the firmware in the first running partition and start it.

[0159] The vehicle camera firmware upgrade device provided in this embodiment of the invention can be used to execute the method steps of the above method embodiment. The specific implementation and technical effects are similar, and will not be repeated here.

[0160] Figure 6This is another structural schematic diagram of the vehicle-mounted camera firmware upgrade device provided in an embodiment of the present invention. The vehicle-mounted camera firmware upgrade device provided in this embodiment of the present invention is applied to the domain controller of a vehicle, and the domain controller is connected to multiple vehicle-mounted cameras. Figure 6 As shown, the vehicle camera firmware upgrade device 60 includes an upgrade start command sending module 61, a firmware data sending module 62, and a partition switching command sending module 63.

[0161] Among them, the upgrade start command sending module 61 is used to respond to the camera firmware package sent by the OTA platform and send the upgrade start command to all target vehicle cameras in the group so that each target vehicle camera can enter the background upgrade ready state while continuously outputting video stream in the first running partition.

[0162] The firmware data delivery module 62 is used to send the firmware data in the camera firmware package to each target vehicle camera in batches after each target vehicle camera enters the background upgrade ready state, so that each target vehicle camera writes the firmware data to the second backup upgrade partition.

[0163] The partition switching instruction issuing module 63 is used to receive the verification results of each target vehicle camera, and when the verification results of all target vehicle cameras in the group are all passed, it issues a partition switching instruction to all target vehicle cameras in the group, so that each target vehicle camera modifies the effective partition flag bit in the parameter partition and performs a soft reboot, thereby loading the firmware in the second backup upgrade partition and starting it up.

[0164] In one possible embodiment, the partition switching instruction issuing module 63 can be specifically used to: if the verification result of a single or part of the target vehicle cameras in the group is a verification failure, then the partition switching instruction is not triggered to be issued to all target vehicle cameras in the group, only the target vehicle cameras that failed the verification are marked, and the remaining target vehicle cameras continue to operate normally with the original firmware version.

[0165] In one possible embodiment, the partition switching instruction issuing module 63 can also be used to: issue a partition switching instruction to all target vehicle cameras in the group when the partition switching conditions are met; the partition switching conditions include the vehicle being powered off or the vehicle being in an idling parking state.

[0166] In one possible embodiment, the partition switching instruction issuing module 63 can also be used to: perform the flashing of the second backup upgrade partition in parallel for all target vehicle cameras in the group; and after all the verification results of all target vehicle cameras in the group have passed the verification, issue a unified partition switching instruction so that all target vehicle cameras in the group can run the new version firmware at the same time.

[0167] In one possible embodiment, the firmware data delivery module 62 may be specifically used to: poll the current firmware version and partition status of all target vehicle cameras after each power-on; if a target vehicle camera with an inconsistent firmware version is found, trigger the target vehicle camera with the inconsistent version to perform a firmware upgrade individually, or trigger the other target vehicle cameras to perform a version rollback, so that the firmware versions of all target vehicle cameras in the group are consistent.

[0168] The vehicle camera firmware upgrade device provided in this embodiment of the invention can be used to execute the method steps of the above method embodiment. The specific implementation and technical effects are similar, and will not be repeated here.

[0169] In some embodiments, the present invention provides an in-vehicle camera firmware upgrade system, including a domain controller and multiple in-vehicle cameras; wherein the domain controller is used to execute the above-described in-vehicle camera firmware upgrade method applied to a vehicle domain controller; and the in-vehicle cameras are used to execute the above-described in-vehicle camera firmware upgrade method applied to in-vehicle cameras.

[0170] Figure 7 This is a schematic diagram of the architecture of an in-vehicle camera firmware upgrade system provided in an embodiment of the present invention. Figure 7 As shown, this vehicle camera firmware upgrade system uses an in-vehicle surround view domain controller / intelligent driving domain controller as the main control terminal. It connects multiple cameras (typically four surround view cameras, such as a front camera, rear camera, right rear-view camera, and left rear-view camera) via high-speed serial links (such as GMSL or FPD-Link). The video stream is transmitted through a high-speed channel such as the MIPI bus, while firmware flashing commands and firmware data packets are transmitted through a built-in low-speed control channel (such as an I2C channel or SPI channel). The flashing traffic does not consume video stream bandwidth. The domain controller receives commands from the OTA platform. The camera firmware package; the domain controller includes a firmware management module and a communication management module. The firmware management module is used for upgrade scheduling and version management. Specifically, it is used to send upgrade start commands to all target vehicle cameras (i.e., multiple cameras) in the group through a low-speed control channel, and to send partition switching commands to all target vehicle cameras in the group after receiving the verification results of each target vehicle camera and, if the verification results of all target vehicle cameras in the group are all passed, to all target vehicle cameras in the group. The communication management module receives video streams through high-speed serial links (such as GMSL, FPD-Link).

[0171] This invention also provides a vehicle, including a vehicle body and the aforementioned vehicle-mounted camera firmware upgrade system, wherein the vehicle-mounted camera firmware upgrade system is installed on the vehicle body.

[0172] The vehicle itself houses the onboard camera firmware upgrade system and provides power, communication, and installation support for the cameras, enabling the system to work collaboratively with the domain controller while the vehicle is running, parked, charging, or stationary. Once installed in the vehicle, the onboard camera firmware upgrade system allows for remote firmware upgrades and status switching without altering the vehicle's existing visual perception architecture. This maintains continuous video acquisition during the upgrade process, effectively reducing the risks of interruptions, upgrade failures, and device startup failures, thereby improving the stability of the overall vehicle perception system and the consistency of multi-camera collaboration.

[0173] Figure 8 This is a schematic diagram of the domain controller provided in an embodiment of the present invention. Figure 8 As shown, the domain controller 80 includes at least one processor 81 and a memory 82.

[0174] Optionally, the domain controller 80 also includes a communication component 83. The processor 81, memory 82, and communication component 83 are connected via a bus 84.

[0175] In a specific implementation, at least one processor 81 executes computer execution instructions stored in memory 82, causing at least one processor 81 to perform the above-described method.

[0176] The specific implementation process of processor 81 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0177] In the above embodiments, it should be understood that the processor can be a domain controller (DC), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.

[0178] The memory may include random access memory (RAM) and non-volatile memory (NVM), such as at least one disk storage device.

[0179] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0180] This domain controller, through the collaborative operation of the processor and memory, executes the firmware upgrade method for the vehicle-mounted cameras, sends upgrade commands to the cameras, and manages the upgrade process. Since the cameras continuously output video streams in the first operating partition while simultaneously writing the new firmware to the second backup upgrade partition, interference with the real-time perception link during the flashing process is avoided, thus reducing the risk of interruptions to surround view, parking, and assisted driving functions. Furthermore, the effective partition flag in the parameter partition, combined with verification and soft reboot switching of the startup direction, makes the upgrade results verifiable and reversible. This reduces the probability of bricking the system due to power outages or link anomalies, and enables synchronization of version status for multiple cameras, significantly improving the continuity of the vehicle's visual perception.

[0181] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0182] When executed by the processor, this computer program drives the vehicle-mounted camera to complete the upgrade process according to the vehicle-mounted camera firmware upgrade method. This allows the camera to continuously run and output video streams in the first operating partition while simultaneously receiving firmware data from the domain controller. The program further controls the writing of the new firmware to the second backup upgrade partition and performs verification. Then, it combines this with the effective partition flag in the parameter partition to complete the boot pointer switch, thereby avoiding image interruption and boot failure caused by direct overwriting of the operating area. Because the upgrade data is isolated from the current operating environment, a smooth switch to the new version is possible after a soft reboot, ensuring continuity of visual perception and reducing the risk of version asynchrony and rollback / re-flashing in multi-camera collaborative upgrades.

[0183] This invention also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.

[0184] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0185] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.

[0186] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0187] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0188] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0189] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0190] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0191] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope.

Claims

1. A method for upgrading firmware of an in-vehicle camera, characterized in that, Applied to vehicle-mounted cameras, the storage chip of the vehicle-mounted camera is divided into a first operating partition, a second backup and upgrade partition, and a parameter partition. The method includes: While the current firmware is running in the first running partition and continuously outputting video streams, firmware data sent by the vehicle's domain controller is received. The received firmware data is written to the second backup upgrade partition, wherein the process of writing to the second backup upgrade partition does not affect the operation of the first running partition; After the second backup upgrade partition is written, the firmware data in the second backup upgrade partition is verified, and the verification result is synchronized to the domain controller. If the verification result is successful and the partition switching conditions are met, the partition switching command issued by the domain controller is received, the effective partition flag bit in the parameter partition is modified, and a soft reboot is performed to load the firmware in the second backup upgrade partition and start running, thereby completing the firmware upgrade of the vehicle camera.

2. The vehicle-mounted camera firmware upgrade method according to claim 1, characterized in that, The firmware data received from the domain controller of the receiving vehicle includes: Firmware data sent by the domain controller is received through a control channel, which is independent of the video channel, in the serial link between the vehicle camera and the domain controller. The control channel includes an integrated circuit bus I2C channel or a serial peripheral interface SPI channel; when the firmware data is transmitted through the control channel, it does not occupy the bandwidth of the video stream in the serial link.

3. The vehicle-mounted camera firmware upgrade method according to claim 1, characterized in that, The parameter partition also stores the firmware version number of the first running partition, the firmware version number of the second backup upgrade partition, the upgrade status flag, and local verification information. The method further includes: After the second backup upgrade partition is written, the firmware version number of the second backup upgrade partition is updated to the firmware version number written this time, the upgrade status flag is updated to the pending switch status, and the verification result of the local verification information is updated to verification passed.

4. The vehicle-mounted camera firmware upgrade method according to claim 1, characterized in that, The step of writing the received firmware data to the second backup upgrade partition includes: After each data packet is received, the data packet is verified. If the data packet verification fails, a request is made to the domain controller to retransmit the corresponding data packet; If the data packet verification passes, the corresponding data packet is written to the second backup upgrade partition.

5. The vehicle-mounted camera firmware upgrade method according to claim 4, characterized in that, The verification of firmware data in the second backup upgrade partition includes: Perform Cyclic Redundancy Check (CRC) and / or Secure Hash Algorithm (SHA) verification on the firmware data in the second backup upgrade partition to obtain the integrity verification result; Perform signature verification on the firmware data in the second backup upgrade partition to obtain the signature verification result; If both the integrity verification result and the signature verification result pass, the firmware data in the second backup upgrade partition is deemed to have passed verification.

6. The vehicle-mounted camera firmware upgrade method according to claim 1, characterized in that, The partition switching conditions include: The vehicle is either powered off or the vehicle is in an idling stop state.

7. The vehicle-mounted camera firmware upgrade method according to any one of claims 1 to 6, characterized in that, The method further includes: After the soft reboot and successful boot of the firmware in the second backup upgrade partition, the second backup upgrade partition is used as the new first running partition, and the original first running partition is used as the new second backup upgrade partition.

8. The vehicle camera firmware upgrade method according to any one of claims 1 to 6, characterized in that, The storage chip of the vehicle-mounted camera is also divided into a bootloader partition; The bootloader partition is used to read the effective partition flag bit in the parameter partition when the vehicle camera starts up, and select to load the firmware in the first running partition or the second backup upgrade partition according to the effective partition flag bit.

9. The vehicle-mounted camera firmware upgrade method according to claim 8, characterized in that, The method further includes an exception rollback mechanism, which includes initiation exception rollback and function exception rollback; wherein: The startup anomaly rollback includes: if the firmware in the second backup upgrade partition fails to start, the bootloader of the vehicle camera will automatically roll back to the first running partition after detecting the loading failure; The functional rollback includes: if the firmware in the second backup upgrade partition has a functional problem, receiving a rollback instruction issued by the domain controller, modifying the effective partition flag bit in the parameter partition and performing a soft reboot to load the firmware in the first running partition and start running.

10. A method for upgrading firmware of an in-vehicle camera, characterized in that, A domain controller applied to a vehicle, the domain controller connecting to multiple vehicle-mounted cameras, the method comprising: In response to receiving the camera firmware package from the Over-the-Air (OTA) platform, an upgrade start command is sent to all target vehicle cameras in the group, so that each target vehicle camera enters the background upgrade ready state while continuously outputting video stream in the first operating partition. After each of the target vehicle cameras enters the background upgrade ready state, the firmware data in the camera firmware package is sent to each of the target vehicle cameras in batches, so that each of the target vehicle cameras writes the firmware data into the second backup upgrade partition. The system receives the verification results of each target vehicle camera, and if the verification results of all target vehicle cameras in the group are all passed, it sends a partition switching command to all target vehicle cameras in the group, so that each target vehicle camera modifies the effective partition flag bit in the parameter partition and performs a soft reboot, thereby loading the firmware in the second backup upgrade partition and starting it up.

11. The vehicle-mounted camera firmware upgrade method according to claim 10, characterized in that, Also includes: If the verification result of one or some of the target vehicle cameras in the group is a verification failure, the partition switching command will not be triggered to all the target vehicle cameras in the group. Only the target vehicle cameras that failed the verification will be marked, and the remaining target vehicle cameras will continue to operate normally with the original firmware version.

12. The vehicle-mounted camera firmware upgrade method according to claim 10, characterized in that, The step of sending a zone switching command to all target vehicle cameras in the group includes: If the zone switching conditions are met, a zone switching command is sent to all the target vehicle cameras in the group; The conditions for switching between zones include when the vehicle is powered off or when the vehicle is idling.

13. The vehicle-mounted camera firmware upgrade method according to any one of claims 10 to 12, characterized in that, It also includes a multi-camera firmware consistency guarantee mechanism: All the target vehicle cameras in the group perform the flashing of the second backup upgrade partition in parallel; After all the target vehicle cameras in the group have passed the verification, a unified partition switching command is issued so that all the target vehicle cameras in the group can run the new firmware version at the same time.

14. The vehicle-mounted camera firmware upgrade method according to any one of claims 10 to 12, characterized in that, It also includes a version verification mechanism: Each time power is supplied, the current firmware version and partition status of all the target vehicle cameras are polled. If a target vehicle camera with an inconsistent firmware version is found, the target vehicle camera with the inconsistent version will be triggered to perform a firmware upgrade individually, or the other target vehicle cameras will be triggered to roll back their versions, so that the firmware versions of all target vehicle cameras in the group are consistent.

15. A vehicle-mounted camera firmware upgrade device, characterized in that, An application for vehicle-mounted cameras, wherein the storage chip of the vehicle-mounted camera is divided into a first operating partition, a second backup and upgrade partition, and a parameter partition, the device comprising: The firmware data receiving module is used to receive firmware data sent by the vehicle's domain controller when the current firmware is running in the first running partition and a video stream is continuously output. A firmware data writing module is used to write the received firmware data into the second backup upgrade partition, wherein the process of writing into the second backup upgrade partition does not affect the operation of the first running partition; The firmware data verification module is used to verify the firmware data in the second backup upgrade partition after the second backup upgrade partition is written, and to synchronize the verification result to the domain controller. The firmware upgrade module is used to receive a partition switching instruction issued by the domain controller when the verification result is successful and the partition switching conditions are met, modify the effective partition flag bit in the parameter partition and perform a soft reboot to load the firmware in the second backup upgrade partition and start running, thereby completing the firmware upgrade of the vehicle camera.

16. A vehicle-mounted camera firmware upgrade device, characterized in that, A domain controller for vehicles, the domain controller connecting multiple vehicle cameras, the device comprising: The upgrade start command sending module is used to respond to the camera firmware package sent by the Over-the-Air (OTA) platform and send upgrade start commands to all target vehicle cameras in the group so that each target vehicle camera enters the background upgrade ready state while continuously outputting video streams in the first operating partition. The firmware data delivery module is used to send the firmware data in the camera firmware package to each of the target vehicle cameras in batches after each of the target vehicle cameras enters the background upgrade ready state, so that each of the target vehicle cameras writes the firmware data into the second backup upgrade partition. The partition switching instruction issuing module is used to receive the verification results of each of the target vehicle cameras, and when the verification results of all the target vehicle cameras in the group are all verified, it issues a partition switching instruction to all the target vehicle cameras in the group, so that each target vehicle camera modifies the effective partition flag bit in the parameter partition and performs a soft reboot, thereby loading the firmware in the second backup upgrade partition and starting it up.

17. A vehicle-mounted camera firmware upgrade system, characterized in that, Includes a domain controller and multiple vehicle cameras; The domain controller is configured to perform the method as described in any one of claims 10 to 14; The vehicle-mounted camera is used to perform the method as described in any one of claims 1 to 9.

18. A vehicle, characterized in that, include: Vehicle body; The vehicle-mounted camera firmware upgrade system as described in claim 17 is installed on the vehicle body.

19. A domain controller, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the vehicle camera firmware upgrade method as described in any one of claims 10 to 14.

20. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the vehicle camera firmware upgrade method as described in any one of claims 1 to 14.

21. A computer program product, characterized in that, include: A computer program, which, when executed by a processor, implements the vehicle camera firmware upgrade method as described in any one of claims 1 to 14.