CN117376339A - OTA-based vehicle ECU upgrading method, device, equipment and medium - Google Patents

OTA-based vehicle ECU upgrading method, device, equipment and medium Download PDF

Info

Publication number
CN117376339A
CN117376339A CN202311270070.4A CN202311270070A CN117376339A CN 117376339 A CN117376339 A CN 117376339A CN 202311270070 A CN202311270070 A CN 202311270070A CN 117376339 A CN117376339 A CN 117376339A
Authority
CN
China
Prior art keywords
upgrade
vehicle
control unit
ota
ecu
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311270070.4A
Other languages
Chinese (zh)
Inventor
韩波
龙政方
汪星星
邓凌天
陈建伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing Seres New Energy Automobile Design Institute Co Ltd
Original Assignee
Chongqing Seres New Energy Automobile Design Institute Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chongqing Seres New Energy Automobile Design Institute Co Ltd filed Critical Chongqing Seres New Energy Automobile Design Institute Co Ltd
Priority to CN202311270070.4A priority Critical patent/CN117376339A/en
Publication of CN117376339A publication Critical patent/CN117376339A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40208Bus networks characterized by the use of a particular bus standard
    • H04L2012/40215Controller Area Network CAN
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40267Bus for use in transportation systems
    • H04L2012/40273Bus for use in transportation systems the transportation system being a vehicle

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Small-Scale Networks (AREA)

Abstract

The application relates to the technical field of communication and provides a vehicle ECU upgrading method, device, equipment and medium based on OTA. According to the method, when the port capacity of the vehicle OTA upgrade master control unit is smaller than the port capacity of the vehicle ECU and the size of the upgrade file is larger than the port capacity of the vehicle OTA upgrade master control unit, the upgrade file is divided into N upgrade packages, the N upgrade packages are transmitted to the vehicle ECU through different ports of the vehicle OTA upgrade master control unit, so that the vehicle ECU can assemble the N upgrade packages to obtain the upgrade file after receiving the N upgrade packages, and the vehicle ECU is upgraded based on the upgrade file, so that the transmission efficiency of the upgrade file can be greatly improved, the vehicle OTA upgrade efficiency is improved, and the user experience is further improved.

Description

