Vehicle-mounted controller refreshing method and device, electronic equipment and computer storage medium
By establishing a high-bandwidth Ethernet connection in the vehicle controller and adopting a refresh strategy of serial within the network segment and parallel between network segments, the problem of insufficient bandwidth of the traditional CAN bus is solved, achieving efficient and reliable controller refresh, meeting the production line cycle time requirements and reducing management costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHERY AUTOMOBILE CO LTD
- Filing Date
- 2026-02-02
- Publication Date
- 2026-05-01
AI Technical Summary
Traditional vehicle controller refresh solutions are limited by insufficient CAN bus bandwidth, resulting in excessively long refresh times that cannot meet the stringent cycle requirements of modern automotive manufacturing lines. Furthermore, this leads to an increase in the number of controller material variations and high management costs.
By establishing high-bandwidth Ethernet connections, adopting a collaborative refresh strategy of serial refresh within network segments and parallel refresh between network segments, utilizing Ethernet channels for multi-channel synchronous data transmission, and designing the refresh sequence based on network topology dependencies, parallel refresh of multiple functional network segments can be achieved.
It significantly improved the overall refresh efficiency, met the production line cycle time requirements, reduced the number of controller material variations, reduced supply chain and management complexity, and ensured the high reliability and robustness of large-scale parallel refresh.
Smart Images

