Method and apparatus for flashing controller, vehicle, method and server for processing flashing packet of controller, and computer program product
By using multi-core processors and communication network resources in parallel to transmit and write data blocks, the problem of low flashing efficiency of traditional controllers is solved, and faster software updates and higher user experience is achieved.
Patent Information
- Application Number
- CN202411549724.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-01
- Publication Date
- 2025-02-18
AI Technical Summary
Traditional controllers have low flashing and writing efficiency, slow data transmission speed of software update packages, and there is a large delay in erasing and writing of the controller's storage units, which affects the user experience.
Make full use of multi-core by utilizing existing communication network resources (such as Ethernet, WiFi and/or CAN networks) to transmit data blocks in parallel from multiple data sources and quickly and accurately transmit them to the corresponding controller according to the characteristic code of the data block, making full use of multi-core The processor's independent task processing capability performs flashing tasks in parallel.
Improves the controller's writing efficiency, shortens the software update time, and improves the user experience.
Smart Images

Figure CN119473328A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle-mounted controllers, and in particular, to a method for flashing a controller, a device for flashing a controller, a vehicle comprising the device according to the present application, a method for processing a flashing data packet of a controller, a server for processing a flashing data packet of a controller, and a computer program product for at least assisting in implementing the steps of the method described in the present application. Background Art
[0002] The implementation of each function of the intelligent connected vehicle depends on the software installed in each controller of the vehicle. These software need to be updated regularly, which is achieved by flashing the software update package to the controller. The flashing efficiency of traditional controllers is low. Not only is the data transmission speed of the software update package slow, but there is also a large delay in erasing and writing the storage unit of the controller. With the expansion of the number of software and the increase in the amount of data in the software update package, the speed of software update has become a key indicator affecting the user experience.
[0003] Therefore, how to improve the flashing efficiency of the controller has become a technical problem that needs to be solved. Summary of the invention
[0004] The purpose of the present application is to provide a method for flashing a controller, a device for flashing a controller, a vehicle including the device according to the present application, a method for processing a flashing data packet of a controller, a server for processing a flashing data packet of a controller, and a computer program product, so as to at least partially solve the problems in the prior art.
[0005] According to a first aspect of the present application, a method for flashing a controller is provided, the method comprising:
[0006] - Step S1: According to the characteristic code of the data block, the first main gateway of the vehicle receives the data block required for flashing the controller of the vehicle from the server and / or the second main gateway of the first other vehicle based on the communication network status;
[0007] - Step S2: according to the characteristic code of the data block, respectively pull the data blocks required for flashing of each controller connected to each sub-gateway of the vehicle from the data blocks received through the first main gateway, and transmit the pulled data blocks to the controller connected to the sub-gateway through each sub-gateway; and
[0008] - Step S3: flashing the data blocks received by the controller to the controller in parallel respectively through the multi-core processor of the controller.
[0009] The core concept of the present application includes: utilizing existing communication network resources - including Ethernet, WiFi and / or CAN networks - to transmit data blocks in parallel from multiple data sources to the main gateway of the vehicle to improve the transmission efficiency of flash data, and quickly and accurately transmitting the flash data to the corresponding controller in a targeted manner based on the feature code of the data block, making full use of the independent task processing capabilities of each core processor in the multi-core processor to execute each flash task in parallel, and effectively improving the flash efficiency of the controller through a parallel flash scheme of erasing and writing.
[0010] According to an exemplary embodiment of the present application, the data blocks received by the controller can be transmitted to the volatile memory of the controller through the multi-core processor of the controller, and different storage areas of the non-volatile memory of the controller can be written and / or erased in parallel to flash the data blocks stored in the volatile memory to the non-volatile memory of the controller.
[0011] According to another exemplary embodiment of the present application, the rate of receiving data from the server and / or the second main gateway through the first main gateway can be adjusted based on the communication network status between the first main gateway and the server and / or the communication network status between the first main gateway and the second main gateway, wherein the communication network status between the first main gateway and the server may include the communication network status of Ethernet and / or WiFi between the first main gateway and the server, and the communication network status between the first main gateway and the second main gateway may include the communication network status of WiFi between the first main gateway and the second main gateway.
[0012] According to another exemplary embodiment of the present application, the first main gateway can transmit data blocks required for flashing each controller connected to each sub-gateway to each sub-gateway through the Ethernet and / or CAN network, wherein the data blocks required for flashing each controller are determined based on the version number of the software and / or hardware of each controller, and wherein the rate of transmitting data blocks through the Ethernet and / or CAN network is adjusted based on the communication network status of the Ethernet and / or CAN network.
[0013] According to another exemplary embodiment of the present application, data blocks required for flashing the controller can be transmitted to the corresponding controller through each sub-gateway based on the version number of the software and / or hardware of each controller connected to the sub-gateway, wherein the rate of transmitting the data blocks through the communication network is adjusted based on the communication network status between the sub-gateway and the controller.
[0014] According to another exemplary embodiment of the present application, the method may further include:
[0015] Step S11: restoring the data block received by the first master gateway.
[0016] According to another exemplary embodiment of the present application, the method may further include:
[0017] -Step S4: In response to a request message for a feature code of a data block required for flashing a controller of the second other vehicle, sent by the third main gateway of the second other vehicle, the data block is pulled from the first main gateway of the vehicle according to the feature code in the request message, and the pulled data block is sent to the third main gateway through the first main gateway based on the communication network status between the first main gateway and the third main gateway.
[0018] According to another exemplary embodiment of the present application, the communication network status may include network bandwidth and occupancy rate of the network bandwidth.
[0019] According to a second aspect of the present application, a device for flashing a controller is provided, wherein the device is used to execute the method for flashing a controller according to the present application, wherein the device may include the following components:
[0020] - a first master gateway, which is configured to receive a data block required for flashing the controller of the vehicle from a server and / or a second master gateway of a first other vehicle according to a feature code of the data block based on a communication network condition;
[0021] - a sub-gateway configured to pull data blocks required for flashing controllers connected to each sub-gateway of the vehicle from the received data blocks according to the feature code of the data blocks, and transmit the pulled data blocks to the controllers connected to the sub-gateways through each sub-gateway; and
[0022] - A controller, wherein the data blocks received by the controller are flashed to the controller in parallel respectively through a multi-core processor of the controller.
[0023] According to a third aspect of the present application, a vehicle is provided, comprising the device according to the present application.
[0024] According to a fourth aspect of the present application, a method for processing a flash data packet of a controller is provided, the method comprising:
[0025] - Step S1 ': Sending a request message about an old version of the software and / or hardware of the controller of the vehicle to the first master gateway of the vehicle;
[0026] - Step S2': generating a differential data packet required for flashing the controller of the vehicle based at least on the stored new version data of the software and / or hardware and the received information about the old version of the software and / or hardware of the controller of the vehicle;
[0027] - Step S3': dividing the generated differential data packet into a plurality of data blocks, and calculating a feature code of each data block; and
[0028] - Step S4': based at least on the communication network status between the first main gateway and the server,
[0029] The data block is sent to the first main gateway of the vehicle according to the feature code of the data block.
[0030] The core concept of this application also includes: generating differential data packets based on the new and old versions of the software and hardware in the server and dividing them into multiple data blocks, and sending the data blocks required for flashing the controller of the corresponding vehicle according to the characteristic codes of the data blocks, thereby greatly reducing the amount of data transmission, and making full use of existing communication network resources to speed up the transmission speed of flashing data, and using characteristic codes to effectively avoid repeated transmission of data blocks.
[0031] According to another exemplary embodiment of the present application, the rate of transmitting data to the first main gateway can be adjusted based on the communication network status between the first main gateway and the server, wherein the communication network status between the first main gateway and the server includes the communication network status of Ethernet and / or WiFi between the first main gateway and the server, wherein the communication network status includes network bandwidth and network bandwidth occupancy rate, etc.
[0032] According to a fifth aspect of the present application, a server for processing a flash data packet of a controller is provided, wherein the server is used to execute the method for processing a flash data packet of a controller according to the present application, wherein the server may include the following components:
[0033] - a data receiving module configured to receive information about an old version of software and / or hardware of a controller of the host vehicle;
[0034] - a differential processing module, which is configured to generate a differential data packet required for flashing the controller of the vehicle based on at least the stored new version data of the software and / or hardware and the received information about the old version of the software and / or hardware of the controller of the vehicle;
[0035] - a data block generation module, which is configured to divide the generated differential data packet into a plurality of data blocks and calculate a feature code of each data block; and
[0036] - A data sending module, which is configured to send request information about old versions of the software and / or hardware of the controller of the vehicle to the first main gateway of the vehicle, and to send the data block to the first main gateway of the vehicle according to a feature code of the data block at least based on the communication network status between the first main gateway and the server.
[0037] According to a sixth aspect of the present application, a computer program product, such as a computer-readable program carrier, is provided, which contains or stores computer program instructions, and when the computer program instructions are executed by a processor, they at least assist in implementing the steps of the method described in the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The principles, features and advantages of the present application may be better understood by describing the present application in more detail below with reference to the accompanying drawings. The accompanying drawings show:
[0039] Figure 1 A schematic diagram showing a communication connection between a vehicle and a server according to an exemplary embodiment of the present application;
[0040] Figure 2 A schematic block diagram showing a device for flashing a controller and a server for processing a flashing data packet of the controller according to an exemplary embodiment of the present application;
[0041] Figure 3 A flowchart showing a method for processing a flash data packet of a controller according to an exemplary embodiment of the present application is shown;
[0042] Figure 4 A flowchart showing a method for flashing a controller according to an exemplary embodiment of the present application is shown;
[0043] Figure 5 A flowchart showing a method for flashing a controller according to another exemplary embodiment of the present application is shown;
[0044] Figure 6 A schematic timing diagram showing processing tasks of a multi-core processor according to an exemplary embodiment of the present application; and
[0045] Figure 7 A flowchart of a method for flashing a controller according to another exemplary embodiment of the present application is shown. DETAILED DESCRIPTION
[0046] In order to make the technical problems, technical solutions and beneficial technical effects to be solved by the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and multiple exemplary embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the scope of protection of the present application.
[0047] Figure 1 A schematic diagram showing a communication connection between a vehicle and a server according to an exemplary embodiment of the present application is shown.
[0048] The vehicle 1 may include a device 10 for flashing a controller, wherein the device 10, especially the first main gateway 11 of the device 10, not only performs two-way data transmission with the server 4 via Ethernet (marked with a solid arrow) and / or WiFi (marked with a dotted arrow), but also performs two-way data transmission with the second main gateway 21 of the first other vehicle 2 and / or the third main gateway 31 of the second other vehicle 3 via WiFi. Meanwhile, the second main gateway 21 of the first other vehicle 2 and the third main gateway 31 of the second other vehicle 3 can also perform two-way data transmission with the server 4 via Ethernet and / or WiFi, so that each main gateway 11, 21, 31 can complete the data reception required for flashing the controller of the corresponding vehicle.
[0049] Here, the first main gateway 11 is configured to receive the data block required for flashing the controller of the vehicle 1 from the server 4 and / or the second main gateway 21 of the first other vehicle 2 according to the characteristic code of the data block based on the communication network status, and can also send the data block required for flashing the controller of the second other vehicle 3 to the third main gateway 31 of the second other vehicle 3 according to the characteristic code of the data block based on the communication network status. Here, the communication network status includes, for example, the network bandwidth and the occupancy rate of the network bandwidth.
[0050] For example, in a vehicle production line or a vehicle maintenance point, the main gateways 11, 21, 31 of each vehicle 1, 2, 3 can perform two-way data transmission with the server 4 via Ethernet and / or WiFi, so as to receive the data blocks required for flashing the controller of the corresponding vehicle from the server 4 based on the communication network status according to the characteristic codes of the data blocks, and the main gateways 11, 21, 31 of each vehicle 1, 2, 3 can also perform two-way data transmission with each other via WiFi, so that the data blocks required for flashing the controller of the corresponding vehicle can be transmitted to each other between the main gateways 11, 21, 31 based on the communication network status according to the characteristic codes of the data blocks, thereby making full use of network resources to complete the transmission of the flashing data packets, and then providing new functions for the vehicle or repairing bugs caused by the software and hardware of the controller through flashing the controller.
[0051] For another example, when an OTA (Over-the Air Technology) upgrade is performed after the vehicle is delivered, the main gateways 11, 21, 31 of each vehicle 1, 2, 3 can perform two-way data transmission with the server 4 via WiFi, thereby receiving the data block required for flashing the controller of the corresponding vehicle from the server 4 based on the communication network status according to the feature code of the data block, and the main gateways 11, 21, 31 of each vehicle 1, 2, 3 can also perform two-way data transmission with each other via WiFi, so that the data block required for flashing the controller of the corresponding vehicle can be transmitted between each main gateway 11, 21, 31 based on the communication network status according to the feature code of the data block, thereby making full use of network resources to complete the OTA upgrade, thereby providing new functions for the vehicle or repairing Bugs caused by the software and hardware of the controller.
[0052] Figure 2 A schematic block diagram of a device 10 for flashing a controller and a server 4 for processing a flashing data packet of the controller according to an exemplary embodiment of the present application is shown.
[0053] The data sending module 44 of the server 4 can send request information about the old version of the software and / or hardware of the controller of the vehicle 1 to the first main gateway 11 of the vehicle 1, and the data receiving module 41 can receive the information about the old version of the software and / or hardware of the controller of the vehicle 1 sent by the first main gateway 11 of the vehicle 1. In the differential processing module 42 of the server 4, the differential data packet required for flashing the controller of the vehicle 1 can be generated based on at least the stored new version data of the software and / or hardware and the received information about the old version of the software and / or hardware of the controller of the vehicle 1, thereby greatly reducing the amount of transmitted data.
[0054] In the data block generation module 43 of the server 4, the generated differential data packet can be divided into multiple data blocks, and the characteristic code of each data block can be calculated. Then, the divided data blocks can be sent to the first main gateway 11 of the vehicle 1 according to the characteristic code of the data block at least based on the communication network status between the first main gateway 11 and the server 4 through the data sending module 44 of the server 4. This is because the first main gateway 11 of the vehicle 1 may also receive the data blocks required for flashing the controller of the vehicle 1 from the main gateways of other vehicles based on the communication network status between the first main gateway 11 and the main gateways of other vehicles. The data blocks received by the first main gateway 11 and the data blocks not received can be quickly and accurately distinguished according to the characteristic codes of the data blocks, thereby avoiding repeated transmission of data blocks.
[0055] In addition, the server 4 can also send the data blocks required for flashing the controller of the first other vehicle 2 to the second main gateway 21 of the first other vehicle 2 and / or send the data blocks required for flashing the controller of the second other vehicle 3 to the third main gateway 31 of the second other vehicle 3.
[0056] The device 10 for flashing a controller may include a first main gateway 11 and a plurality of sub-gateways, and controllers that are respectively connected to each sub-gateway in communication. The first sub-gateway 12, the second sub-gateway 13 and the third sub-gateway 14 are shown as examples, wherein the first main gateway 11 and each sub-gateway can perform bidirectional data transmission through Ethernet (marked with a solid arrow) and a CAN network (marked with a dotted arrow), so that each sub-gateway can pull the data blocks required for flashing the controller connected to each sub-gateway from the data blocks received from the first main gateway 11 according to the feature code of the data block. Each sub-gateway can perform bidirectional data transmission with different types of controllers through different communication networks, thereby making full use of the communication network resources between the sub-gateway and the controller to complete the directional transmission of the data block. For example, the first sub-gateway 12 performs bidirectional data transmission with the first controller 121 and the second controller 122 via Ethernet, and the first sub-gateway 12 performs bidirectional data transmission with the first controller 121 configured as a high-speed controller via the CAN network, so that the first sub-gateway 12 can read the version number of the software and / or hardware of the first controller 121, and transmit the data blocks required for flashing the first controller 121 to the first controller 121 via the Ethernet and CAN networks at the same time according to the version number. For another example, the second sub-gateway 13 and the third controller 131 and the fourth controller 132 configured as conventional controllers can perform bidirectional data transmission only through the CAN network, so that the second sub-gateway 13 can read the version number of the software and / or hardware of the third controller 131 and / or the fourth controller 132, and transmit the data blocks required for flashing to the third controller 131 and / or the fourth controller 132 through the CAN network according to the version number; the third sub-gateway 14 and the fifth controller 141 and the sixth controller 142 configured as low-speed controllers can perform bidirectional data transmission only through Ethernet, and transmit the data blocks required for flashing to the fifth controller 141 and / or the sixth controller 142 through Ethernet according to the version number, wherein the data transmission rate of Ethernet is greater than the data transmission rate of the CAN network.
[0057] These controllers 121, 122, 131, 132, 141, 142 all include multi-core processors, and each core processor can independently perform data block processing tasks, such as data block transmission tasks, data block writing tasks, and storage area erasing tasks. After the controller receives these data blocks, the multi-core processors of the controller can respectively transmit the data blocks received by the controller to the volatile memory (such as random access memory RAM) of the controller, and write and / or erase different storage areas of the non-volatile memory (such as read-only memory ROM) of the controller in parallel, so as to write the data blocks stored in the volatile memory to the storage area of the non-volatile memory of the controller. Here, the minimum erasure unit can be used as the division standard of the storage area of the non-volatile memory, that is, after a minimum erasure unit is erased by the first core processor, the data blocks stored in the volatile memory can be written to the minimum erasure unit by the second core processor, and the first core processor continues to erase the next minimum erasure unit, and the third core processor is always responsible for transmitting the data blocks received by the controller to the volatile memory of the controller.
[0058] Next, combine Figure 3 The workflow diagram of the method for processing a flash data packet of a controller according to an exemplary embodiment of the present application illustrates in detail the process of generating a data packet in the server 4 .
[0059] like Figure 3 As shown, the method may include steps S1' to S4'. In step S1', request information about the old version of the software and / or hardware of the controller of the vehicle 1 may be sent to the first main gateway 11 of the vehicle 1. The main gateway of each vehicle stores information about the old version of the software and / or hardware of all controllers of the vehicle, and the version information about the software and / or hardware of the controller stored in the main gateway is updated after each controller is flashed. After receiving the request information, the first main gateway 11 of the vehicle 1 will send information about the old version (i.e., the version before flashing) of the software and / or hardware of the controller of the vehicle 1 to the server 4, and it will be received by the data receiving module 41 of the server.
[0060] In step S2', the differential data packet required for flashing the controller of the vehicle 1 can be generated based on at least the new version data of the stored software and / or hardware and the received information about the old version of the software and / or hardware of the controller of the vehicle 1. The new version data of the software and / or hardware of each controller of the vehicle is stored in the memory of the server 4. Based on the new version data and the information about the old version, the differential data of the new and old versions can be effectively identified and generated by the differential algorithm. The differential data usually contains all the modifications and new additions required to update the old version to the new version. Then, the generated differential data is encapsulated into a differential data packet, and the differential data packet is verified and tested to ensure the correctness and integrity of the differential data packet. At the same time, in order to ensure data security, the differential data packet is also digitally signed and / or encrypted so that only authorized vehicles can verify and use the differential data packet. The amount of data transmission can be greatly reduced through the differential data packet, and the controller can complete the update of the software and / or hardware of the controller according to the differential data packet and the old version of the software and / or hardware.
[0061] In step S3', the generated differential data packet can be divided into multiple data blocks, and the characteristic code of each data block is calculated. Here, the characteristic code is, for example, a hash characteristic value generated based on the data block, which can map a data block of any length to a hash characteristic value of a fixed length, usually a short string of random letters and numbers, which is not only irreversible, that is, the data content of the data block cannot be derived by any method based on the hash characteristic value, but also unique, that is, there is a one-to-one correspondence between the data block and the hash characteristic value, and the same hash characteristic value will be generated only when two data blocks are exactly the same. Optionally, these data blocks can also be compressed to further reduce the amount of transmitted data.
[0062] In step S4', the data block may be sent to the first main gateway 11 of the vehicle 1 according to the characteristic code of the data block, at least based on the communication network status between the first main gateway 11 and the server 4. Considering that the first main gateway 11 of the vehicle 1 may also receive the data block required for flashing the controller of the vehicle 1 from the main gateway of other vehicles based on the communication network status between the first main gateway 11 and the main gateway of other vehicles, the data block sent to the first main gateway 11 through the server 4 may be selected quickly and accurately according to the characteristic code of the data block, avoiding repeated sending of the data block that the first main gateway 11 has received from the main gateway of other vehicles.
[0063] Here, in particular, the rate of transmitting data to the first main gateway 11 can be adjusted based on the communication network status between the first main gateway 11 and the server 4, wherein the communication network status between the first main gateway 11 and the server 4 includes the communication network status of Ethernet and / or WiFi between the first main gateway 11 and the server 4, wherein the communication network status includes network bandwidth and network bandwidth occupancy rate, etc.
[0064] For example, in a vehicle production line or a vehicle maintenance point, the server 4 can perform two-way data transmission with the first main gateway 11 of the vehicle 1 via Ethernet and / or WiFi, thereby sending the data block required for flashing the controller of the vehicle 1 to the first main gateway 11 of the vehicle 1 based on the communication network status of Ethernet and / or WiFi according to the characteristic code of the data block; for another example, when performing an OTA upgrade after the vehicle is delivered, the server 4 can perform two-way data transmission with the first main gateway 11 of the vehicle 1 via WiFi, thereby sending the data block required for flashing the controller of the vehicle 1 to the first main gateway 11 of the vehicle 1 based on the communication network status of WiFi according to the characteristic code of the data block.
[0065] According to the current embodiment of the present application, a differential data packet is generated in the server based on the new and old versions of the software and hardware and divided into multiple data blocks, and the data block required for flashing the controller of the corresponding vehicle is sent according to the characteristic code of the data block, thereby greatly reducing the amount of data transmission, and making full use of the existing communication network resources to speed up the transmission speed of the flashing data, and using the characteristic code to effectively avoid the repeated transmission of the data block.
[0066] Next, combine Figure 4 The flowchart of the method for flashing a controller according to an exemplary embodiment of the present application describes in detail the process of processing a data packet in the device 10 .
[0067] like Figure 4As shown, the method may include steps S1 to S3. In step S1, according to the characteristic code of the data block, the data block required for flashing the controller of the vehicle 1 may be received from the server 4 and / or the second main gateway 21 of the first other vehicle 2 through the first main gateway 11 of the vehicle 1 based on the communication network status. Here, the rate of receiving data from the server 4 and / or the second main gateway 21 through the first main gateway 11 may be adjusted based on the communication network status between the first main gateway 11 and the server 4 and / or the communication network status between the first main gateway 11 and the second main gateway 21. The communication network status between the first main gateway 11 and the server 4 may include the communication network status of Ethernet and / or WiFi between the first main gateway 11 and the server 4, and the communication network status between the first main gateway 11 and the second main gateway 21 may include the communication network status of WiFi between the first main gateway 11 and the second main gateway 21, wherein the communication network status may include network bandwidth and the occupancy rate of network bandwidth, etc.
[0068] It should be noted that only a first other vehicle 2 is listed here as an example. The first main gateway 11 of the vehicle 1 can receive the data blocks required for flashing the controller of the vehicle 1 from the main gateways of all other vehicles connected to it via WiFi, wherein the transmittable data blocks can be quickly identified from the data blocks stored in the main gateways of other vehicles according to the feature codes of the data blocks, thereby making full use of all network channels connected to the first main gateway 11 of the vehicle 1 to transmit data blocks in parallel, thereby accelerating the transmission process of differential data packets.
[0069] Considering that these data blocks may also be compressed in server 4, such as Figure 5 The flowchart of the method for flashing a controller according to another exemplary embodiment of the present application is shown, and the method may further include step S11. In step S11, the data block received by the first main gateway 11 is restored to obtain the differential data packet required for flashing the controller of the vehicle 1.
[0070] In step S2, the data blocks required for flashing each controller connected to each sub-gateway of the vehicle 1 can be pulled from the data blocks received through the first main gateway 11 according to the characteristic code of the data block, and the pulled data blocks can be transmitted to the controller connected to the sub-gateway through each sub-gateway. Here, each sub-gateway 12, 13, 14 can read the software and / or hardware version number of the controller connected thereto, and determine the data blocks required for flashing each controller based on the version number and pull them from the data blocks received by the first main gateway 11. In the meaning of this application, "pulling" means selecting the required data blocks from all data blocks according to the characteristic code, and merging the selected data blocks into a data structure that can be continuously transmitted. The first main gateway 11 can transmit the data blocks required for flashing each controller connected to each sub-gateway 12, 13, 14 through the Ethernet and / or CAN network, wherein, in particular, the rate of transmitting data blocks through the Ethernet and / or CAN network can be adjusted based on the communication network conditions of the Ethernet and / or CAN network, including network bandwidth and network bandwidth occupancy, etc.
[0071] After each sub-gateway 12, 13, 14 receives the data block, each sub-gateway sends the data block required for flashing to the corresponding controller based on the version number of the software and / or hardware of each controller connected to each sub-gateway. In particular, the rate of transmitting the data block can also be adjusted based on the communication network status between the sub-gateway and the controller.
[0072] like Figure 2 As shown, for example, the first sub-gateway 12 can perform bidirectional data transmission with the first controller 121 configured as a high-speed controller through the Ethernet and CAN network, so that the first sub-gateway 12 can read the version number of the software and / or hardware of the first controller 121, and transmit the data blocks required for flashing the first controller 121 to the first controller 121 through the Ethernet and CAN networks at the same time according to the version number, and can also adjust the rate of transmitting data blocks through the Ethernet and / or CAN network based on the communication network conditions of the Ethernet and / or CAN network. For another example, the second sub-gateway 13 and the third controller 131 and the fourth controller 132 configured as conventional controllers can perform bidirectional data transmission through the CAN network, so that the second sub-gateway 13 can read the version number of the software and / or hardware of the third controller 131 and / or the fourth controller 132, and transmit the data blocks required for flashing to the third controller 131 and / or the fourth controller 132 through the CAN network according to the version number; the third sub-gateway 14 and the fifth controller 141 and the sixth controller 142 configured as low-speed controllers can perform bidirectional data transmission through Ethernet, wherein the data transmission rate of Ethernet is greater than the data transmission rate of the CAN network.
[0073] In step S3, the data blocks received by the controller are flashed to the controller in parallel through the multi-core processor of the controller. Here, the controllers all include multi-core processors. After the controller receives the processor data, each core processor of the controller can independently perform data block processing tasks, such as data block transmission tasks, data block writing tasks, and storage area erasing tasks.
[0074] like Figure 6 A schematic timing diagram of a processing task of a multi-core processor according to an exemplary embodiment of the present application is shown, wherein the horizontal axis t represents time, the vertical axis P represents a task characteristic value, and different task characteristic values are used to characterize different processing tasks of data blocks. After the controller receives these processor data, the data block received by the controller is transmitted to the volatile memory of the controller by the third core processor (this process is marked with a dotted line). At the same time, different storage areas of the non-volatile memory of the controller can be erased by the first core processor (this process is marked with a solid line), especially using the minimum erase unit as the division standard of the storage area of the non-volatile memory. After a minimum erase unit is erased by the first core processor, the data block stored in the volatile memory can be written to the erased storage area by the second core processor (this process is marked with a dotted line), and the first core processor continues to erase the next minimum erase unit until all storage areas required to write these data blocks are erased. As shown in 6, except that the writing of data blocks is not performed in parallel during the erasing process of the first minimum erasing unit, the erasing and writing of different storage areas are performed in parallel by the first core processor and the second core processor during the erasing process of other storage areas until the first core processor completes the erasing task of all storage areas required to write these data blocks, and then the data blocks continue to be written by the second core processor until all data blocks are written to the erased storage area, and the second core processor and the third core processor stop their processing tasks.
[0075] According to the current embodiment of the present application, existing communication network resources - including Ethernet, WiFi and / or CAN networks - are utilized to transmit data blocks in parallel from multiple data sources to the main gateway of the vehicle to improve the transmission efficiency of the flash data, and the flash data is quickly and accurately transmitted to the corresponding controller in a direction according to the feature code of the data block, and the independent task processing capabilities of each core processor in the multi-core processor are fully utilized to execute various flash tasks in parallel, and the flash efficiency of the controller is effectively improved through a parallel flash scheme of erasing and writing.
[0076] Figure 7 FIG. 1 is a flowchart of a method for flashing a controller according to another exemplary embodiment of the present application. Figure 4The differences between the embodiments shown in FIG. 1 and FIG. 2 are shown in FIG. 3 , and the same steps are not described repeatedly for the sake of brevity.
[0077] like Figure 7 As shown, the method further includes step S4. In step S4, in response to the received request information about the characteristic code of the data block required for the controller of the second other vehicle 3 sent by the third main gateway 31 of the second other vehicle 3, the data block can be pulled from the first main gateway 11 of the vehicle 1 according to the characteristic code in the request information, and the pulled data block is sent to the third main gateway 13 through the first main gateway 11 based on the communication network status between the first main gateway 11 and the third main gateway 31. The first main gateway 11 of the vehicle 1 stores the received data blocks, and the data blocks required for the controller of the second other vehicle 3 can be quickly and accurately determined according to the characteristic codes of these data blocks, and the WiFi network channel between the first main gateway 11 of the vehicle 1 and the main gateways of other vehicles is fully utilized to transmit the required data blocks to the corresponding vehicles in parallel, thereby the first main gateway 11 acts as a data source when the communication network resources allow, and optimizes the transmission process of differential data packets between intelligent networked vehicles.
[0078] It should be noted that only one second other vehicle 3 is exemplified here, and the first main gateway 11 of the vehicle 1 can send the data blocks required for flashing the controller of the corresponding vehicle to the main gateways of all other vehicles connected to it via WiFi.
[0079] In addition, it should be noted that the step numbers described herein do not necessarily represent a chronological order, but are merely a figure mark. The order can be changed according to specific circumstances as long as the technical purpose of the present application can be achieved.
[0080] It should be understood that, in this document, the expressions "first", "second", "third", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance, nor should they be understood as implicitly indicating the number of the indicated technical features.
[0081] If an embodiment includes an “and / or” relationship between a first feature and a second feature, it should be interpreted as follows: according to one embodiment, the embodiment has both the first feature and the second feature, and according to another embodiment, the embodiment has either only the first feature or only the second feature.
[0082] Although specific embodiments have been described above, these embodiments are not intended to limit the scope of the present disclosure, even when only a single embodiment is described with respect to specific features. The feature examples provided in the present disclosure are intended to be illustrative, not restrictive, unless otherwise stated. In specific implementations, multiple features may be combined with each other, where technically feasible, according to actual needs. Various substitutions, changes, and modifications may also be conceived without departing from the spirit and scope of the present application.
Claims
1. A method for flashing a controller, the method comprising: Step S1: According to the characteristic code of the data block, the first main gateway (11) of the vehicle (1) receives the data block required for flashing the controller of the vehicle (1) from the server (4) and / or the second main gateway (21) of the first other vehicle (2) based on the communication network status; Step S2: According to the characteristic code of the data block, the data blocks required for flashing of each controller (121, 122, 131, 132, 141, 142) connected to each sub-gateway (12, 13, 14) of the vehicle (1) are pulled out from the data blocks received through the first main gateway (11), and the pulled data blocks are transmitted to the controllers (121, 122, 131, 132, 141, 142) connected to the sub-gateways (12, 13, 14) through each sub-gateway (12, 13, 14); and Step S3: The data blocks received by the controllers (121, 122, 131, 132, 141, 142) are respectively flushed to the controllers in parallel through the multi-core processors of the controllers (121, 122, 131, 132, 141, 142).
2. The method according to claim 1, wherein: The data blocks received by the controllers (121, 122, 131, 132, 141, 142) are respectively transmitted to the volatile memory of the controllers (121, 122, 131, 132, 141, 142) by the multi-core processors of the controllers (121, 122, 131, 132, 141, 142), and different storage areas of the non-volatile memory of the controllers (121, 122, 131, 132, 141, 142) are written and / or erased in parallel, so as to flash the data blocks stored in the volatile memory to the non-volatile memory of the controllers (121, 122, 131, 132, 141, 142).
3. A method according to any one of the preceding claims, wherein: The rate at which data is received from the server (4) and / or the second main gateway (21) through the first main gateway (11) is adjusted based on the communication network status between the first main gateway (11) and the server (4) and / or the communication network status between the first main gateway (11) and the second main gateway (21), wherein the communication network status between the first main gateway (11) and the server (4) includes the communication network status of Ethernet and / or WiFi between the first main gateway (11) and the server (4), and the communication network status between the first main gateway (11) and the second main gateway (21) includes the communication network status of WiFi between the first main gateway (11) and the second main gateway (21).
4. A method according to any one of the preceding claims, wherein: The first main gateway (11) transmits data blocks required for flashing each controller (121, 122, 131, 132, 141, 142) connected to each sub-gateway (12, 13, 14) via Ethernet and / or CAN network, wherein the data blocks required for flashing each controller (121, 122, 131, 132, 141, 142) are determined based on the version number of the software and / or hardware of each controller (121, 122, 131, 132, 141, 142), and the rate of transmitting the data blocks via the Ethernet and / or CAN network is adjusted based on the communication network status of the Ethernet and / or CAN network.
5. A method according to any one of the preceding claims, wherein: Data blocks required for flashing the controllers (121, 122, 131, 132, 141, 142) are transmitted to the corresponding controllers (121, 122, 131, 132, 141, 142) through the respective sub-gateways (12, 13, 14) based on the version numbers of the software and / or hardware of the respective controllers (121, 122, 131, 132, 141, 142) connected to the sub-gateways (12, 13, 14), wherein the rate at which the data blocks are transmitted through the communication network is adjusted based on the status of the communication network between the sub-gateways (12, 13, 14) and the controllers (121, 122, 131, 132, 141, 142).
6. A method according to any one of the preceding claims, wherein: The method further comprises: Step S11: restoring the data block received by the first master gateway (11).
7. A method according to any one of the preceding claims, wherein: The method further comprises: Step S4: In response to a request message for a feature code of a data block required for flashing a controller of the second other vehicle (3) sent by the third main gateway (31) of the second other vehicle (3), the data block is pulled from the first main gateway (11) of the vehicle (1) according to the feature code in the request message, and the pulled data block is sent to the third main gateway (13) through the first main gateway (11) based on the communication network status between the first main gateway (11) and the third main gateway (31).
8. A method according to any one of the preceding claims, wherein: The communication network status includes network bandwidth and network bandwidth occupancy rate.
9. A device (10) for flashing a controller, the device (10) being used to perform the method according to any one of the preceding claims, wherein: The device (10) comprises the following components: A first main gateway (11) configured to receive a data block required for flashing a controller of the vehicle (1) from a server (4) and / or a second main gateway (21) of a first other vehicle (2) according to a characteristic code of the data block based on a communication network condition; Sub-gateways (12, 13, 14) are configured to pull data blocks required for flashing controllers connected to the respective sub-gateways (12, 13, 14) of the vehicle (1) from the received data blocks according to feature codes of the data blocks, and transmit the pulled data blocks to the controllers (121, 122, 131, 132, 141, 142) connected to the sub-gateways (12, 13, 14) through the respective sub-gateways (12, 13, 14); and The controllers (121, 122, 131, 132, 141, 142) respectively write data blocks received by the controllers (121, 122, 131, 132, 141, 142) to the controllers in parallel through the multi-core processors of the controllers (121, 122, 131, 132, 141, 142).
10. A vehicle (1) comprising a device (10) according to claim 9.
11. A method for processing a flash data packet of a controller, the method comprising: Step S1': Sending request information about the old version of the software and / or hardware of the controller of the vehicle (1) to the first main gateway (11) of the vehicle (1); Step S2': generating a differential data packet required for flashing the controller of the vehicle (1) based at least on the stored new version data of the software and / or hardware and the received information about the old version of the software and / or hardware of the controller of the vehicle (1); Step S3': dividing the generated differential data packet into multiple data blocks, and calculating the feature code of each data block; and Step S4': at least based on the communication network status between the first main gateway (11) and the server (4), the data block is sent to the first main gateway (11) of the vehicle (1) according to the feature code of the data block.
12. The method according to claim 11, wherein: The rate of transmitting data to the first main gateway (11) is adjusted based on the communication network status between the first main gateway (11) and the server (4), wherein the communication network status between the first main gateway (11) and the server (4) includes the communication network status of Ethernet and / or WiFi between the first main gateway (11) and the server (4), and wherein the communication network status includes the network bandwidth and the occupancy rate of the network bandwidth.
13. A server (4) for processing a flash data packet of a controller, the server (4) being used to execute the method according to claim 11 or 12, wherein: The server (4) comprises the following components: A data receiving module (41) configured to receive information about an old version of software and / or hardware of a controller of the host vehicle (1); A differential processing module (42) configured to generate a differential data packet required for flashing the controller of the vehicle (1) based at least on the stored new version data of the software and / or hardware and the received information about the old version of the software and / or hardware of the controller of the vehicle (1); A data block generation module (43), configured to divide the generated differential data packet into a plurality of data blocks and calculate a feature code of each data block; and A data sending module (44) is configured to send request information about an old version of the software and / or hardware of the controller of the vehicle (1) to the first main gateway (11) of the vehicle (1), and to send the data block to the first main gateway (11) of the vehicle (1) based on a feature code of the data block at least based on the communication network status between the first main gateway (11) and the server (4).
14. A computer program product, such as a computer-readable program carrier, comprising or storing computer program instructions, which, when executed by a processor, at least assist in implementing the steps of the method according to any one of claims 1 to 8 and 11 to 12.