OTA-based vehicle ECU upgrading method, device, equipment and medium
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a method, an apparatus, a device, and a medium for upgrading a vehicle ECU based on OTA.
Background
An Over-the-Air Technology (OTA) upgrade refers to Over-the-Air Technology firmware upgrade and software upgrade. OTA not only brings more convenient vehicle upgrading way, also lets the consumer feel more intelligent convenient and fast's use car experience. The system of the system is updated by downloading a new software update package from a remote server through a network, so that the defects of the system can be quickly repaired, the product and use experience can be quickly iterated and improved, and the time and money of both suppliers and consumers are saved.
OTA upgrades to the target vehicle electronic control unit (Electronic Control Unit, ECU) components are currently typically implemented based on an on-board ethernet (Diagnostic communication over Internet Protocol, doIP). Specifically, a client of the vehicle OTA upgrade master control unit establishes a transmission control protocol (Transmission Control Protocol, TCP) connection with the target ECU. If the Ethernet port capacity of the vehicle OTA upgrade master control unit is 100M, the port capacity of the current target ECU can reach 1000M, and if one-to-one TCP connection transmission files are adopted for upgrade and writing, the upgrade and writing speed is relatively slow for larger upgrade files, the upgrade and writing time is long, the upgrade efficiency is low, and the user experience is poor.
Disclosure of Invention
In view of this, the embodiments of the present application provide a method, apparatus, device and medium for upgrading a vehicle ECU based on OTA, so as to solve the problems in the prior art that the efficiency of the vehicle is low and the user experience is poor when the vehicle is subjected to OTA upgrade.
In a first aspect of the embodiments of the present application, there is provided a method for upgrading an ECU of a vehicle electronic control unit based on an over-the-air OTA, where the method is performed by a main control unit for upgrading the OTA of the vehicle, and includes:
Receiving an upgrade file of a vehicle ECU, and determining the size of the upgrade file;
determining port capacity of a vehicle OTA upgrading master control unit and port capacity of a vehicle ECU;
responding to the fact that the port capacity of the vehicle OTA upgrade master control unit is smaller than that of the vehicle ECU, and the size of an upgrade file is larger than that of the port capacity of the vehicle OTA upgrade master control unit, dividing the upgrade file into N upgrade packages, wherein N is a positive integer larger than 1;
n upgrade packages are respectively transmitted to the vehicle ECU by using N different ports in the vehicle OTA upgrade master control unit, so that the vehicle ECU can assemble the N upgrade packages to obtain an upgrade file after receiving the N upgrade packages, and the vehicle ECU is upgraded based on the upgrade file.
In a second aspect of the embodiments of the present application, there is provided a method for upgrading a vehicle electronic control unit ECU based on an over-the-air OTA, the method being performed by the vehicle ECU and comprising:
responding to a connection establishment request sent by a vehicle OTA upgrade main control unit, and respectively establishing connection between a port of a vehicle ECU and N different ports of the vehicle OTA upgrade main control unit;
receiving upgrade packets sent by N different ports respectively, wherein each upgrade packet is provided with different transmission messages, and the transmission messages at least comprise sub-packet serial numbers;
Assembling the received upgrade package into an upgrade file;
and responding to the correctness of the verification result of the verification of the upgrade file, and finishing the upgrade of the vehicle ECU based on the upgrade file.
In a third aspect of the embodiments of the present application, there is provided a vehicle electronic control unit ECU upgrading device based on an over-the-air OTA, including:
the receiving module is configured to receive an upgrade file of the vehicle ECU and determine the size of the upgrade file;
a determining module configured to determine port capabilities of the vehicle OTA upgrade master control unit, and port capabilities of the vehicle ECU;
the segmentation module is configured to segment the upgrade file into N upgrade packages in response to the port capacity of the vehicle OTA upgrade master control unit being smaller than the port capacity of the vehicle ECU and the upgrade file size being larger than the port capacity of the vehicle OTA upgrade master control unit, wherein N is a positive integer larger than 1;
the transmission module is configured to respectively transmit N upgrade packages to the vehicle ECU by using N different ports in the vehicle OTA upgrade master control unit, so that the vehicle ECU can assemble the N upgrade packages to obtain an upgrade file after receiving the N upgrade packages, and the vehicle ECU is upgraded based on the upgrade file.
In a fourth aspect of the embodiments of the present application, there is provided a vehicle electronic control unit ECU upgrading device based on an over-the-air OTA, including:
The communication module is configured to respectively establish connection between the port of the vehicle ECU and N different ports of the vehicle OTA upgrading main control unit in response to receiving a connection establishment request sent by the vehicle OTA upgrading main control unit;
the receiving module is configured to receive upgrade packets sent by N different ports respectively, wherein each upgrade packet is provided with different transmission messages respectively, and the transmission messages at least comprise sub-packet serial numbers;
the assembly module is configured to assemble the received upgrade package into an upgrade file;
and the upgrading module is configured to finish the upgrading of the vehicle ECU based on the upgrading file in response to the correctness of the verification result of the verification of the upgrading file.
In a fifth aspect of the embodiments of the present application, there is provided an electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the above method when executing the computer program.
In a sixth aspect of the embodiments of the present application, there is provided a computer readable storage medium storing a computer program which, when executed by a processor, implements the steps of the above method.
Compared with the prior art, the embodiment of the application has the beneficial effects that: according to the method and the device, when the port capacity of the vehicle OTA upgrading main control unit is smaller than that of the vehicle ECU and the size of the upgrading file is larger than that of the port capacity of the vehicle OTA upgrading main control unit, the upgrading file is divided into N upgrading packages, the N upgrading packages are transmitted to the vehicle ECU through different ports of the vehicle OTA upgrading main control unit, so that the vehicle ECU can assemble the N upgrading packages to obtain the upgrading file after receiving the N upgrading packages, and the vehicle ECU is upgraded based on the upgrading file, so that the transmission efficiency of the upgrading file can be greatly improved, the vehicle OTA upgrading efficiency is improved, and the user experience is further improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following description will briefly introduce the drawings that are needed in the embodiments or the description of the prior art, it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic view of an application scenario according to an embodiment of the present application.
Fig. 2 is a schematic diagram of a structure in which a vehicle gateway VGW is connected to each ECU thereunder in the related art.
Fig. 3 is a flowchart of a method for upgrading an ECU of a vehicle electronic control unit based on an over-the-air OTA according to an embodiment of the present application.
Fig. 4 is a schematic structural diagram of an ethernet packet in an embodiment of the present application.
Fig. 5 is another schematic structural diagram of an ethernet packet in an embodiment of the present application.
Fig. 6 is a flowchart of a method for upgrading an ECU of a vehicle electronic control unit based on an over-the-air OTA according to an embodiment of the present application.
Fig. 7 is a schematic diagram of transmitting N upgrade packages to a vehicle ECU according to an embodiment of the present application.
Fig. 8 is a flowchart of a method for transmitting N upgrade packets to a vehicle ECU, respectively, using N different ports in a vehicle OTA upgrade master control unit according to an embodiment of the present application.
Fig. 9 is a system configuration diagram for performing the method for upgrading the vehicle electronic control unit ECU based on the over-the-air OTA provided in the embodiment of the present application.
Fig. 10 is a flowchart of a method for upgrading an ECU of a vehicle electronic control unit based on an over-the-air OTA according to an embodiment of the present application.
Fig. 11 is a flowchart of a communication method for maintaining an over-the-air OTA mode according to an embodiment of the present application.
Fig. 12 is a schematic diagram of an ECU upgrade apparatus for a vehicle electronic control unit based on an over-the-air OTA according to an embodiment of the present application.
Fig. 13 is a schematic diagram of an ECU upgrade apparatus for a vehicle electronic control unit based on an over-the-air OTA according to an embodiment of the present application.
Fig. 14 is a schematic diagram of an electronic device provided in an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system configurations, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
A communication method and apparatus for maintaining an over-the-air OTA mode according to embodiments of the present application will be described in detail with reference to the accompanying drawings.
Fig. 1 is a schematic view of an application scenario according to an embodiment of the present application. The application scenario may include a vehicle 1, a vehicle OTA upgrade master control unit 2, a server 3, and a network 4.
The vehicle 1 may be hardware or software. When the vehicle 1 is hardware, it may be various in-vehicle electronic devices supporting communication with the roadside apparatus 2 and the server 3, including, but not limited to, in-vehicle communication apparatuses (TBOX), on-board units (OBU), in-vehicle entertainment systems, and the like; when the vehicle 1 is software, it may be installed in the electronic apparatus as described above. The vehicle 1 may be implemented as a plurality of software or software modules, or as a single software or software module, to which the embodiments of the present application are not limited. Further, various applications, such as a data processing application, an instant messaging tool, social platform software, a search class application, a shopping class application, and the like, may be installed on the vehicle 1.
The vehicle OTA upgrade master control unit 2 may be hardware or software. When the vehicle OTA upgrades the main control unit 2 as hardware, it can be various electronic devices that support communication with the vehicle 1 and the server 3. When the vehicle OTA upgrades the main control unit 2 as software, it can be installed in the electronic device as described above.
The server 3 may be a server that provides various services, for example, a background server that receives a request transmitted from a terminal device with which communication connection is established, and the background server may perform processing such as reception and analysis of the request transmitted from the terminal device and generate a processing result. The server 3 may be a server, a server cluster formed by a plurality of servers, or a cloud computing service center, which is not limited in this embodiment of the present application.
The server 3 may be hardware or software. When the server 3 is hardware, it may be various electronic devices that provide various services for the vehicle 1 and the vehicle OTA upgrade master control unit 2. When the server 3 is software, it may be a plurality of software or software modules that provide various services for the vehicle 1 and the vehicle OTA upgrade master control unit 2, or may be a single software or software module that provides various services for the vehicle 1 and the vehicle OTA upgrade master control unit 2, which is not limited in this embodiment of the present application.
The network 4 may be a wired network using coaxial cable, twisted pair and optical fiber connection, or may be a wireless network capable of realizing interconnection of various communication devices without wiring, for example, bluetooth (Bluetooth), near field communication (Near Field Communication, NFC), infrared (Infrared), etc., which is not limited in the embodiment of the present application.
The vehicle 1 can establish connection with the vehicle OTA upgrade master control unit 2 through the vehicle-mounted ethernet to receive the first message sent by the vehicle OTA upgrade master control unit 2. The vehicle 1 may also establish a connection with the server 3 via the network 4. The vehicle OTA upgrade master control unit 2 may establish a connection with the server 3 via the network 4, for example, OTA data of the vehicle may be downloaded in advance from the server 3.
It should be noted that, specific types, numbers and combinations of the vehicle 1, the vehicle OTA upgrade master control unit 2, the server 3 and the network 4 may be adjusted according to actual requirements of application scenarios, which are not limited in the embodiment of the present application.
As mentioned above, OTA upgrades to the target vehicle ECU component are currently typically done on a DoIP basis. Specifically, a client of the vehicle OTA upgrade master control unit establishes a TC) connection with the target ECU. If the Ethernet port capacity of the vehicle OTA upgrade master control unit is 100M, the port capacity of the current target ECU can reach 1000M, and if one-to-one TCP connection transmission files are adopted for upgrade and writing, the upgrade and writing speed is relatively slow for larger upgrade files, the upgrade and writing time is long, the upgrade efficiency is low, and the user experience is poor.
Fig. 2 is a schematic diagram of a structure in which a vehicle gateway VGW is connected to each ECU thereunder in the related art. As shown in fig. 2, the remote processing module VBOX of the Vehicle may be used as an upgrade master control unit UMC of the OTA upgrade, the Vehicle Gateway (VGW) may be used as an upgrade proxy unit UA of the OTA upgrade, and each ECU may be used as an upgrade slave control unit US of the OTA upgrade. The VBOX and VGW may be connected through 100M ethernet ETH. VGW may be connected to each ECU thereunder by 1000M ETH. Each VGW may be connected to a plurality of ECUs, for example, ECU1-1 to ECU1-n, ECU2-1 to ECU2-n, and ECU-1 to ECU-n. Wherein, the ECUs 2-1 to 2-n are connected with VGW through CAN buses, and the ECUs 1-1 to 1-n and ECUm-1 to ECUm-n are connected with VGW through ETH and CAN buses.
In the configuration shown in fig. 2, the port capacity of VBOX is 100M, since VBOX and VGW are connected through 100M ethernet ETH. Meanwhile, VGW is connected to each ECU thereunder by 1000M ETH, and therefore, the port capacity of each ECU is 1000M. In the prior art, when transmitting an OTA upgrade file, one port in VBOX is used as a client, an ECU port is used as a server to establish connection, and the file is transmitted based on the established network path. At this time, the file transfer rate is limited by the capabilities of the VBOX port, resulting in a slower transfer rate.
In view of this, the embodiment of the application provides a vehicle electronic control unit ECU upgrading method based on over-the-air OTA, when determining that the port capability of the vehicle OTA upgrading main control unit is smaller than the port capability of the vehicle ECU and the upgrading file size is larger than the port capability of the vehicle OTA upgrading main control unit, the upgrading file is divided into N upgrading packets, and the N upgrading packets are transmitted to the vehicle ECU through different ports of the vehicle OTA upgrading main control unit, so that the vehicle ECU assembles the N upgrading packets to obtain the upgrading file after receiving the N upgrading packets, and completes the vehicle ECU upgrading based on the upgrading file, so that the transmission efficiency of the upgrading file can be greatly improved, the vehicle OTA upgrading efficiency is improved, and further the user experience is improved.
Fig. 3 is a flowchart of a method for upgrading an ECU of a vehicle electronic control unit based on an over-the-air OTA according to an embodiment of the present application, where the method is performed by a main control unit for upgrading the OTA of the vehicle. As shown in fig. 3, the method comprises the steps of:
in step S301, an upgrade file of the vehicle ECU is received, and an upgrade file size is determined.
In step S302, the port capability of the vehicle OTA upgrade master control unit, and the port capability of the vehicle ECU are determined.
In step S303, in response to the port capability of the vehicle OTA upgrade master control unit being smaller than the port capability of the vehicle ECU and the upgrade file size being larger than the port capability of the vehicle OTA upgrade master control unit, the upgrade file is divided into N upgrade packages.
Wherein N is a positive integer greater than 1.
In step S304, N upgrade packages are transmitted to the vehicle ECU respectively using N different ports in the vehicle OTA upgrade master control unit, so that the vehicle ECU assembles the N upgrade packages to obtain an upgrade file after receiving the N upgrade packages, and completes the vehicle ECU upgrade based on the upgrade file.
In the embodiment of the present application, the vehicle operation method may be performed by the vehicle OTA upgrade master control unit 2 shown in fig. 1.
In this embodiment of the present application, the vehicle OTA upgrade master control unit may download OTA upgrade data of each ECU of the vehicle from the server, package the OTA upgrade data in a message form, and send the OTA upgrade data to VGW of each vehicle through the vehicle-mounted ethernet.
In this embodiment of the present application, after the vehicle OTA upgrade master control unit downloads the upgrade file of the vehicle ECU, the size of the upgrade file may be determined.
On the other hand, the vehicle OTA upgrade master control unit may also determine the port capability of the vehicle OTA upgrade master control unit, as well as the port capability of the vehicle ECU.
The relationship between the port capability of the vehicle OTA upgrade master control unit, the port capability of the vehicle ECU, and the upgrade file size may then be determined. When it is determined that the port capability of the vehicle OTA upgrade master control unit is smaller than the port capability of the vehicle ECU and the upgrade file size is larger than the port capability of the vehicle OTA upgrade master control unit, the upgrade file may be divided into N upgrade packages.
In an example, assuming that the port capability of the vehicle OTA upgrade master control unit is C1, the port capability of the vehicle ECU is C2, and the upgrade file size is C3, if C1< C2, and C3> C1, the upgrade file may be split, and multiple upgrade packages obtained by splitting may be transmitted simultaneously through different ports of the vehicle OTA upgrade master control unit. Further, when the upgrade file is divided, if the vehicle OTA upgrade master control unit includes D ports, the upgrade file may be divided into n=d upgrade packages directly, or the upgrade file may be divided into N upgrade packages averagely, where N is smaller than D.
Specifically, when C1< C3< C2, the transmission of the upgrade file can be implemented without occupying all D ports of the vehicle OTA upgrade master control unit, so that the upgrade file can be divided into N upgrade packages smaller than D on average. Or when C3 is greater than C2, but the difference between C3 and C2 is less than the preset threshold, and the vehicle OTA upgrade master control unit includes a plurality of upgrade files to be transmitted, for example, a first upgrade file transmitted to the vehicle ECU1, a second upgrade file transmitted to the vehicle ECU2, and the like, the upgrade files may be equally divided into N upgrade packages less than D. On the other hand, when C3 is greater than C2 and the difference between C3 and C2 is greater than the preset threshold, and the vehicle OTA upgrade master control unit does not have other upgrade files to be transmitted, or the vehicle OTA upgrade master control unit has other upgrade files to be transmitted, but the priorities of the other upgrade files are lower, the upgrade files can be divided into N upgrade packages equal to D on average.
In this embodiment of the present application, after the division of the upgrade file is completed, N different ports in the vehicle OTA upgrade master control unit may be used to transmit the N upgrade packages to the vehicle ECU, so that the vehicle ECU assembles the N upgrade packages to obtain the upgrade file after receiving the N upgrade packages, and completes the vehicle ECU upgrade based on the upgrade file.
According to the technical scheme provided by the embodiment of the application, when the port capacity of the vehicle OTA upgrading main control unit is smaller than the port capacity of the vehicle ECU and the size of the upgrading file is larger than the port capacity of the vehicle OTA upgrading main control unit, the upgrading file is divided into N upgrading packets, the N upgrading packets are respectively transmitted to the vehicle ECU through different ports of the vehicle OTA upgrading main control unit, so that the vehicle ECU can assemble the N upgrading packets to obtain the upgrading file after receiving the N upgrading packets, and the vehicle ECU is upgraded based on the upgrading file, so that the transmission efficiency of the upgrading file can be greatly improved, the vehicle OTA upgrading efficiency is improved, and the user experience is further improved.
In this embodiment of the present application, N upgrade packages have different transmission messages, where the transmission messages at least include source upgrade package codes, total upgrade package capacity, sub-package sequence numbers, sub-package offset addresses, sub-package sizes, client source addresses, and vehicle ECU destination addresses.
Fig. 4 is a schematic structural diagram of an ethernet packet in an embodiment of the present application. As shown in fig. 4, the ethernet packet provided in the embodiment of the present application includes a packet header and data, where the packet header portion may include a version field, a header length field, a priority and service type field, a total length field, an identifier field, a flag field, a segment offset field, a Time To Live (TTL) field, a protocol number field, a header checksum field, a source address field, a destination address field, and an optional field. Further, the version field may identify, for example, version IPV4, the protocol number field may indicate that the protocol number is ox11-UDP, the source address may be an IP address of VBOX, the destination address may be a broadcast address, for example 255.255.255.255, and all ethernet-capable ECUs and VGWs within the broadcast range may receive the ethernet packet from the broadcast address.
That is, the DOIP message based on Ethernet communication shown in FIG. 4 can be used to realize downloading of the OTA upgrade package and upgrade and refresh of the target ECU, and the upgrade and refresh target ECU uses TCP connection to establish a distributed C-S mode for communication and data transmission.
Fig. 5 is another schematic structural diagram of an ethernet packet in an embodiment of the present application. As shown in fig. 5, the data of the ethernet packet includes ethernet frames, where the ethernet frames include ethernet header EthHead, IP header IPHead, TCP/UDP header, protocol version, OTA type, total data length, and DOIP data field. Wherein, the TCP/UDP Head is determined based on the selected protocol number, when the TCP protocol is selected, the TCP/UDP Head is TCPHead, and when the UDP protocol is selected, the TCP/UDP Head is UDPHead. The protocol version may be, for example, 0x02,0xfd, etc. The OTA type may be, for example, 0x8001. The data length may be, for example, 4 bits. The DOIP data field includes DOIP data.
The DOIP data may include TCP data, which may be data of 0 th to 1452 th Bytes (Bytes), and UDP data, which may be data of 0 th to 1464 th Bytes, and the DOIP data length is 1452Bytes. Further, the DOIP data may include source upgrade package encoding of 2Bytes, total upgrade package capacity of 4Bytes, packetization sequence number of 2Bytes, packetization offset address of 4Bytes, packetization size of 2Bytes, client source address of 2Bytes, vehicle ECU destination address of 2Bytes, and upgrade flush data of 1434 Bytes. And the N upgrade packages are subjected to data transmission based on the source address of the client, the destination address of the vehicle ECU, the sub-package offset address and the sub-package size in the transmission message, the vehicle ECU assembles the N upgrade packages based on the sub-package serial numbers after receiving the N upgrade packages, and performs size verification after assembling, and if the verification result is correct, the assembled upgrade file is used for performing upgrade operation on the vehicle ECU.
That is, fig. 5 illustrates a custom data communication message format according to an embodiment of the present application. The message consists of an upgrade package for identifying the source file, the total capacity of the upgrade file, the sub-package sequence number of the file, an offset address in the whole file, the sub-package size, the source address of the OTA master control VBOX, the destination address of the target ECU and upgrade data. And assembling the received upgrade data packet pieces according to the number of the fragments at the target ECU end until the assembly is completed according to the number of the fragments, checking whether the received data is equal to the capacity of the upgrade packet in the message after the assembly is completed, if not, the received data is incomplete, stopping the upgrade operation, and if so, brushing the received upgrade data by the ECU.
Fig. 6 is a flowchart of a method for upgrading an ECU of a vehicle electronic control unit based on an over-the-air OTA according to an embodiment of the present application. Step S601 to step S604 in the embodiment shown in fig. 6 are substantially the same as step S301 to step S304 in the embodiment shown in fig. 3, and are not repeated here. As shown in fig. 6, the method further comprises the steps of:
in step S605, a specific upgrade package is determined in response to completion of transmission of the kth upgrade package of the N upgrade packages.
The specific upgrade package is the upgrade package with the most data to be transmitted among the upgrade packages which are not transmitted. k is a positive integer greater than or equal to 1.
In step S606, the remaining data to be transmitted in the specific upgrade package is divided into k+1 sub-upgrade packages.
In step S607, a first sub-upgrade package of the k+1 sub-upgrade packages is transmitted from the specific upgrade package to the vehicle ECU, and the remaining sub-upgrade packages of the k+1 sub-upgrade packages are transmitted from the kth upgrade package to the vehicle ECU.
In this embodiment of the present application, the communication links between different ports of the vehicle OTA upgrade master control unit and the vehicle ECU port may have different communication qualities, so the transmission speeds of the upgrade packets may be different. After the transmission of the kth upgrade package in the N upgrade packages is completed, the port of the vehicle OTA upgrade master control unit which has completed the transmission of the upgrade package can be further used for transmitting other upgrade packages which have not completed the transmission.
In this embodiment of the present application, after the transmission of the kth upgrade package in the N upgrade packages is completed, a specific upgrade package may be determined, where the specific upgrade package is an upgrade package with the largest amount of remaining data to be transmitted among the upgrade packages that are not transmitted. Further, the remaining data to be transmitted in the specific upgrade package may be divided into k+1 sub-upgrade packages. And finally, transmitting a first sub-upgrade package in the k+1 sub-upgrade packages to the vehicle ECU by a specific upgrade package, and transmitting the rest sub-upgrade packages in the k+1 sub-upgrade packages to the vehicle ECU by a kth upgrade package.
That is, in the embodiment of the present application, when the OTA upgrade master control unit upgrades the target vehicle ECU, a plurality of clients, for example, four clients, may be created to make TCP connection with the server side of the target vehicle ECU. Further, after the upgrade package is segmented, the upgrade package is transmitted through the plurality of clients at the same time. During blocking, the upgrade file package can be divided equally according to the number of clients, and if the file is 1GB, 1000 MB/4=250 MB is allocated to each client for transmission upgrade. The OTA upgrade master control unit monitors the transmission state of each client in real time, if the load is busy or the transmission rate is slow due to blockage, in addition, the channel sending rate is fast, and the channel blocking upgrade packet is also transmitted, the channel upgrade packet block data with low efficiency is divided into equal segments for data transmission. And the target vehicle ECU receives the data packet, judges whether the data packet is an upgrade file according to the source upgrade packet code, and assembles the upgrade packet according to the message if the data packet is the same upgrade file until the assembly is completed.
In an example, if the 4 ports of the vehicle OTA upgrade master control unit are currently used to connect with the ports of the vehicle ECU, 4 upgrade packets are transmitted respectively. If the upgrade packet of the 1 st port finishes transmission first, at this time, the port with the most remaining data to be transmitted, that is, the port with the slowest transmission speed, can be determined from the remaining 2 nd to 4 th ports, and if the port is the 4 th port, the remaining data to be transmitted of the upgrade packet transmitted by the 4 th port can be divided into 2 parts again, and the divided first half part of data is transmitted continuously through the 4 th port, and the second half part of data is transmitted through the 1 st port. The division may be performed on average, or may not be performed on average based on the communication quality of each link, and is not limited here.
Further, the number of ports on which the transmission of the upgrade package is completed may be plural. In the above example, the 1 st port and the 2 nd port may finish transmission first, at this time, if the port with the most remaining data to be transmitted, i.e. the slowest transmission speed, is still the 4 th port, at this time, the remaining data to be transmitted of the upgrade packet transmitted by the 4 th port may be divided into 3 parts again, and the divided first part of data continues to be transmitted through the 4 th port, and the second to third parts of data continue to be transmitted through the 1 st and 2 nd ports. The division may be performed on average, or may not be performed on average based on the communication quality of each link, and is not limited here.
In this embodiment, the transmission of the first sub-upgrade package of the k+1 sub-upgrade packages from the specific upgrade package to the vehicle ECU may be that the packet size in the transmission packet of the specific upgrade package is modified to a first data size, where the first data is a sum of the transmitted data size of the specific upgrade package and the packet size of the first sub-upgrade package.
In this embodiment of the present application, the transmission of the remaining sub-upgrade packages in the k+1 sub-upgrade packages from the k-th upgrade package to the vehicle ECU may be that the offset address of the k-th upgrade package is modified to the start address of the remaining sub-upgrade package, and the packetization size of the k-th upgrade package is modified to the packetization size of the remaining sub-upgrade package.
In this embodiment of the present application, the vehicle ECU may be the vehicle gateway VGW, or may be another vehicle ECU. When the vehicle ECU is VGW, the step of transmitting the N upgrade packages to the vehicle ECU is that the vehicle OTA upgrade master control unit transmits the N upgrade packages to the VGW through the Ethernet.
On the other hand, when the vehicle ECU is another vehicle ECU, the transmission of N upgrade packages to the vehicle ECU may be implemented as follows: the vehicle OTA upgrade master control unit transmits Ethernet messages of the N upgrade packages to the vehicle ECU through VGW; or the vehicle OTA upgrade master control unit transmits the Ethernet messages of the N upgrade packages to the VGW; VGW converts Ethernet message into controller area network CAN bus message, and transmits CAN bus message to vehicle ECU.
Fig. 7 is a schematic diagram of transmitting N upgrade packages to a vehicle ECU according to an embodiment of the present application. As shown in fig. 7, when the vehicle ECU is VGW, the vehicle OTA upgrade master control unit may directly transmit N upgrade packets to VGW through ethernet. When the vehicle ECU is other vehicle ECUs, the vehicle OTA upgrade master control unit transmits the Ethernet messages of the N upgrade packages to the vehicle ECU through the VGW, or the vehicle OTA upgrade master control unit transmits the Ethernet messages of the N upgrade packages to the VGW; VGW converts Ethernet message into controller area network CAN bus message, and transmits CAN bus message to vehicle ECU.
In an example, VBOX may include a plurality of 100M ethernet ports, e.g., including 4 100M ethernet ports, which may be configured as CLIENT CLIENTs, each of which transmits files or data over a SOCKET CLIENT. The VGW and the target vehicle ECU are respectively provided with a 1000M port, the ports can be used as service ends, and each service end can also be a SOCKET service end. When each target ECU is upgraded, if the vehicle OTA upgrade master control unit upgrades the ECU not in VGW, two-layer transparent transmission is carried out through a link layer channel of VGW to establish communication connection with the target ECU, and upgrade and brushing are carried out. If the vehicle OTA upgrade master control unit upgrades the VGW, establishing communication connection with the VGW, and performing upgrade and writing.
As described above, the VBOX port capability is 100M, the target vehicle ECU port capability is 1000M, and if only one CLIENT (CLIENT) is created to connect with the target vehicle ECU SERVER (SERVER), since the VBOX port capability is 100M, that is, the current transmission rate is only 100M, the rate is far less than 1000M of the target vehicle ECU port capability, and the 1000M port capability utilization is very small.
In view of this, four or more ports of VBOX may be utilized to compose a larger bandwidth transmission capability, but it is noted that the sum of bandwidths of the ports does not exceed 1000M. For example, the VBOX has 4 ports, and has a total bandwidth capability of 400M, and the transmission rate is 4 times as large as that of 100M, so that the transmission upgrading rate is greatly increased. If the upgrade file is 5GBytes, if the upgrade file is transmitted with 100Mb, the time required for the upgrade file is: 5×1000mb=5×1000×8=40×1000mb/100 mb=400 seconds, about 6.6 minutes. If 400Mb is used for transmission, the time required is: 5×1000mb=5×1000×8=40×1000mb/400 mb=100 seconds, about 1.6 minutes, and the upgrade efficiency is greatly improved. That is, in the embodiment of the present application, by creating a client for each port of VBOX to connect with a server of the ECU of the target vehicle, and communicating data transmission with a server connection by using a plurality of clients, the data transmission rate is improved, and the purpose of rapid upgrade is achieved.
Fig. 8 is a flowchart of a method for transmitting N upgrade packets to a vehicle ECU, respectively, using N different ports in a vehicle OTA upgrade master control unit according to an embodiment of the present application. As shown in fig. 8, the method includes the steps of:
in step S801, a client is created for each of N different ports in the vehicle OTA upgrade master control unit.
In step S802, each created client is connected to a port of the vehicle ECU, which is a server.
In step S803, N upgrade packages are transmitted to the server using each client.
In this embodiment of the present application, a client may be first created for each of N different ports in the vehicle OTA upgrade master control unit, then each created client is connected to a port of the vehicle ECU, the port of the vehicle ECU is a server, and finally each client is used to transmit N upgrade packets to the server.
Fig. 9 is a system configuration diagram for performing the method for upgrading the vehicle electronic control unit ECU based on the over-the-air OTA provided in the embodiment of the present application. As shown in fig. 9, the system may include an upgrade master control unit UMC, an upgrade agent unit UA, and an upgrade slave unit US. The UMC comprises a vehicle OTA upgrade main control unit service, a DOIP client, an APN black and white list, access authentication, a network security protocol, a DOIP protocol stack, a TCP/IP protocol stack, an Ethernet link layer and a hardware layer. The UA comprises DOIP service for terminating or forwarding message, and access authentication, black-and-white list, network security protocol, DOIP protocol stack, UDS protocol stack, TCP/IP layer, doCAN, ethernet link layer and hardware layer. The US comprises a DOIP server application layer, a network security protocol, an access authentication layer, a DOIP protocol stack, a TCP/IP layer, an Ethernet link layer and a hardware layer.
The DOIP client in UMC CAN establish connection with the DOIP server application layer in US, then directly transmit the upgrade packet carried by the DOIP message to US through the Ethernet link layer, or send the upgrade packet carried by the DOIP message to DOIP service of UA, and the DOIP service converts the DOIP message into CAN message and then forwards the CAN message to the server application layer in US.
That is, UMC/UA/US in the embodiment of the present application is a hierarchical structure design, and is used for decoupling software and hardware, so as to facilitate function expansion and platform migration. The bottom layer is a hardware layer, and the external interface provides a PHY port of the Ethernet for an Ethernet connection channel; the middle layer is a protocol layer and consists of an Ethernet link layer, a TCP/IP protocol stack, a DOIP protocol stack, a UDS and other protocol stacks; the upper layer is an application layer and consists of DOIP service and OTA application. The vehicle OTA upgrade master control Unit (UMC) is carried on the VBOX to provide the vehicle OTA upgrade master control unit service, and establishes communication with a target vehicle ECU server (UA/US) through the DOIP client to perform upgrade service. In order to improve transmission efficiency and CPU load of VGW, for upgrading of an ECU (electronic control unit) part of a non-VGW, communication connection is established between two layers of transparent transmission and an ECU of a target vehicle through a link layer channel of VGW, and efficient communication and upgrading of communication are guaranteed.
Fig. 10 is a flowchart of a method for upgrading an ECU of a vehicle electronic control unit based on an over-the-air OTA according to an embodiment of the present application. As shown in fig. 10, the upgrade file may be divided in a vehicle-mounted communication device (TBOX) as a UMC to obtain N upgrade packages. The N upgrade packets are transmitted to the VGW over ethernet through different ports in the TBOX. The different ports may be, for example, CLIENT1, CLIENT2 … … CLIENT n in the figure.
VGW transmits the message of each upgrade package to the destination ECU. In the embodiment shown in fig. 10, each upgrade packet is transmitted to the same ECU, where 0x02 and 0xfd in the packet are protocol versions, 0x8001 is OTA type, 0x0F01 is CLIENT source address, here corresponding to CLIENT1 source address, 0x0F02 is CLIENT source address, here corresponding to CLIENT2 source address, 0x0F0n is CLIENT source address, here corresponding to CLIENT n source address, and 0x0701 is vehicle ECU destination address.
Fig. 11 is a flowchart of a communication method for maintaining an over-the-air OTA mode, which is performed by a vehicle ECU according to an embodiment of the present application. As shown in fig. 11, the method includes the steps of:
in step S1101, in response to receiving a connection establishment request sent by the vehicle OTA upgrade master control unit, a connection is established between a port of the vehicle ECU and N different ports of the vehicle OTA upgrade master control unit, respectively.
In step S1102, upgrade packets sent by N different ports are received, where each upgrade packet has a different transmission packet, and the transmission packet at least includes a packet sequence number.
In step S1103, the received upgrade package is assembled into an upgrade file based on the subcontracting number.
In step S1104, in response to the verification result of the verification of the upgrade file being correct, the vehicle ECU upgrade is completed based on the upgrade file.
In this embodiment of the present application, when receiving a connection establishment request sent by the vehicle OTA upgrade master control unit, the vehicle ECU may respectively establish connection between a port of the vehicle ECU and N different ports of the vehicle OTA upgrade master control unit. Further, the vehicle ECU may further receive upgrade packets sent by N different ports, where each upgrade packet has a different transmission packet, and the transmission packet includes at least a packet sequence number. Next, the received upgrade package is assembled into an upgrade file based on the subcontracting number. And finally, when the verification result obtained by verifying the upgrade file is correct, finishing the upgrade of the vehicle ECU based on the upgrade file.
Any combination of the above optional solutions may be adopted to form an optional embodiment of the present application, which is not described herein in detail.
The following are device embodiments of the present application, which may be used to perform method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.
Fig. 12 is a schematic diagram of an ECU upgrade apparatus for a vehicle electronic control unit based on an over-the-air OTA according to an embodiment of the present application. As shown in fig. 12, the apparatus includes:
a receiving module 1201 configured to receive an upgrade file of the vehicle ECU, and determine an upgrade file size.
A determination module 1202 configured to determine port capabilities of the vehicle OTA upgrade master control unit, and port capabilities of the vehicle ECU.
The splitting module 1203 is configured to split the upgrade file into N upgrade packages in response to the port capability of the vehicle OTA upgrade master control unit being smaller than the port capability of the vehicle ECU and the upgrade file size being larger than the port capability of the vehicle OTA upgrade master control unit, where N is a positive integer greater than 1.
The transmission module 1204 is configured to transmit N upgrade packages to the vehicle ECU respectively by using N different ports in the vehicle OTA upgrade master control unit, so that the vehicle ECU assembles the N upgrade packages to obtain an upgrade file after receiving the N upgrade packages, and completes the vehicle ECU upgrade based on the upgrade file.
According to the technical scheme provided by the embodiment of the application, when the port capacity of the vehicle OTA upgrading main control unit is smaller than the port capacity of the vehicle ECU and the size of the upgrading file is larger than the port capacity of the vehicle OTA upgrading main control unit, the upgrading file is divided into N upgrading packets, the N upgrading packets are respectively transmitted to the vehicle ECU through different ports of the vehicle OTA upgrading main control unit, so that the vehicle ECU can assemble the N upgrading packets to obtain the upgrading file after receiving the N upgrading packets, and the vehicle ECU is upgraded based on the upgrading file, so that the transmission efficiency of the upgrading file can be greatly improved, the vehicle OTA upgrading efficiency is improved, and the user experience is further improved.
In this embodiment of the present application, N upgrade packages have different transmission messages, where the transmission messages at least include source upgrade package codes, total upgrade package capacity, sub-package sequence numbers, sub-package offset addresses, sub-package sizes, client source addresses, and vehicle ECU destination addresses.
In this embodiment of the present application, further includes: in response to completion of transmission of a kth upgrade package in the N upgrade packages, determining a specific upgrade package, wherein the specific upgrade package is the upgrade package with the most data to be transmitted among the upgrade packages which are not transmitted, and k is a positive integer greater than or equal to 1; dividing the rest data to be transmitted in the specific upgrade package into k+1 sub upgrade packages; the method comprises the steps of transmitting a first sub-upgrade package of k+1 sub-upgrade packages to a vehicle ECU from a specific upgrade package, and transmitting the rest sub-upgrade packages of the k+1 sub-upgrade packages to the vehicle ECU from a kth upgrade package.
In the embodiment of the application, the step of transmitting the first sub-upgrade package of the k+1 sub-upgrade packages from the specific upgrade package to the vehicle ECU is as follows: modifying the packet size in the transmission message of the specific upgrade packet into a first data size, wherein the first data is the sum of the transmitted data size of the specific upgrade packet and the packet size of the first sub-upgrade packet; the step of transmitting the rest of the k+1 sub-upgrade packages from the kth upgrade package to the vehicle ECU is as follows: the offset address of the kth upgrade package is modified to the starting address of the rest of the sub upgrade packages, and the sub package size of the kth upgrade package is modified to the sub package size of the rest of the sub upgrade packages.
In the embodiment of the application, the vehicle ECU comprises a vehicle gateway and other vehicle ECUs; in response to the vehicle ECU being the vehicle gateway, transmitting N upgrade packets to the vehicle ECU, wherein the vehicle OTA upgrade master control unit transmits the N upgrade packets to the vehicle gateway through the Ethernet; and transmitting N upgrade packages to the vehicle ECU in response to the vehicle ECU being the other vehicle ECU, including: the vehicle OTA upgrade master control unit transmits Ethernet messages of the N upgrade packages to the vehicle ECU through the vehicle gateway; or the vehicle OTA upgrade master control unit transmits the Ethernet messages of the N upgrade packages to the vehicle gateway; the vehicle gateway converts the Ethernet message into a controller area network CAN bus message and transmits the CAN bus message to the vehicle ECU.
In this embodiment of the present application, N different ports in a vehicle OTA upgrade master control unit are used to respectively transmit N upgrade packets to a vehicle ECU, including: creating a client for each of N different ports in the vehicle OTA upgrade master control unit; each established client is respectively connected with a port of the vehicle ECU, and the port of the vehicle ECU is a server; and respectively transmitting N upgrade packages to the server by using each client.
Fig. 13 is a schematic diagram of an ECU upgrade apparatus for a vehicle electronic control unit based on an over-the-air OTA according to an embodiment of the present application. As shown in fig. 13, the apparatus includes:
the communication module 1301 is configured to, in response to receiving a connection establishment request sent by the vehicle OTA upgrade master control unit, respectively establish connection between a port of the vehicle ECU and N different ports of the vehicle OTA upgrade master control unit.
The receiving module 1302 is configured to receive upgrade packets sent by N different ports, where each upgrade packet has a different transmission packet, and the transmission packet includes at least a packet sequence number.
The assembling module 1303 is configured to assemble the received upgrade package into an upgrade file.
And an upgrade module 1304 configured to complete the upgrade of the vehicle ECU based on the upgrade file in response to the verification result of the verification of the upgrade file being correct.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic of each process, and should not limit the implementation process of the embodiment of the present application in any way.
Fig. 14 is a schematic diagram of an electronic device provided in an embodiment of the present application. As shown in fig. 14, the electronic device 14 of this embodiment includes: a processor 1401, a memory 1402, and a computer program 1403 stored in the memory 1402 and executable on the processor 1401. The processor 1401, when executing the computer program 1403, implements the steps in the various method embodiments described above. Alternatively, the processor 1401, when executing the computer program 1403, performs the functions of the modules/units in the above-described apparatus embodiments.
The electronic device 14 may be a desktop computer, a notebook computer, a palm computer, a cloud server, or the like. The electronic device 14 may include, but is not limited to, a processor 1401 and a memory 1402. It will be appreciated by those skilled in the art that fig. 14 is merely an example of the electronic device 14 and is not limiting of the electronic device 14 and may include more or fewer components than shown, or different components.
The processor 1401 may be a central processing unit (Central Processing Unit, CPU) or other general purpose processor, digital signal processor (Digital Signal Processor, DSP), application specific integrated circuit (Application Specific Integrated Circuit, ASIC), field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like.
Memory 1402 may be an internal storage unit of electronic device 14, such as a hard disk or memory of electronic device 14. The memory 1402 may also be an external storage device of the electronic device 14, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the electronic device 14. Memory 1402 may also include both internal storage units and external storage devices of electronic device 14. Memory 1402 is used to store computer programs and other programs and data required by the electronic device.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application implements all or part of the flow in the methods of the above embodiments, or may be implemented by a computer program to instruct related hardware, and the computer program may be stored in a computer readable storage medium, where the computer program may implement the steps of the respective method embodiments described above when executed by a processor. The computer program may comprise computer program code, which may be in source code form, object code form, executable file or in some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting thereof; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (11)