Figure CN121967113A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automotive control technology, and in particular to a method, apparatus, electronic device, and computer storage medium for refreshing an on-board controller. Background Technology
[0002] As automotive electronic and electrical architectures evolve towards domain centralization, the functions of onboard controllers (ECUs) are becoming increasingly complex, with software code sizes typically exceeding 100MB. In traditional vehicle production and maintenance, ECU software updates primarily rely on the Controller Area Network (CAN) bus. However, limited by the relatively low physical bandwidth of the CAN bus (typically 500kbps), traditional solutions can only employ a serial mode during updates, meaning only a single ECU within a single network segment can be operated at a time, failing to effectively utilize the time window. This leads to three core pain points: Transmission bottleneck: Even under full load, limited bandwidth cannot meet the rapid transmission requirements of large-scale, high-capacity software, and the refresh time is too long; Cycle conflict: In modern automobile manufacturing production lines, strict cycle times (such as ≤90 seconds / unit) seriously conflict with traditional serial refresh schemes, becoming a bottleneck for production efficiency; Cost pressure: If all controllers cannot be refreshed on the production line due to efficiency issues, the number of controller part numbers (SKUs) for different software versions will surge, and the SKU management cost for a single model may increase by 20% to 30%.
[0003] Although technologies based on automotive Ethernet and the Diagnostic Transport Layer Protocol (DoIP) can provide bandwidth of up to 100Mbps, creating the physical conditions for parallel refresh, how to effectively organize and schedule this high-bandwidth channel to achieve stable, reliable, and efficient parallel refresh across multiple functional network segments (such as body, chassis, and power domain) remains an urgent technical problem to be solved. Summary of the Invention
[0004] The purpose of this invention is to provide a method, apparatus, electronic device, and computer storage medium for refreshing vehicle controllers. By establishing a high-bandwidth Ethernet connection and adopting a collaborative refresh strategy of "serial within a network segment and parallel between network segments," the bottleneck of the traditional serial refresh mode is systematically solved. The Ethernet channel provides the foundation for synchronous transmission of multiple data streams, while the parallel strategy fully utilizes this bandwidth advantage, enabling the refresh tasks of multiple functional network segments to proceed simultaneously, thereby significantly improving the overall refresh efficiency and effectively meeting the stringent production line cycle time requirements. The increased efficiency makes it possible to complete the refresh of the vast majority of controllers at the production line end, thus significantly reducing the number of controller material variations caused by software version fixation and reducing supply chain and management complexity. At the same time, the serial scheduling within the network segment ensures the order and stability of data communication within a single network. Combined with the refresh order designed based on network topology dependencies, the risk of routing interruption is effectively avoided, thereby ensuring high reliability and robustness of the large-scale parallel refresh process while achieving high efficiency.
[0005] In a first aspect, the present invention provides a method for refreshing an in-vehicle controller, comprising: Establish an Ethernet connection between external diagnostic equipment and the vehicle gateway; The vehicle gateway performs pre-programming operations on target electronic control units in multiple functional network segments; the target electronic control units are on-board controllers whose software is to be refreshed and distributed in multiple functional network segments according to a preset refresh list; the pre-programming operation is used to put the target electronic control units into a refresh-ready state; The main programming operation is performed on multiple target electronic control units of multiple functional network segments through the vehicle gateway; the main programming operation uses a strategy of serial refresh within the network segment and parallel refresh between network segments to write new software data; After the refresh is complete, control the target electronic control unit to exit programming mode.
[0006] In some preferred embodiments of the present invention, the multiple functional network segments include: at least one in-vehicle Ethernet network segment and multiple controller local area network segments; after establishing the Ethernet connection, the method further includes: Write the vehicle software configuration code corresponding to the current vehicle model to the vehicle gateway so that the vehicle gateway and the target electronic control unit can obtain the corresponding refresh parameters.
[0007] In some preferred embodiments of the present invention, the pre-programming operation includes: Send diagnostic session control commands via function addressing to cause the target electronic control unit to enter an extended diagnostic session; Send a control diagnostic fault code setting command to prevent the target electronic control unit from storing fault codes during the refresh process; Send a communication control command to cause the target electronic control unit to suspend non-diagnostic message communication.
[0008] In some preferred embodiments of the present invention, the strategy for parallel refresh between network segments in the main programming operation includes: The external diagnostic equipment sends a refresh command for the first electronic control unit to the first network segment according to the preset refresh sequence; After the instruction from the first electronic control unit is sent, the external diagnostic device sends a refresh instruction to the second network segment so that the refresh operation on the second network segment overlaps with the refresh operation on the remaining electronic control units in the first network segment in time.
[0009] In some preferred embodiments of the present invention, the preset refresh order is set based on the vehicle network topology. For network segments with sub-gateways, the refresh order of the subordinate electronic control units mounted under the sub-gateway takes precedence over the refresh of the sub-gateway itself.
[0010] In some preferred embodiments of the present invention, the main programming operation includes: Trigger the target electronic control unit to perform a pre-refresh condition check; If the condition check passes, the target electronic control unit enters the bootloader running mode and completes the secure access verification. Write software fingerprint information to the target electronic control unit and download new application software data; After the file download is complete, a software integrity check is performed and the target electronic control unit is triggered to perform a programming dependency check.
[0011] In some preferred embodiments of the present invention, the method further includes: The vehicle gateway places multiple received data frames into a preset forwarding queue for caching and forwarding; the vehicle gateway adopts a dynamic resource scheduling strategy to allocate dedicated processing units and memory resources for the parallel refresh process.
[0012] In a second aspect, the present invention provides an in-vehicle controller refresh device, comprising: The network connectivity module is used to establish an Ethernet connection with the vehicle gateway via external diagnostic equipment. The pre-programmed operation module is used to perform pre-programming operations on target electronic control units in multiple functional network segments through the vehicle gateway; wherein, the target electronic control unit is an on-board controller whose software to be refreshed is distributed in multiple functional network segments according to a preset refresh list; the pre-programming operation is used to put the target electronic control unit into a refresh-ready state; The main programming module is used to perform main programming operations on multiple target electronic control units across multiple functional network segments via the vehicle gateway. The main programming operation uses a strategy of serial refresh within the network segment and parallel refresh between network segments to write new software data. The termination module is used to control the target electronic control unit to exit programming mode after the refresh is complete.
[0013] Thirdly, the present invention provides an electronic device including a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the vehicle controller refresh method provided in the first aspect above.
[0014] Fourthly, the present invention provides a computer storage medium storing computer-executable instructions, which, when called and executed by a processor, cause the processor to implement the vehicle controller refresh method provided in the first aspect.
[0015] This invention brings the following beneficial effects: This invention provides a method, apparatus, electronic device, and computer storage medium for refreshing vehicle controllers. The method includes: establishing an Ethernet connection with a vehicle gateway via an external diagnostic device; performing pre-programming operations on target electronic control units (ECUs) in multiple functional network segments via the vehicle gateway; wherein the target ECUs are vehicle controllers whose software is to be refreshed and distributed across multiple functional network segments according to a preset refresh list; the pre-programming operation is used to put the target ECUs into a refresh-ready state; performing main programming operations on multiple target ECUs in multiple functional network segments via the vehicle gateway; wherein the main programming operation uses a strategy of serial refresh within a network segment and parallel refresh between network segments to write new software data; and controlling the target ECUs to exit the programming mode after the refresh is completed. By establishing a high-bandwidth Ethernet connection and adopting a collaborative refresh strategy of "serial within a network segment and parallel between network segments," the bottleneck of the traditional serial refresh mode is systematically solved. The Ethernet channel provides a foundation for synchronous transmission of multiple data streams, while the parallel strategy fully utilizes this bandwidth advantage, enabling the refresh tasks of multiple functional network segments to proceed simultaneously, thereby significantly improving the overall refresh efficiency and effectively meeting the stringent production line cycle requirements. The increased efficiency makes it possible to update the vast majority of controllers on the production line, thereby significantly reducing the number of controller material variations caused by software version fixation and lowering supply chain and management complexity. Meanwhile, serial scheduling within the network segment ensures the order and stability of data communication within a single network. Combined with the update sequence designed based on network topology dependencies, it effectively avoids routing interruption risks, thus ensuring high reliability and robustness of the large-scale parallel update process while achieving high efficiency. Attached Figure Description
[0016] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0017] Figure 1 A flowchart illustrating a vehicle controller refresh method provided in an embodiment of the present invention; Figure 2 A schematic diagram of a network architecture provided in an embodiment of the present invention; Figure 3 A pre-programming flowchart provided for an embodiment of the present invention; Figure 4 A main programming flowchart provided for an embodiment of the present invention; Figure 5 A schematic diagram of computing power optimization provided in an embodiment of the present invention; Figure 6 This is a schematic diagram of the structure of an in-vehicle controller refresh device provided in an embodiment of the present invention; Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention.
[0018] Icons: 310 - Network connection module; 320 - Pre-programming operation module; 330 - Main programming operation module; 340 - End module; 400 - Memory; 401 - Processor; 402 - Bus; 403 - Communication interface. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0020] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0021] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0022] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship commonly used when the product of this invention is in use. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this invention. In addition, the terms "first," "second," "third," etc., are only used to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0023] Furthermore, terms such as "horizontal," "vertical," and "sag" do not imply that components must be absolutely horizontal or suspended, but rather that they can be slightly tilted. For example, "horizontal" simply means that its direction is more horizontal relative to "vertical," and does not mean that the structure must be completely horizontal, but can be slightly tilted.
[0024] In the description of this invention, it should also be noted that, unless otherwise explicitly specified and limited, the terms "set," "install," "connect," and "link" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0025] The following detailed description of some embodiments of the present invention is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0026] Example 1 This invention provides a method for refreshing an onboard controller; see [link to relevant documentation]. Figure 1 The flowchart shown in this embodiment of the invention provides a method for refreshing an in-vehicle controller, the method including: Step S102: Establish an Ethernet connection with the vehicle gateway through external diagnostic equipment.
[0027] For details, see Figure 2The illustrated embodiment of the present invention provides a network architecture diagram. The OBD (On-Board Diagnostics) device and the gateway are connected via a 100Mbps Ethernet connection to ensure high-bandwidth data transmission. This innovative architecture includes 7 functional domain CAN / CANFD (including BD_CAN, CH_CAN, PT_CAN, etc.) and 3 Ethernet controllers. Each CAN segment forwards data through the gateway's TP (TP layer) routing, while the Ethernet transmits messages to the target DoIP node inside the vehicle via the gateway's Layer 2 switch. During the connection establishment phase, the OBD device sends a TCP connection request to the gateway, and after completing a three-way handshake, an Ethernet link is established. By using DoIP-based in-vehicle Ethernet to replace the traditional CAN bus, the communication rate is increased from 500kbps to 100Mbps, breaking through the transmission bandwidth bottleneck and creating the technical conditions for achieving parallel Ethernet refresh.
[0028] Furthermore, in some preferred embodiments of the present invention, the multiple functional network segments include: at least one vehicle Ethernet network segment and multiple controller local area network segments; after establishing the Ethernet connection, the method further includes: writing the vehicle software configuration code corresponding to the current vehicle model to the vehicle gateway, so that the vehicle gateway and the target electronic control unit can obtain the corresponding refresh parameters.
[0029] Specifically, after the Ethernet link is established, the electrical testing equipment writes the current vehicle software configuration code to the gateway, completing the parameter configuration before the refresh. This code is used to enable the gateway and each target ECU to obtain the correct software version identifier, ensuring the directionality and accuracy of subsequent refreshes. This achieves precise matching of vehicle software configurations, laying the parameter foundation for reliable subsequent refreshes and supporting the flexible flashing requirements of multiple vehicle models on the production line.
[0030] Step S104: Perform pre-programming operation on target electronic control units of multiple functional network segments through vehicle gateway; wherein, the target electronic control unit is an on-board controller whose software to be refreshed is distributed in multiple functional network segments according to a preset refresh list; the pre-programming operation is used to put the target electronic control unit into the refresh preparation state.
[0031] For details, see Figure 3 The illustrated embodiment of the present invention provides a pre-programming flowchart. First, in the pre-programming stage, standardized preparation is performed synchronously on all target ECUs via functional addressing (broadcast method) to ensure that each target ECU enters a unified and stable writable state. Functional addressing enables synchronized state preparation of a batch of ECUs, significantly reducing the time overhead of addressing one by one, creating a consistent initial environment for subsequent parallel flashing, and improving overall process efficiency.
[0032] Furthermore, in some preferred embodiments of the present invention, the pre-programming operation includes: sending a diagnostic session control command via function addressing to cause the target electronic control unit to enter an extended diagnostic session; sending a control diagnostic fault code setting command to prevent the target electronic control unit from storing fault codes during the refresh process; and sending a communication control command to cause the target electronic control unit to suspend non-diagnostic message communication.
[0033] For details, please refer to [link / reference]. Figure 3 The pre-programming phase executes the following core services sequentially: 1) The device initiates an extended session request ($10 03) via function addressing, enabling all target ECUs to enter an extended diagnostic session; 2) To prevent DTC detection by each ECU during the flashing process, the DTC detection function is disabled via "$85 Service Disable DTC"; 3) To ensure flashing communication efficiency, the device sends a "$28 Service Communication Control" request to disable the sending and receiving of non-diagnostic messages. This process is a common preparation phase before flashing all target ECUs. By standardizing the pre-programming process, all ECUs are ensured to be in a uniform, quiet, and ready state, avoiding interference from non-diagnostic communication or accidental triggering of fault records during the flashing process, thereby improving the reliability and timing determinism of the flashing process.
[0034] Step S106: Perform main programming operation on multiple target electronic control units of multiple functional network segments through the vehicle gateway; wherein, the main programming operation uses a strategy of serial refresh within the network segment and parallel refresh between network segments to write new software data.
[0035] Specifically, please refer to the parallel refresh arrangement table shown in Table 1 and Figure 4 The illustrated embodiment of the invention provides a main programming flowchart, in which the main programming stage is executed according to a strategy of "serial within a network segment + parallel between network segments". The design ensures that controllers within the same CAN / CANFD network segment only support serial refresh, guaranteeing the stability of data transmission within a single network segment. The design also allows all controllers (7 CAN channels + 3 Ethernet channels) across different CAN / CANFD / Ethernet network segments to refresh simultaneously in parallel. Table 1 lists all target ECUs to be refreshed (such as ABM, BMS, CSA, etc.) on the vertical axis, and the horizontal axis represents time, visually demonstrating the parallel arrangement and serial order of tasks across different network segments. This strategy ensures the stability of communication within a single network segment while enabling concurrent execution of tasks across network segments, maximizing the utilization of the system's total bandwidth and time resources, thereby significantly shortening the total vehicle flashing time.
[0036] Table 1
[0037] Furthermore, in some preferred embodiments of the present invention, the strategy for parallel refresh between network segments in the main programming operation includes: the external diagnostic device sends a refresh instruction for the first electronic control unit to the first network segment according to a preset refresh order; after the instruction for the first electronic control unit is sent, the external diagnostic device sends a refresh instruction to the second network segment so that the refresh operation for the second network segment overlaps with the refresh operation for the remaining electronic control units in the first network segment in time.
[0038] Specifically, referring to Table 1, the electrical inspection equipment dynamically schedules the brushing tasks of each network segment according to the pre-arranged refresh sequence table in the diagram, using a synchronous sending mechanism. For example, after the refresh command of the ABM controller in the CH_CAN network segment is sent, the equipment immediately sends a command to the BMS controller in the BD_CAN network segment, so that the refresh operation of the BD_CAN network segment overlaps and runs in parallel with the brushing of subsequent controllers (such as EPS1) in the CH_CAN network segment. Through dynamic interleaved task scheduling, the effective parallelization of the multi-segment brushing process is achieved, overcoming the resource idleness problem in traditional serial scheduling, thereby further improving the overall throughput and time utilization.
[0039] Furthermore, in some preferred embodiments of the present invention, the preset refresh order is set based on the vehicle network topology. For network segments with sub-gateways, the refresh order of the subordinate electronic control units mounted under the sub-gateway takes precedence over the refresh of the sub-gateway itself.
[0040] Specifically, the refresh sequence design fully considers network routing dependencies. For controllers connected to sub-gateways, if the sub-gateway is in bootloader mode during parallel refresh, it cannot process routing requests. Therefore, the refresh of controllers connected to sub-gateways must be scheduled before the refresh of the sub-gateway itself. Taking Table 1 as an example, the refresh order of the controller ONEBOX2 connected to the sub-gateway FRZCU takes precedence over FRZCU itself to avoid ONEBOX2 failing to complete the refresh normally after FRZCU enters bootloader mode. This topology-dependent sequence design effectively avoids the risk of routing interruption of lower-level nodes caused by gateway node refresh, ensuring that all ECUs in complex network topologies can be reliably refreshed, thus improving the integrity and stability of the refresh process.
[0041] Furthermore, in some preferred embodiments of the present invention, the main programming operation includes: triggering the target electronic control unit to perform a pre-refresh condition check; if the condition check passes, controlling the target electronic control unit to enter the bootloader running mode and complete the security access verification; writing software fingerprint information to the target electronic control unit and downloading new application software data; after the file download is completed, performing software integrity verification and triggering the target electronic control unit to perform a programming dependency check.
[0042] For details, please refer to [link / reference]. Figure 4 The master programming for each target ECU is executed in the following logical order: 1) The device triggers each controller to perform a pre-flash condition check ($31 0203); 2) If the conditions are met, the ECU enters the Bootloader running mode ($10 02); 3) The device can only perform subsequent operations after the ECU passes secure access ($27); 4) After secure access is passed, the device writes fingerprint information (date, device code) to each controller ($2E F184); 5) The driver / application download (FileDownloadStep) is executed, with the process including: request download ($34), data transfer ($36), and request exit ($37); 6) After the driver / application transfer is completed, software integrity checks such as digital signature verification are performed; 7) After all application software downloads are completed, the diagnostic device sends the "Check Programming Dependencies" routine ($31 FF01). Strict process control and multiple verification mechanisms ensure the security and software integrity of the flashing process, preventing flashing failures due to unmet conditions, unauthorized identities, or data errors, and guaranteeing the reliability of the flashing results.
[0043] Step S108: After the refresh is completed, control the target electronic control unit to exit the programming mode.
[0044] Specifically, after all controllers are refreshed, the "11 01" command is sent sequentially to each ECU to exit bootloader mode. Subsequently, the electrical testing equipment disconnects from the gateway and each Ethernet controller via TCP handshake, completing the overall parallel flashing process. Standardized session recovery and connection release operations ensure that the ECU can return to the application state normally after flashing, and network connection resources are properly cleared, guaranteeing that the vehicle can be immediately put into normal use or enter the next production stage after flashing.
[0045] Furthermore, in some preferred embodiments of the present invention, the method further includes: the vehicle gateway placing the received multiple data frames into a preset forwarding queue for caching and forwarding; wherein the vehicle gateway adopts a dynamic resource scheduling strategy to allocate dedicated processing units and memory resources for the parallel refresh process.
[0046] For details, see Figure 5 The diagram illustrates a computing power optimization method provided by an embodiment of the present invention. This embodiment employs queue-based, wait-free forwarding. In traditional technologies, the gateway must wait for a TCP ACK response from the device before forwarding the next set of data, resulting in forwarding delays. In this embodiment, the gateway uses a wait-free queue of a specific capacity (e.g., 128 frames), eliminating the need to wait for a TCP ACK response and directly adding data to the queue for forwarding. Simultaneously, the gateway employs a dynamic resource scheduling strategy: dividing the total computing power of the gateway MCU into multiple independent units (e.g., ... Figure 5 The eight units shown are multiplexed between "self-flash writing" and "routing function"; and are configured with dedicated RAM resources (such as...). Figure 5 The 4K dedicated RAM for parallel refresh shown is physically separated from the RAM resources of other gateway functions. The no-wait queue mechanism avoids the waiting time of TCP ACK through queue caching, improving the data forwarding efficiency of parallel refresh; dynamic computing power and memory scheduling strategies avoid resource conflicts when multiple tasks are concurrent, ensuring the stability and real-time performance of the gateway when multiple nodes are refreshed in parallel.
[0047] This invention provides a method for refreshing an on-board controller, comprising: establishing an Ethernet connection with a vehicle gateway via an external diagnostic device; performing pre-programming operations on target electronic control units (ECUs) of multiple functional network segments via the vehicle gateway; wherein the target ECUs are on-board controllers whose software is to be refreshed and distributed across multiple functional network segments according to a preset refresh list; the pre-programming operation is used to put the target ECUs into a refresh-ready state; performing main programming operations on multiple target ECUs of multiple functional network segments via the vehicle gateway; wherein the main programming operation uses a strategy of serial refresh within a network segment and parallel refresh between network segments to write new software data; and controlling the target ECUs to exit the programming mode after the refresh is completed. By establishing a high-bandwidth Ethernet connection and adopting a collaborative refresh strategy of "serial within a network segment and parallel between network segments," the bottleneck of the traditional serial refresh mode is systematically solved. The Ethernet channel provides a foundation for synchronous transmission of multiple data streams, while the parallel strategy fully utilizes this bandwidth advantage, enabling the refresh tasks of multiple functional network segments to proceed simultaneously, thereby significantly improving the overall refresh efficiency and effectively meeting the stringent production line cycle requirements. The increased efficiency makes it possible to update the vast majority of controllers on the production line, thereby significantly reducing the number of controller material variations caused by software version fixation and lowering supply chain and management complexity. Meanwhile, serial scheduling within the network segment ensures the order and stability of data communication within a single network. Combined with the update sequence designed based on network topology dependencies, it effectively avoids routing interruption risks, thus ensuring high reliability and robustness of the large-scale parallel update process while achieving high efficiency.
[0048] Example 2 Based on the above embodiments, this invention provides an in-vehicle controller refresh device, see [link to previous embodiment]. Figure 6 The diagram shown is a structural schematic of an in-vehicle controller refresh device according to an embodiment of the present invention. The device includes: The network connectivity module 310 is used to establish an Ethernet connection with the vehicle gateway via external diagnostic equipment.
[0049] The pre-programming operation module 320 is used to perform pre-programming operations on target electronic control units in multiple functional network segments through the vehicle gateway; wherein, the target electronic control unit is an on-board controller whose software is to be refreshed and distributed in multiple functional network segments according to a preset refresh list; the pre-programming operation is used to put the target electronic control unit into a refresh-ready state.
[0050] The main programming operation module 330 is used to perform main programming operations on multiple target electronic control units of multiple functional network segments through the vehicle gateway; wherein, the main programming operation adopts the strategy of serial refresh within the network segment and parallel refresh between the network segments to write new software data.
[0051] The termination module 340 is used to control the target electronic control unit to exit the programming mode after the refresh is completed.
[0052] Furthermore, in some preferred embodiments of the present invention, the multiple functional network segments include: at least one vehicle Ethernet network segment and multiple controller local area network segments; the device further includes: a network management configuration module, used to write the vehicle software configuration code corresponding to the current vehicle model to the vehicle gateway, so that the vehicle gateway and the target electronic control unit can obtain the corresponding refresh parameters.
[0053] Furthermore, in some preferred embodiments of the present invention, a pre-programmed operation module 320 is used to send a diagnostic session control command via function addressing to enable the target electronic control unit to enter an extended diagnostic session; send a control diagnostic fault code setting command to prevent the target electronic control unit from storing fault codes during the refresh process; and send a communication control command to enable the target electronic control unit to suspend non-diagnostic message communication.
[0054] Furthermore, in some preferred embodiments of the present invention, the main programming operation module 330 is used to send a refresh instruction for the first electronic control unit to the first network segment according to a preset refresh order; after the instruction for the first electronic control unit is sent, the external diagnostic device sends a refresh instruction to the second network segment so that the refresh operation for the second network segment overlaps with the refresh operation for the remaining electronic control units in the first network segment in time.
[0055] Furthermore, in some preferred embodiments of the present invention, the preset refresh order is set based on the vehicle network topology. For network segments with sub-gateways, the refresh order of the subordinate electronic control units mounted under the sub-gateway takes precedence over the refresh of the sub-gateway itself.
[0056] Furthermore, in some preferred embodiments of the present invention, the main programming operation module 330 is used to trigger the target electronic control unit to perform a pre-refresh condition check; if the condition check passes, the target electronic control unit is controlled to enter the bootloader running mode and complete the security access verification; software fingerprint information is written to the target electronic control unit and new application software data is downloaded; after the file download is completed, software integrity verification is performed and the target electronic control unit is triggered to perform a programming dependency check.
[0057] Furthermore, in some preferred embodiments of the present invention, the apparatus further includes: a data queue processing module, used by the vehicle gateway to place multiple received data frames into a preset forwarding queue for caching and forwarding; wherein the vehicle gateway adopts a dynamic resource scheduling strategy to allocate dedicated processing units and memory resources for the parallel refresh process.
[0058] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the vehicle controller refresh device described above can be referred to the corresponding process in the aforementioned embodiments of the vehicle controller refresh method, and will not be repeated here.
[0059] Example 3 This invention also provides an electronic device for running an onboard controller refresh method; see [link to previous document]. Figure 7 The schematic diagram of an electronic device provided by the embodiment of the present invention shown below includes a memory 400 and a processor 401. The memory 400 is used to store one or more computer instructions, which are executed by the processor 401 to implement the above-mentioned vehicle controller refresh method.
[0060] Furthermore, Figure 7 The electronic device shown also includes a bus 402 and a communication interface 403. The processor 401, the communication interface 403 and the memory 400 are connected via the bus 402.
[0061] The memory 400 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 403 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc. The bus 402 can be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 7 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0062] Processor 401 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 401 or by instructions in software form. Processor 401 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a readily available storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 400, and processor 401 reads information from memory 400 and, in conjunction with its hardware, completes the steps of the method described in the foregoing embodiments.
[0063] This invention also provides a computer-readable storage medium storing computer-executable instructions. When these computer-executable instructions are called and executed by a processor, they cause the processor to implement the above-described vehicle controller refresh method. For details of the implementation, please refer to the method embodiments, which will not be repeated here.
[0064] The computer program products of the vehicle controller refresh method, apparatus and electronic device provided in the embodiments of the present invention include a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods in the preceding method embodiments. For specific implementation, please refer to the method embodiments, which will not be repeated here.
[0065] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system and / or device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0066] Furthermore, in the description of the embodiments of the present invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention based on the specific circumstances.
[0067] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0068] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for refreshing an on-board controller, characterized in that, include: Establish an Ethernet connection between external diagnostic equipment and the vehicle gateway; The vehicle gateway performs pre-programming operations on target electronic control units (ECUs) of multiple functional network segments; wherein, the target ECU is an on-board controller whose software is to be refreshed and distributed in multiple functional network segments according to a preset refresh list; the pre-programming operation is used to put the target ECU into a refresh-ready state; The vehicle gateway performs master programming operations on multiple target electronic control units in multiple functional network segments; wherein, the master programming operation writes new software data using a strategy of serial refresh within the network segment and parallel refresh between network segments; After the refresh is complete, control the target electronic control unit to exit the programming mode.
2. The vehicle controller refresh method according to claim 1, characterized in that, The multiple functional network segments include: at least one in-vehicle Ethernet network segment and multiple controller area network segments; after establishing the Ethernet connection, the method further includes: Write the vehicle software configuration code corresponding to the current vehicle model to the vehicle gateway so that the vehicle gateway and the target electronic control unit can obtain the corresponding refresh parameters.
3. The vehicle controller refresh method according to claim 1, characterized in that, The pre-programming operations include: Send diagnostic session control commands via function addressing to cause the target electronic control unit to enter an extended diagnostic session; Send a control diagnostic fault code setting command to prevent the target electronic control unit from storing fault codes during the refresh process; Send a communication control command to cause the target electronic control unit to suspend non-diagnostic message communication.
4. The vehicle controller refresh method according to claim 1, characterized in that, In the main programming operation, the strategy for parallel refresh between network segments includes: The external diagnostic device sends a refresh command for the first electronic control unit to the first network segment according to a preset refresh sequence. After the instruction from the first electronic control unit is sent, the external diagnostic device sends a refresh instruction to the second network segment so that the refresh operation on the second network segment overlaps with the refresh operation on the remaining electronic control units in the first network segment in time.
5. The vehicle controller refresh method according to claim 1, characterized in that, The preset refresh order is set based on the vehicle network topology. For network segments with sub-gateways, the refresh order of the subordinate electronic control units mounted under the sub-gateway takes precedence over the refresh of the sub-gateway itself.
6. The vehicle controller refresh method according to claim 1, characterized in that, The main programming operations include: Trigger the target electronic control unit to perform a pre-refresh condition check; If the condition check passes, control the target electronic control unit to enter the bootloader running mode and complete the secure access verification; Write software fingerprint information to the target electronic control unit and download new application software data; After the file download is complete, a software integrity check is performed and the target electronic control unit is triggered to perform a programming dependency check.
7. The vehicle controller refresh method according to claim 1, characterized in that, The method further includes: The vehicle gateway places multiple received data frames into a preset forwarding queue for caching and forwarding; wherein, the vehicle gateway adopts a dynamic resource scheduling strategy to allocate dedicated processing units and memory resources for the parallel refresh process.
8. A vehicle-mounted controller refresh device, characterized in that, include: The network connectivity module is used to establish an Ethernet connection with the vehicle gateway via external diagnostic equipment. A pre-programmed operation module is used to perform pre-programming operations on target electronic control units (ECUs) of multiple functional network segments through the vehicle gateway; wherein, the target ECU is an on-board controller whose software is to be refreshed and distributed in multiple functional network segments according to a preset refresh list; the pre-programming operation is used to put the target ECU into a refresh-ready state; The main programming module is used to perform main programming operations on multiple target electronic control units of multiple functional network segments through the vehicle gateway; wherein, the main programming operation uses a strategy of serial refresh within the network segment and parallel refresh between network segments to write new software data; The termination module is used to control the target electronic control unit to exit the programming mode after the refresh is completed.
9. An electronic device, characterized in that, The device includes a processor and a memory, the memory storing computer-executable instructions that can be executed by the processor, the processor executing the computer-executable instructions to implement the vehicle controller refresh method according to any one of claims 1 to 7.
10. A computer storage medium, characterized in that, The computer storage medium stores computer-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the vehicle controller refresh method according to any one of claims 1 to 7.