Firmware updating method and device for vehicle-mounted camera, equipment and medium
By implementing I2C address unlocking and firmware files sequentially written on the on-board camera, the problem that the on-board camera cannot upgrade the firmware online is solved, and a faster and more reliable firmware update process is achieved.
Patent Information
- Application Number
- CN202311238728.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-25
- Publication Date
- 2025-03-25
AI Technical Summary
The existing technology cannot achieve online firmware upgrades for on-board cameras, resulting in users needing to remove the camera for updates. The process is cumbersome and easy to cause damage to the line, increasing the cost of repair and replacement.
By obtaining the camera to be updated on the target vehicle, determining its I2C address and sending an unlocking command, then dividing the target firmware file into multiple sub-firmware files, writing to the camera one after another, and sending a locking command after the writing is completed.
The online firmware upgrade of the on-board camera is realized, which saves disassembly steps, saves time and labor costs, avoids line damage problems, and improves operation reliability and stability.
Smart Images

Figure CN119690467A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of vehicle technology, and in particular to a firmware update method, device, equipment and medium for a vehicle-mounted camera. Background Art
[0002] Currently, multiple cameras installed on cars require regular firmware updates to optimize the effects. However, the current firmware update method has some disadvantages. First, when updating the camera firmware, the camera needs to be removed from the vehicle and updated using a dedicated upgrade tool. This process is very cumbersome and can easily cause line damage, thereby increasing repair and replacement costs. Second, for mass-produced cars, it is impossible to upgrade the firmware online, so users must go to the 4S store in person to update the firmware, which brings inconvenience to users. Summary of the invention
[0003] The present disclosure provides a method, device, equipment and medium for updating the firmware of a vehicle-mounted camera, so as to at least solve the problem that the vehicle-mounted camera cannot realize online firmware upgrade. The technical solution of the present disclosure is as follows:
[0004] According to a first aspect of an embodiment of the present disclosure, a firmware update method for a vehicle-mounted camera is provided, comprising: obtaining a camera on a target vehicle for which firmware update is to be performed as a target camera, and lighting up the target camera; determining an I2C address of the target camera, and sending an unlock instruction to the I2C address; after the target camera is unlocked, writing a target firmware file to the target camera; after the target firmware file is written, sending a lock instruction to the I2C address of the target camera.
[0005] In some embodiments, writing a target firmware file to a target camera includes: initializing a storage offset corresponding to the target camera, wherein the storage offset refers to an address offset specified in a memory and is used to determine the location of data in the memory; dividing the target firmware file into multiple sub-firmware files, and determining a single offset value based on the sub-firmware files; based on an I2C interface corresponding to the target camera, starting from the storage offset, writing the multiple sub-firmware files to the target camera in sequence, wherein after any sub-firmware file is written to the target camera, the storage offset is updated based on the single offset value.
[0006] In some embodiments, multiple sub-firmware files are written into a target camera in sequence, including: for any sub-firmware file, after the writing of the sub-firmware file is completed, the target camera is monitored for a duration; after monitoring that the target camera has waited for a preset duration, the next sub-firmware file is written into the target camera until all sub-firmware files are written.
[0007] In some embodiments, a method for obtaining a target firmware file includes: sending a firmware file call instruction to the cloud, the firmware file call instruction carrying firmware file identification information, the firmware file identification information is used by the cloud to determine the target firmware file from multiple candidate firmware files; receiving the target firmware file sent by the cloud.
[0008] In some embodiments, lighting up the target camera includes: calling a driver layer interface of the target camera to light up the target camera.
[0009] In some embodiments, the firmware update method for a vehicle-mounted camera also includes: if there are multiple target cameras, obtaining target firmware files corresponding to each of the multiple target cameras; for any target camera, after the firmware update of the target camera is completed, performing a firmware update on the next target camera based on the target firmware file corresponding to the next target camera, until the firmware update of all target cameras is completed.
[0010] According to a second aspect of an embodiment of the present disclosure, a firmware update device for a vehicle-mounted camera is provided, comprising: an acquisition module, used to acquire a camera on a target vehicle to be subjected to firmware update as a target camera, and light up the target camera; an unlocking module, used to determine an I2C address of the target camera, and send an unlocking instruction to the I2C address; a writing module, used to write a target firmware file to the target camera after the target camera is unlocked; and a locking module, used to send a locking instruction to the I2C address of the target camera after the writing of the target firmware file is completed.
[0011] In some embodiments, the writing module is further used to: initialize the storage offset corresponding to the target camera, wherein the storage offset refers to an address offset specified in the memory, which is used to determine the location of the data in the memory; divide the target firmware file into multiple sub-firmware files, and determine the single offset value according to the sub-firmware files; based on the I2C interface corresponding to the target camera, starting from the storage offset, write the multiple sub-firmware files into the target camera in sequence, wherein after any sub-firmware file is written to the target camera, the storage offset is updated based on the single offset value.
[0012] In some embodiments, the writing module is also used to: for any sub-firmware file, after the writing of the sub-firmware file is completed, monitor the duration of the target camera; after monitoring that the target camera has waited for a preset time, write the next sub-firmware file to the target camera until the writing of all sub-firmware files is completed.
[0013] In some embodiments, the firmware update device for a vehicle-mounted camera further includes: a sending module for sending a firmware file call instruction to the cloud, the firmware file call instruction carries firmware file identification information, and the firmware file identification information is used by the cloud to determine a target firmware file from multiple candidate firmware files; and a receiving module for receiving the target firmware file sent by the cloud.
[0014] In some embodiments, the acquisition module is further used to: call the driver layer interface of the target camera to light up the target camera.
[0015] In some embodiments, the firmware update device for a vehicle-mounted camera further includes: a control module, which is used to obtain target firmware files corresponding to each of the multiple target cameras if there are multiple target cameras, and for any target camera, after the firmware update of the target camera is completed, perform firmware update on the next target camera based on the target firmware file corresponding to the next target camera, until the firmware update of all target cameras is completed.
[0016] According to the third aspect of an embodiment of the present disclosure, an electronic device is proposed, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to implement the firmware update method for a vehicle-mounted camera as described in the embodiment of the first aspect of the present application.
[0017] According to a fourth aspect of an embodiment of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is proposed, wherein the computer instructions are used to implement the firmware update method for a vehicle-mounted camera as described in the embodiment of the first aspect of the present application.
[0018] According to a fifth aspect of the embodiments of the present disclosure, a computer program product is proposed, including a computer program, which, when executed by a processor, implements the firmware update method for a vehicle-mounted camera as described in the first aspect of the embodiments of the present application.
[0019] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects: the present application realizes online firmware upgrade of the vehicle-mounted camera, eliminating the step of removing the camera from the vehicle, saving time and labor costs, and avoiding the problem of line damage that may be caused by frequent installation and removal of the camera. It is faster and more convenient, provides a better user experience, and improves the reliability and stability of operation.
[0020] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.
[0022] Figure 1 It is a schematic diagram of an exemplary implementation of a firmware update method for a vehicle-mounted camera shown in the present application.
[0023] Figure 2 This is a camera firmware update framework diagram shown in this application.
[0024] Figure 3 It is a schematic diagram of an exemplary implementation of another method for updating firmware of a vehicle-mounted camera shown in the present application.
[0025] Figure 4 It is an overall diagram of an exemplary embodiment of another firmware update method for a vehicle-mounted camera shown in the present application.
[0026] Figure 5 Schematic diagram of a firmware update device for a vehicle-mounted camera shown in the present application.
[0027] Figure 6 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0028] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.
[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0030] Figure 1 is a schematic diagram of an exemplary implementation of a firmware update method for a vehicle-mounted camera shown in the present application, such as Figure 1 As shown, the firmware update method of the vehicle-mounted camera includes the following steps:
[0031] S101, obtaining a camera on a target vehicle for which firmware update is to be performed as a target camera, and lighting up the target camera.
[0032] This application is mainly applicable to the firmware update of vehicle-mounted cameras, which include the cameras corresponding to the driving recorder, the driving assistance system, the reversing imaging system and the blind spot monitoring system.
[0033] This application can be executed by an autonomous driving chip (System-on-a-Chip, SOC), where the autonomous driving chip is an integrated circuit chip specifically used to support autonomous driving functions. It integrates multiple functional modules such as processors, image processing units, sensor interfaces, and communication interfaces to meet the computing power and data processing requirements of the autonomous driving system.
[0034] Among them, after determining the camera on the target vehicle to be updated with firmware as the target camera, the driver layer interface of the target camera is obtained, and the corresponding command or function of the driver layer interface is called to light up the target camera to activate the camera and make it available.
[0035] S102, determining the I2C address of the target camera, and sending an unlock instruction to the I2C address.
[0036] Each I2C device has a unique address. In this application, the I2C address of the target camera is determined, and an unlock command is sent to the I2C address to establish contact with the target camera and set the firmware memory writable permission.
[0037] Optionally, the I2C address of the target camera can be obtained from the device specification, documentation or related resources.
[0038] S103, after the target camera is unlocked, writing the target firmware file into the target camera.
[0039] Figure 2 This is a camera firmware update framework diagram shown in this application, such as Figure 2 As shown, the autonomous driving chip communicates with the target camera via I2C. After the target camera is unlocked, the autonomous driving chip writes the obtained target firmware file into the target camera based on the I2C interface.
[0040] S104, after the target firmware file is written, a lock instruction is sent to the I2C address of the target camera.
[0041] After the target firmware file is written to the camera firmware storage of the target camera, a lock instruction is sent to the I2C address of the target camera to complete the camera firmware update operation.
[0042] The embodiment of the present application realizes online firmware upgrade of the vehicle-mounted camera, eliminating the step of removing the camera from the vehicle, saving time and labor costs, and avoiding the problem of line damage that may be caused by frequent installation and removal of the camera. It is faster and more convenient, provides a better user experience, and improves the reliability and stability of operation.
[0043] Furthermore, if there are multiple vehicle-mounted cameras that need to be updated, that is, there are multiple target cameras, the target firmware files corresponding to each of the multiple target cameras are obtained. For any target camera, after the firmware update of the target camera is completed, the firmware update is performed on the next target camera based on the target firmware file corresponding to the next target camera until the firmware update of all target cameras is completed, so as to ensure that each camera is correctly updated to the latest firmware version.
[0044] Figure 3 is a schematic diagram of an exemplary implementation of another method for updating the firmware of a vehicle-mounted camera shown in the present application, such as Figure 3 As shown, the firmware update method of the vehicle-mounted camera includes the following steps:
[0045] S301, obtaining a camera on a target vehicle for which firmware update is to be performed as a target camera, and lighting up the target camera.
[0046] S302, determine the I2C address of the target camera, and send an unlock instruction to the I2C address.
[0047] For the specific implementation steps of steps S301 to S302, reference may be made to the specific introduction of the relevant parts in the above embodiment, which will not be described again here.
[0048] S303, after the target camera is unlocked, initialize the storage offset corresponding to the target camera, wherein the storage offset refers to an address offset specified in the memory, which is used to determine the location of the data in the memory.
[0049] Exemplarily, in the present application, the camera firmware storage offset is initialized, that is, param_addr is set to 0x00000000, which is equivalent to the starting address of the firmware storage.
[0050] S304: Divide the target firmware file into a plurality of sub-firmware files, and determine a single offset value according to the sub-firmware files.
[0051] Divide the target firmware file into multiple sub-firmware files. For example, each sub-firmware file can be 256 bytes, that is, the single offset value is 256 bytes. It should be noted that the size of each sub-firmware file block should be tested according to the camera and system. Too large or too small may cause flashing failure.
[0052] Among them, in this application, the method for obtaining the target firmware file is: sending a firmware file call instruction to the cloud, the firmware file call instruction carries firmware file identification information, the firmware file identification information is used by the cloud to determine the target firmware file from multiple candidate firmware files, and receive the target firmware file sent by the cloud.
[0053] S305, based on the I2C interface corresponding to the target camera, starting from the storage offset, multiple sub-firmware files are sequentially written into the target camera, wherein after any sub-firmware file is written into the target camera, the storage offset is updated based on the single offset value.
[0054] In this application, based on the I2C interface corresponding to the target camera, each sub-firmware file is written into the target camera in sequence starting from the storage offset.
[0055] Among them, since it usually takes a certain amount of time to complete the flashing of the firmware, in this application, for any sub-firmware file, after the sub-firmware file is written, the target camera is monitored for the duration, and after the target camera is monitored to wait for the preset duration, the next sub-firmware file is written to the target camera until all sub-firmware files are written. Exemplarily, the preset waiting duration can be set to 500 milliseconds.
[0056] After any sub-firmware file is written to the target camera, the storage offset is updated based on the single offset value, and the storage offset is set: param_addr + = static_cast <int>(0x0100). In this way, each time a sub-firmware file is written, the storage offset (param_addr) is increased by 0x0100 (i.e., 256, the size of the block) so as to gradually update the entire firmware content.
[0057] S306, after the target firmware file is written, a lock instruction is sent to the I2C address of the target camera.
[0058] After the target firmware file is written to the camera firmware storage of the target camera, a lock instruction is sent to the I2C address of the target camera to complete the camera firmware update operation.
[0059] The embodiment of the present application writes the target firmware file to the camera firmware storage through the I2C interface, and at the same time, by setting the storage offset, ensures that each write is correctly located at the corresponding position, so as to realize the block-by-block update and cumulative update of the firmware storage area, ensure the integrity of the new firmware, and after writing the firmware content, the next step of writing is performed after a preset time to ensure that the camera firmware storage completes the flash update. The setting of the waiting time can be adjusted according to the specific situation to ensure the stability and reliability of the firmware update. After the firmware content is written to the camera firmware storage, the camera firmware is locked through the I2C interface to ensure that the firmware will not be accidentally modified. This can enhance the security of the firmware and prevent unauthorized access and tampering.
[0060] Figure 4 is an overall diagram of another exemplary implementation of a method for updating the firmware of a vehicle-mounted camera shown in the present application, such as Figure 4 As shown, the firmware update method of the vehicle-mounted camera includes the following steps:
[0061] S401, obtaining a camera on a target vehicle for which firmware update is to be performed as a target camera, and lighting up the target camera.
[0062] S402, sending a firmware file calling instruction to the cloud, where the firmware file calling instruction carries firmware file identification information, and the firmware file identification information is used by the cloud to determine a target firmware file from multiple candidate firmware files.
[0063] S403, receiving the target firmware file sent by the cloud.
[0064] Regarding the specific implementation steps of steps S401 to S403, reference may be made to the specific introduction of the relevant parts in the above embodiment, which will not be described again here.
[0065] S404, determine the I2C address of the target camera, and send an unlock instruction to the I2C address.
[0066] S405, after the target camera is unlocked, initialize the storage offset corresponding to the target camera, wherein the storage offset refers to an address offset specified in the memory, which is used to determine the location of the data in the memory.
[0067] S406: Divide the target firmware file into a plurality of sub-firmware files, and determine a single offset value according to the sub-firmware files.
[0068] S407 , based on the I2C interface corresponding to the target camera, starting from the storage offset, for any sub-firmware file, after the sub-firmware file is written, perform duration monitoring on the target camera.
[0069] S408, after monitoring that the target camera has waited for a preset time, write the next sub-firmware file to the target camera until all sub-firmware files are written, wherein after any sub-firmware file is written to the target camera, update the stored offset based on the single offset value.
[0070] S409, after the target firmware file is written, a lock instruction is sent to the I2C address of the target camera.
[0071] Regarding the specific implementation steps of steps S404 to S409, reference may be made to the detailed introduction of the relevant parts in the above embodiment, which will not be described again here.
[0072] The embodiment of the present application writes the target firmware file to the camera firmware storage through the I2C interface, and at the same time, by setting the storage offset, ensures that each write is correctly located at the corresponding position, so as to realize the block-by-block update and cumulative update of the firmware storage area, ensure the integrity of the new firmware, and after writing the firmware content, the next step of writing is performed after a preset time to ensure that the camera firmware storage completes the flash update. The setting of the waiting time can be adjusted according to the specific situation to ensure the stability and reliability of the firmware update. After the firmware content is written to the camera firmware storage, the camera firmware is locked through the I2C interface to ensure that the firmware will not be accidentally modified. This can enhance the security of the firmware and prevent unauthorized access and tampering.
[0073] Figure 5 is a schematic diagram of a firmware update device for a vehicle-mounted camera shown in the present application, such as Figure 5 As shown, the firmware update device 500 of the vehicle-mounted camera includes:
[0074] The acquisition module 501 is used to acquire a camera on a target vehicle for which firmware update is to be performed as a target camera, and light up the target camera.
[0075] The unlocking module 502 is used to determine the I2C address of the target camera and send an unlocking instruction to the I2C address.
[0076] The writing module 503 is used to write the target firmware file into the target camera after the target camera is unlocked.
[0077] The locking module 504 is used to send a locking instruction to the I2C address of the target camera after the target firmware file is written.
[0078] The device realizes the online firmware upgrade of the vehicle-mounted camera, eliminating the step of removing the camera from the vehicle, saving time and labor costs, and avoiding the problem of line damage that may be caused by frequent installation and removal of the camera. It is faster and more convenient, provides a better user experience, and improves the reliability and stability of operation.
[0079] In some embodiments, the writing module 503 is further used to: initialize the storage offset corresponding to the target camera, wherein the storage offset refers to an address offset specified in the memory, which is used to determine the location of the data in the memory; divide the target firmware file into multiple sub-firmware files, and determine the single offset value according to the sub-firmware files; based on the I2C interface corresponding to the target camera, starting from the storage offset, write the multiple sub-firmware files into the target camera in sequence, wherein after any sub-firmware file is written into the target camera, the storage offset is updated based on the single offset value.
[0080] In some embodiments, the writing module 503 is also used to: for any sub-firmware file, after the writing of the sub-firmware file is completed, monitor the duration of the target camera; after monitoring that the target camera has waited for a preset time, write the next sub-firmware file to the target camera until the writing of all sub-firmware files is completed.
[0081] In some embodiments, the firmware update device 500 for a vehicle-mounted camera further includes: a sending module 505, used to send a firmware file call instruction to the cloud, the firmware file call instruction carries firmware file identification information, and the firmware file identification information is used by the cloud to determine a target firmware file from multiple candidate firmware files; a receiving module 506, used to receive the target firmware file sent by the cloud.
[0082] In some embodiments, the acquisition module 501 is further used to: call the driver layer interface of the target camera to light up the target camera.
[0083] In some embodiments, the firmware update device 500 for a vehicle-mounted camera further includes: a control module 507, which is used to obtain target firmware files corresponding to each of the multiple target cameras if there are multiple target cameras, and for any target camera, after the firmware update of the target camera is completed, perform firmware update on the next target camera based on the target firmware file corresponding to the next target camera, until the firmware update of all target cameras is completed.
[0084] Figure 6 is a block diagram of an electronic device 600 according to an exemplary embodiment.
[0085] like Figure 6 As shown, the electronic device 600 includes:
[0086] The memory 601 and the processor 602, a bus 603 connecting different components (including the memory 601 and the processor 602), the memory 601 stores a computer program, and when the processor 602 executes the program, the firmware update method of the vehicle camera of the embodiment of the present disclosure is implemented.
[0087] Bus 603 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus structures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnect (PCI) bus.
[0088] The electronic device 600 typically includes a variety of electronic device readable media. These media can be any available media that can be accessed by the electronic device 600, including volatile and non-volatile media, removable and non-removable media.
[0089] The memory 601 may also include computer system readable media in the form of volatile memory, such as random access memory (RAM) 604 and / or cache memory 605. The electronic device 600 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 606 may be used to read and write non-removable, non-volatile magnetic media ( Figure 6 not shown, usually called a "hard drive"). Although Figure 6 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 603 via one or more data medium interfaces. Memory 601 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present disclosure.
[0090] A program / utility 608 having a set (at least one) of program modules 607 may be stored, for example, in the memory 601. Such program modules 607 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 607 generally perform the functions and / or methods of the embodiments described in the present disclosure.
[0091] The electronic device 600 may also communicate with one or more external devices 609 (e.g., keyboard, pointing device, display 610, etc.), one or more devices that enable a user to interact with the electronic device 600, and / or any device that enables the electronic device 600 to communicate with one or more other computing devices (e.g., network card, modem, etc.). Such communication may be performed through an input / output (I / O) interface 611. Furthermore, the electronic device 600 may also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN) and / or public network, such as the Internet) through a network adapter 612. Figure 6 As shown, the network adapter 612 communicates with other modules of the electronic device 600 via the bus 603. It should be understood that although Figure 6 Not shown, other hardware and / or software modules may be used in conjunction with electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0092] The processor 602 executes various functional applications and data processing by running the programs stored in the memory 601 .
[0093] It should be noted that the implementation process and technical principles of the electronic device of this embodiment refer to the aforementioned explanation of the firmware update method of the vehicle-mounted camera of the embodiment of the present disclosure, and will not be repeated here.
[0094] In order to implement the above embodiment, the embodiment of the present application also proposes a non-transient computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable the computer to implement the firmware update method of the vehicle-mounted camera as shown in the above embodiment. Optionally, the non-transient computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0095] In order to implement the above embodiment, the embodiment of the present application also proposes a computer program product, including a computer program, which implements the firmware update method of the vehicle-mounted camera shown in the above embodiment when executed by a processor.
[0096] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0097] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.< / int>
Claims
1. A method for updating the firmware of a vehicle-mounted camera, characterized in that: include: Acquire a camera on a target vehicle for which firmware update is to be performed as a target camera, and light up the target camera; Determine the I2C address of the target camera and send an unlock command to the I2C address; After the target camera is unlocked, writing the target firmware file into the target camera; After the target firmware file is written, a locking instruction is sent to the I2C address of the target camera.
2. The method according to claim 1, characterized in that Writing the target firmware file into the target camera comprises: Initialize a storage offset corresponding to the target camera, wherein the storage offset refers to an address offset specified in the memory, which is used to determine the location of data in the memory; Dividing the target firmware file into a plurality of sub-firmware files, and determining a single offset value according to the sub-firmware files; Based on the I2C interface corresponding to the target camera, starting from the storage offset, the multiple sub-firmware files are written into the target camera in sequence, wherein after any of the sub-firmware files is written into the target camera, the storage offset is updated based on the single offset value.
3. The method according to claim 2, characterized in that The step of writing the plurality of sub-firmware files into the target camera in sequence comprises: For any of the sub-firmware files, after the sub-firmware file is written, performing time monitoring on the target camera; After monitoring that the target camera has waited for a preset time, writing the next piece of the sub-firmware file to the target camera until all sub-firmware files are written.
4. The method according to any one of claims 1 to 3, characterized in that The method for obtaining the target firmware file includes: Sending a firmware file calling instruction to the cloud, wherein the firmware file calling instruction carries firmware file identification information, and the firmware file identification information is used by the cloud to determine the target firmware file from multiple candidate firmware files; Receive the target firmware file sent by the cloud.
5. The method according to any one of claims 1 to 3, characterized in that: The step of lighting up the target camera comprises: The driver layer interface of the target camera is called to light up the target camera.
6. The method according to any one of claims 1 to 3, characterized in that The method further comprises: If there are multiple target cameras, obtain target firmware files corresponding to each of the multiple target cameras; For any of the target cameras, after the firmware update of the target camera is completed, the firmware update is performed on the next target camera based on the target firmware file corresponding to the next target camera, until the firmware update of all the target cameras is completed.
7. A firmware update device for a vehicle-mounted camera, characterized in that: include: An acquisition module, used to acquire a camera on a target vehicle to be subjected to firmware update as a target camera, and light up the target camera; An unlocking module, used to determine the I2C address of the target camera and send an unlocking instruction to the I2C address; A writing module, used for writing the target firmware file into the target camera after the target camera is unlocked; The locking module is used to send a locking instruction to the I2C address of the target camera after the target firmware file is written.
8. The device according to claim 7, characterized in that The writing module is further used for: Initialize a storage offset corresponding to the target camera, wherein the storage offset refers to an address offset specified in the memory, which is used to determine the location of data in the memory; Dividing the target firmware file into a plurality of sub-firmware files, and determining a single offset value according to the sub-firmware files; Based on the I2C interface corresponding to the target camera, starting from the storage offset, the multiple sub-firmware files are written into the target camera in sequence, wherein after any of the sub-firmware files is written into the target camera, the storage offset is updated based on the single offset value.
9. The device according to claim 8, characterized in that The writing module is further used for: For any of the sub-firmware files, after the sub-firmware file is written, performing time monitoring on the target camera; After monitoring that the target camera has waited for a preset time, writing the next piece of the sub-firmware file to the target camera until all sub-firmware files are written.
10. The device according to any one of claims 7 to 9, characterized in that: The device further comprises: A sending module, used for sending a firmware file calling instruction to the cloud, wherein the firmware file calling instruction carries firmware file identification information, and the firmware file identification information is used by the cloud to determine the target firmware file from a plurality of candidate firmware files; A receiving module is used to receive the target firmware file sent by the cloud.
11. The device according to any one of claims 7 to 9, characterized in that: The acquisition module is further used for: The driver layer interface of the target camera is called to light up the target camera.
12. The device according to any one of claims 7 to 9, characterized in that The device further comprises: The control module is used to obtain target firmware files corresponding to each of the target cameras if there are multiple target cameras, and for any target camera, after the firmware update of the target camera is completed, perform firmware update on the next target camera based on the target firmware file corresponding to the next target camera, until the firmware update of all target cameras is completed.
13. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.
14. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-6.