1. A method for upgrading an ECU of a vehicle electronic control unit based on an over-the-air OTA, the method being performed by a main control unit for upgrading the OTA of the vehicle, the method comprising:
receiving an upgrade file of a vehicle ECU, and determining the size of the upgrade file;
determining port capacity of the vehicle OTA upgrade master control unit and port capacity of the vehicle ECU;
responding to the port capacity of the vehicle OTA upgrade master control unit being smaller than the port capacity of the vehicle ECU, and the upgrade file size being larger than the port capacity of the vehicle OTA upgrade master control unit, dividing the upgrade file into N upgrade packages, wherein N is a positive integer larger than 1;
and respectively transmitting the N upgrade packages to the vehicle ECU by using N different ports in the vehicle OTA upgrade master control unit, so that the vehicle ECU can assemble the N upgrade packages to obtain the upgrade file after receiving the N upgrade packages, and finishing the upgrade of the vehicle ECU based on the upgrade file.
2. The method of claim 1, wherein the N upgrade packages each have a different transmission message, the transmission message including at least a source upgrade package code, a total upgrade package capacity, a packetization sequence number, a packetization offset address, a packetization size, a client source address, and a vehicle ECU destination address.
3. The method according to claim 2, wherein the method further comprises:
determining a specific upgrade package in response to completion of transmission of a kth upgrade package in the N upgrade packages, wherein the specific upgrade package is the upgrade package with the most data to be transmitted in the upgrade packages which are not transmitted, and k is a positive integer greater than or equal to 1;
dividing the rest data to be transmitted in the specific upgrade package into k+1 sub upgrade packages;
transmitting a first sub-upgrade package of the k+1 sub-upgrade packages from the specific upgrade package to the vehicle ECU, and transmitting the rest of the k+1 sub-upgrade packages from the kth upgrade package to the vehicle ECU.
4. The method of claim 3, wherein the step of transmitting a first one of the k+1 subupgrade packages from the particular upgrade package to the vehicle ECU is:
modifying the packet size in the transmission message of the specific upgrade packet into a first data size, wherein the first data is the sum of the transmitted data size of the specific upgrade packet and the packet size of the first sub-upgrade packet;
the step of transmitting the rest of the k+1 sub-upgrade packages from the kth upgrade package to the vehicle ECU is as follows:
Modifying the offset address of the kth upgrade package into the initial address of the rest of the sub upgrade packages, and modifying the sub-package size of the kth upgrade package into the sub-package size of the rest of the sub upgrade packages.
5. The method of claim 1, wherein the vehicle ECU includes a vehicle gateway and other vehicle ECUs;
the step of transmitting the N upgrade packages to the vehicle ECU is that the vehicle OTA upgrade master control unit transmits the N upgrade packages to the vehicle gateway through an Ethernet;
the transmitting the N upgrade packages to the vehicle ECU in response to the vehicle ECU being another vehicle ECU includes:
the vehicle OTA upgrade master control unit transmits the Ethernet messages of the N upgrade packages to the vehicle ECU through a vehicle gateway; or alternatively
The vehicle OTA upgrade master control unit transmits the Ethernet messages of the N upgrade packages to a vehicle gateway;
the vehicle gateway converts the Ethernet message into a Controller Area Network (CAN) bus message and transmits the CAN bus message to the vehicle ECU.
6. The method of claim 1, wherein the using N different ports in the vehicle OTA upgrade master control unit to respectively transmit the N upgrade packages to the vehicle ECU comprises:
Creating a client for each of N different ports in the vehicle OTA upgrade master control unit, respectively;
establishing connection between each created client and a port of the vehicle ECU, wherein the port of the vehicle ECU is a server;
and respectively transmitting the N upgrade packages to the server by using each client.
7. A method for upgrading a vehicle electronic control unit ECU based on over-the-air OTA, the method being performed by a vehicle ECU, the method comprising:
responding to a connection establishment request sent by a vehicle OTA upgrade main control unit, and respectively establishing connection between a port of the vehicle ECU and N different ports of the vehicle OTA upgrade main control unit;
receiving upgrade packets sent by the N different ports respectively, wherein each upgrade packet is provided with different transmission messages, and the transmission messages at least comprise a sub-packet sequence number;
assembling the received upgrade package into an upgrade file based on the sub-package serial number;
and responding to the correctness of the verification result of the verification of the upgrade file, and finishing the upgrade of the vehicle ECU based on the upgrade file.
8. An over-the-air OTA-based vehicle electronic control unit ECU upgrading device, comprising:
The receiving module is configured to receive an upgrade file of the vehicle ECU and determine the size of the upgrade file;
a determining module configured to determine port capabilities of the vehicle OTA upgrade master control unit and port capabilities of the vehicle ECU;
the segmentation module is configured to segment the upgrade file into N upgrade packages in response to the port capacity of the vehicle OTA upgrade master control unit being smaller than the port capacity of the vehicle ECU and the upgrade file size being larger than the port capacity of the vehicle OTA upgrade master control unit, wherein N is a positive integer larger than 1;
the transmission module is configured to respectively transmit the N upgrade packages to the vehicle ECU by using N different ports in the vehicle OTA upgrade master control unit, so that the vehicle ECU can assemble the N upgrade packages to obtain the upgrade file after receiving the N upgrade packages, and the vehicle ECU upgrade is completed based on the upgrade file.
9. An over-the-air OTA-based vehicle electronic control unit ECU upgrading device, comprising:
the communication module is configured to respectively establish connection between the port of the vehicle ECU and N different ports of the vehicle OTA upgrade master control unit in response to receiving a connection establishment request sent by the vehicle OTA upgrade master control unit;
The receiving module is configured to receive the upgrade packages respectively sent by the N different ports, wherein each upgrade package respectively has different transmission messages, and the transmission messages at least comprise sub-package serial numbers;
the assembly module is configured to assemble the received upgrade package into an upgrade file;
and the upgrading module is configured to respond to the correctness of the verification result of the verification of the upgrading file, and complete the upgrading of the vehicle ECU based on the upgrading file.
10. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 7 when the computer program is executed.
11. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the method according to any one of claims 1 to 7.
CN202311270070.4A 2023-09-27 2023-09-27 OTA-based vehicle ECU upgrading method, device, equipment and medium Pending CN117376339A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311270070.4A CN117376339A (en) 2023-09-27 2023-09-27 OTA-based vehicle ECU upgrading method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311270070.4A CN117376339A (en) 2023-09-27 2023-09-27 OTA-based vehicle ECU upgrading method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN117376339A true CN117376339A (en) 2024-01-09

Family

ID=89399437

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311270070.4A Pending CN117376339A (en) 2023-09-27 2023-09-27 OTA-based vehicle ECU upgrading method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN117376339A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117632198A (en) * 2024-01-26 2024-03-01 深圳乐木骆科技有限公司 Firmware upgrading method, device, storage medium and apparatus
CN118139016A (en) * 2024-05-07 2024-06-04 成都赛力斯科技有限公司 Vehicle upgrading method and device based on space downloading technology and electronic equipment

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117632198A (en) * 2024-01-26 2024-03-01 深圳乐木骆科技有限公司 Firmware upgrading method, device, storage medium and apparatus
CN117632198B (en) * 2024-01-26 2024-05-07 深圳乐木骆科技有限公司 Firmware upgrading method, device, storage medium and apparatus
CN118139016A (en) * 2024-05-07 2024-06-04 成都赛力斯科技有限公司 Vehicle upgrading method and device based on space downloading technology and electronic equipment
CN118139016B (en) * 2024-05-07 2024-07-19 成都赛力斯科技有限公司 Vehicle upgrading method and device based on space downloading technology and electronic equipment

Similar Documents

Publication Publication Date Title
CN117376339A (en) OTA-based vehicle ECU upgrading method, device, equipment and medium
US8417860B2 (en) Hybrid in-vehicle infotainment network
US9300733B2 (en) System and/or method for client-driven server load distribution
CN107395572B (en) Data processing method and Internet of things gateway
CN113179321A (en) Network hub, transfer method, and vehicle-mounted network system
US20100290391A1 (en) Apparatus and method for accessing multiple wireless networks
JP7380671B2 (en) Management device, vehicle communication system, vehicle communication management method, and vehicle communication management program
KR20200136751A (en) Apparatus for communicating diagnosis of a vehicle, system having the same and method thereof
CN105612734A (en) Adaptation device for bus system, and method for operating CAN subscriber station and CAN-FD subscriber station in bus system
JP6968990B2 (en) Methods and equipment for determining quality of service, as well as programs
US10587572B1 (en) Group signaling using synthetic media access control addresses
CN110545230B (en) Method and device for forwarding VXLAN message
WO2011017648A1 (en) System and method for sharing a payload among multiple homed networks
CN117082137A (en) Communication method, device, equipment and medium for maintaining OTA upgrade refreshing mode
US20220239528A1 (en) Relay device, vehicle, communication method, and communication program
CN112311694B (en) Priority adjustment method and device
CN115622833B (en) Device management method, system, device and medium for cross-terminal communication based on bus
Elhadeedy et al. 60 GHz Wi-Fi as a Tractor-Trailer Wireless Harness
US9877357B2 (en) Changing wireless carriers during a mobile gateway session
CN116382744B (en) Method, device, system and storage medium for parallel refreshing of multiple ECUs
CN117061518B (en) Cloud native virtual CAN communication system and method
US11985217B2 (en) Network interface apparatus
CN116938598B (en) Information transmission method, apparatus, electronic device, and computer-readable medium
CN116743862A (en) Vehicle operation method, device, electronic equipment and storage medium
KR20230117898A (en) Vehicle heterogeneous communication system and communication method therefor

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination