A firmware flashing method and device

By realizing the independent judgment function in the vehicle ECU, we ensure that firmware flashing is performed only when the vehicle's operating state meets the conditions, the failure and failure problems caused by forced flashing are solved, and the success rate and stability of flashing are improved.

CN114090027BActive Publication Date: 2025-04-01LAUNCH TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111363844.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-17
Publication Date
2025-04-01
Estimated Expiration
2041-11-17

AI Technical Summary

Technical Problem

When the vehicle's operating state does not meet the firmware flashing conditions, the vehicle ECU is easily affected by forced flashing, resulting in flashing failure, ECU damage or vehicle failure.

Method used

By realizing the independent judgment function in the ECU, after receiving the flash request, the preset judgment flashing conditions are actively obtained, and based on these conditions, whether the target parameter criterion meets the firmware flashing conditions, and only when all conditions are met will be flashed.

Benefits of technology

It improves the success rate of firmware flashing, makes the flashing process more stable, and avoids the risk of vehicle ECU damage and vehicle failure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114090027B_ABST
    Figure CN114090027B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a firmware flashing method and device. The method includes: a first electronic control unit ECU receives a flashing request sent by an electronic device, and the first ECU is configured on a target vehicle; the first ECU obtains a preset judgment flashing condition according to the flashing request, wherein the preset judgment flashing condition includes at least one parameter criterion acquisition method and parameter criterion judgment condition; the first ECU obtains at least one target parameter criterion from the target vehicle according to at least one parameter criterion acquisition method; the first ECU judges whether at least one target parameter criterion satisfies the parameter criterion judgment condition; when at least one target parameter criterion satisfies all the parameter criterion judgment conditions, the first ECU flashes the firmware. The above method enables the ECU to autonomously judge whether the vehicle's operating state meets the firmware flashing condition, thereby improving the success rate of the ECU's firmware flashing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of automobile technology, and in particular to a firmware flashing method and device. Background Art

[0002] The Electronic Control Unit (ECU), also known as the "on-board computer", is an important part of the car. It controls the normal operation of the car engine and ensures the normal operation of the car. The electronic control unit ECU stores data and programs. According to the different nature of the control tasks, the ECU data can be divided into multiple data areas, such as the component information configuration area, the power parameter area, the emission parameter area, the fault diagnosis area, etc. When a vehicle fails or the vehicle engine needs to be modified, the vehicle manufacturer only needs to configure the vehicle component information, the engine manufacturer adjusts the ECU power parameters, emission parameters and other data, the maintenance station sets the fault diagnosis data, intake and other power parameters, and rewrites the ECU firmware. However, during the firmware rewriting process of some ECUs, the firmware rewriting fails many times, which can easily damage the vehicle ECU and even cause vehicle failures. Summary of the invention

[0003] The embodiments of the present application provide a firmware flashing method and device, which enable the vehicle ECU to autonomously determine whether the vehicle's operating status meets the firmware flashing conditions, thereby solving the problem of forcibly flashing the vehicle ECU when the vehicle's operating status does not meet the flashing conditions, improving the vehicle ECU flashing success rate, making the vehicle ECU flashing process more stable, and further avoiding vehicle failures.

[0004] In a first aspect, an embodiment of the present application provides a firmware flashing method, comprising:

[0005] A first electronic control unit ECU receives a flashing request sent by an electronic device, wherein the first ECU is configured on a target vehicle;

[0006] The first ECU obtains a preset flashing judgment condition according to the flashing request, wherein the preset flashing judgment condition includes at least one parameter criterion acquisition method and a target parameter criterion;

[0007] The first ECU acquires at least one target parameter criterion from the target vehicle according to the at least one parameter criterion acquisition method;

[0008] The first ECU determines whether the at least one target parameter criterion satisfies the parameter criterion determination condition;

[0009] When the at least one target parameter criterion all satisfies the parameter criterion judgment condition, the first ECU flashes the firmware.

[0010] In the embodiment of the present application, after receiving the flashing request, the first ECU actively obtains the preset flashing judgment condition, and judges whether the target parameter criteria meet the firmware flashing condition according to the preset flashing judgment condition, and only flashes the firmware when all the target parameter criteria meet the judgment condition. Here, by autonomously judging whether the vehicle operation state meets the firmware flashing condition by the first ECU, the problem of forcibly flashing the vehicle ECU when the vehicle operation state does not meet the flashing condition can be avoided, thereby improving the success rate of the firmware flashing, making the firmware flashing process more stable, and further avoiding vehicle failures.

[0011] In a possible implementation manner, before the first ECU acquires at least one target parameter criterion from the target vehicle according to the at least one parameter criterion acquisition method, the method may include:

[0012] The first ECU determines the parameter type of the at least one target parameter criterion according to the at least one parameter criterion acquisition method;

[0013] The first ECU determines at least one second ECU according to the parameter type;

[0014] The first ECU establishes a communication connection with the at least one second ECU.

[0015] In an embodiment of the present application, before obtaining at least one target parameter criterion, it is necessary to determine the correspondence between the parameter type of each target parameter criterion and each second ECU, and then establish a communication connection with the determined at least one second ECU. In this way, loopholes in the judgment of vehicle operating conditions can be avoided, the accuracy of obtaining vehicle operating parameters is improved, and the reliability of the judgment of flashing conditions is ensured.

[0016] In a possible implementation manner, the first ECU acquires at least one target parameter criterion from the target vehicle according to the at least one parameter criterion acquisition method, specifically including:

[0017] The first ECU sends a second message to each second ECU in the at least one second ECU according to the parameter type of the at least one target parameter criterion, wherein the second message includes the parameter type corresponding to each second ECU;

[0018] The first ECU receives a third message sent by each second ECU, where the third message includes a target parameter criterion corresponding to each second ECU.

[0019] In an embodiment of the present application, the target parameter criterion is obtained through the second message and the third message, wherein the second message and the third message both correspond to the parameter type of the target parameter criterion. In this way, loopholes in the judgment of vehicle operating conditions can be avoided, the accuracy of obtaining vehicle operating parameters is improved, and the reliability of firmware flashing is ensured.

[0020] In a possible implementation, when the at least one target parameter criterion all satisfies the parameter criterion judgment condition, the first ECU flashes the firmware, specifically including:

[0021] The first ECU sends a first message to the electronic device, the first message being used to indicate that the at least one target parameter criterion all satisfies the parameter criterion judgment condition;

[0022] The first ECU receives the flashing data sent by the electronic device;

[0023] The first ECU flashes the firmware according to the flashing data.

[0024] In an embodiment of the present application, the first ECU sends a first message to the electronic device, and the electronic device sends the flash data to the first ECU only after receiving the first message. In this way, the problem of sending the flash data to the first ECU when the firmware flash conditions are not met can be avoided, the storage process of the flash data in the vehicle ECU can be reduced, the vehicle ECU storage space is saved, and the stability of the vehicle operation is further guaranteed.

[0025] In a possible implementation, the method further includes:

[0026] When the at least one target parameter criterion does not fully satisfy the parameter criterion judgment condition, the first ECU prohibits flashing the firmware.

[0027] In an embodiment of the present application, when at least one target parameter criterion does not fully meet the firmware flashing conditions, that is, one or more target parameter criterion does not meet the firmware flashing conditions, the first ECU prohibits flashing the firmware. In this way, the problem of forcibly flashing the firmware when the target parameter criterion does not meet the flashing conditions is avoided, the success rate of the firmware flashing is improved, and failure of the vehicle ECU or the vehicle is further avoided.

[0028] In a possible implementation manner, after the first ECU prohibits flashing the firmware, the method may include:

[0029] The first ECU sends a fourth message to the electronic device, where the fourth message is used to indicate a target parameter criterion among the at least one target parameter criterion that does not satisfy the parameter criterion judgment condition.

[0030] In the embodiment of the present application, the first ECU sends a fourth message to the electronic device to indicate the target parameter criterion that does not meet the parameter criterion judgment condition in at least one target parameter criterion. In this way, the electronic device or the vehicle factory personnel can monitor or adjust the target parameter criterion that does not meet the parameter criterion judgment condition according to the fourth message. When the target parameter criterion that does not meet the parameter criterion judgment condition meets the parameter criterion judgment condition, the electronic device sends a flashing request to the first ECU again. In this way, the detection steps of the vehicle running state can be reduced, and the firmware flashing efficiency of the vehicle ECU can be improved.

[0031] In a second aspect, an embodiment of the present application provides a firmware flashing device, including:

[0032] A receiving unit, used for receiving a flashing request sent by an electronic device;

[0033] An acquisition unit, configured to acquire a preset flashing judgment condition according to the flashing request, wherein the preset flashing judgment condition includes at least one parameter criterion acquisition method and a parameter criterion judgment condition;

[0034] The acquisition unit is further used to acquire at least one target parameter criterion from the target vehicle according to the at least one parameter criterion acquisition method;

[0035] The processing unit is used to determine whether the at least one target parameter criterion satisfies the parameter criterion judgment condition; when the at least one target parameter criterion fully satisfies the parameter criterion judgment condition, the firmware is flashed.

[0036] In a possible implementation manner, the device further includes:

[0037] A sending unit, configured to send a first message to the electronic device, wherein the first message is used to indicate that all of the at least one target parameter criterion satisfies the parameter criterion judgment condition;

[0038] The processing unit is further used to receive the flashing data sent by the electronic device; and flash the firmware according to the flashing data.

[0039] In one possible implementation, the processing unit is also used to determine the parameter type of the at least one target parameter criterion based on the at least one parameter criterion acquisition method; determine at least one second ECU based on the parameter type, and establish a communication connection with the at least one second ECU.

[0040] In one possible implementation, the sending unit is also used to send a second message to each second ECU in the at least one second ECU according to the parameter type of the at least one target parameter criterion, and the second message includes the parameter type corresponding to each second ECU; the receiving unit is also used to receive a third message sent by each second ECU, and the third message includes the target parameter criterion corresponding to each second ECU.

[0041] In a possible implementation, the processing unit is further configured to prohibit flashing of the firmware when the at least one target parameter criterion does not fully satisfy the parameter criterion judgment condition.

[0042] In a possible implementation, the sending unit is further used to send a fourth message to the electronic device, where the fourth message is used to indicate a target parameter criterion among the at least one target parameter criterion that does not satisfy the parameter criterion judgment condition.

[0043] The operations and beneficial effects performed by the firmware flashing device can refer to the method and beneficial effects described in the first aspect above, and the repeated parts will not be repeated.

[0044] In a third aspect, the present application provides an electronic control unit ECU, wherein the ECU is used to execute the method described in any one of the first aspects.

[0045] In a fourth aspect, the present application provides a firmware flashing device, which includes a processor, a memory and a transceiver, wherein the transceiver is used to receive a channel or signal, or send a channel or signal; the memory is used to store a computer program; and the processor is used to call the computer program from the memory to execute a method as described in any one of the first aspects.

[0046] In a fifth aspect, an embodiment of the present application provides a firmware flashing system, the system comprising a first ECU, and the first ECU is used to execute the method as described in any one of the first aspects.

[0047] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method described in any one of the first aspects is implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0049] Figure 1 An application scenario diagram of a firmware flashing method provided in an embodiment of the present application;

[0050] Figure 2 A flowchart of a firmware flashing method provided in an embodiment of the present application;

[0051] Figure 3 An interactive diagram of a firmware flashing method provided in an embodiment of the present application;

[0052] Figure 4 A schematic diagram of the structure of a firmware flashing device provided in an embodiment of the present application;

[0053] Figure 5 A schematic diagram of the structure of an electronic control unit ECU provided in an embodiment of the present application. DETAILED DESCRIPTION

[0054] The terms used in the embodiments of the present application are only used to explain the specific embodiments of the present invention, but are not intended to limit the present invention.

[0055] The "first" in the first ECU, the first message, and the like mentioned in the embodiments of the present application is only used as a name identifier and does not represent the first in order. The same rule applies to "second", "third", and "fourth", etc. However, the "first" in the first identifier mentioned in the embodiments of the present application represents the first in order. The same rule applies to "Nth".

[0056] Please refer to Figure 1 , Figure 1An application scenario diagram of a firmware flashing method provided in an embodiment of the present application, the application scenario includes: a target vehicle 100 and an electronic device 200, wherein the target vehicle 100 includes: an on-board device 101, multiple electronic control units ECU 102, a gateway 103 and a vehicle bus 104. Specifically, the electronic device 200 is connected to the on-board device 101 by wired or wireless communication, and the on-board device 101 and multiple electronic control units ECU 102 are connected by gateway 103; more specifically, the on-board device 101 and the gateway 103, and multiple electronic control units ECU 102 and the gateway 103 are connected by vehicle bus 104. Optionally, the vehicle bus 104 can be a CAN bus, a LIN bus, a FlexRay bus, a MOST bus, etc.

[0057] Optionally, the electronic device 200 is a device with data transmission, data reception and data processing functions, and at least has a communication module and a processing module, so as to realize the related operations of flashing the firmware of the ECU 102. The electronic device 200 can be a mobile phone, a tablet computer, a desktop, a laptop, a notebook computer, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a handheld computer, a netbook, a personal digital assistant (personal digital assistant, PDA), a wearable electronic device, a virtual reality device, etc. The electronic device 200 can be connected to the vehicle-mounted device 101 by adopting a mobile network such as the third generation mobile communication (3rd generation mobile networks, 3G) protocol, the fourth generation mobile communication (4rd generation mobile networks, 4G) protocol, the fifth generation mobile communication (5th generation mobile networks, 5G) protocol, or a wireless local area network such as the wireless fidelity (Wireless-Fidelity, Wi Fi) protocol and the Zigbee protocol, or by adopting wireless communication such as the near field communication (near field communication, NFC) technology or Bluetooth (bluetooth) technology.

[0058] Optionally, the vehicle-mounted device 101 includes a communication module, a processing module and a human-computer interaction module. The vehicle-mounted device 101 can at least perform operations of sending data, receiving data and processing data, so as to realize the related operations of flashing the firmware of the ECU 102. For example, the vehicle-mounted device 101 can be an in-vehicle infotainment system terminal device (In Vehicle Infotainment, IVI), a telematics processor (Telematics BOX, T BOX), a vehicle communication interface (VCI) device and other devices. Among them, the communication module can establish a communication connection with multiple electronic control units ECU 102 in the same way as above, such as a mobile network, a wireless local area network or wireless communication. The processing module may include a processor, a memory and a communication interface. The processor reads the program stored in the memory through the communication interface and executes the program to realize the function of the program. The human-computer interaction module may be an LCD liquid crystal display, an intelligent voice device, etc., which is used to realize functions such as displaying information to users and receiving user operations.

[0059] Optionally, the vehicle includes multiple ECUs 102, each ECU 102 is connected to a vehicle sensor for receiving operating data of various vehicle components; and different ECUs 102 are communicatively connected via a vehicle bus 104 for exchanging operating data of various vehicle components. For example, according to different functions, the vehicle ECU 102 can be divided into: Engine Management System (EMS), which is used in gasoline engines, diesel engines, hybrid systems, etc., and mainly controls the functions of the engine such as fuel injection, ignition, torque distribution, etc.; Transmission Control Unit (TCU), which is used in automatic transmissions such as AMT, AT, DCT, CVT, etc., and adopts different gear strategies according to the driving state of the vehicle; Body Control Module (BCM), which mainly controls the body electrical appliances, such as vehicle lights, wipers, washing, door locks, electric windows, sunroofs, electric rearview mirrors, remote controls, etc.; Battery Management System (BMS), for electric vehicles or hybrid vehicles equipped with power batteries, used to improve the utilization rate of the battery, prevent the battery from being overcharged and over-discharged, extend the service life of the battery, monitor the battery status, etc. In the embodiment of the present application, the specific number of ECUs included in the vehicle is not limited here.

[0060] For example, in the above application scenario, the prior art provides multiple ECUs The firmware of the first ECU in 102 is flashed, including the following steps: first, after the electronic device 200 receives the firmware flash command from the user, it sends a flash request to the vehicle-mounted device 101; then, the vehicle-mounted device 101 determines the first ECU according to the ECU identifier in the flash request, and sends the flash instruction to the first ECU; then, after the first ECU receives the firmware flash request sent from the vehicle-mounted device 101, the first ECU collects vehicle operation data, wherein the vehicle operation data refers to: the parameters generated by various components of the vehicle during the operation of the vehicle, such as the real-time position of the vehicle, the start and shutdown of the transmitter, the engine temperature, the engine speed, the battery voltage, the gear position of the gearbox, etc.; then, the first ECU sends the collected vehicle operation data to the electronic device 200, and the electronic device 200 determines whether the vehicle operation data meets the firmware flash condition of the first ECU; finally, the electronic device 200 transmits the flash data to the vehicle-mounted device 101, and the vehicle-mounted device 101 determines the first ECU according to the ECU identifier in the flash data, and sends the flash data to the first ECU, and the first ECU flashes the firmware after receiving the flash data.

[0061] However, in some cases, the electronic device 200 may have loopholes in judging the vehicle operation data or fail to judge the vehicle operation data, and still send a flash request to the ECU. At this time, the first ECU will also respond to the flash request to flash the firmware, which will cause the firmware flash failure, damage the vehicle ECU, and even cause vehicle failure.

[0062] In response to the defects existing in the above-mentioned firmware flashing, the embodiments of the present application provide a firmware flashing method and device, which can enable the vehicle ECU to autonomously determine whether the vehicle operating status meets the firmware flashing conditions, thereby solving the problem of forcibly flashing the vehicle ECU when the vehicle operating status does not meet the flashing conditions, improving the success rate of the vehicle ECU flashing, making the vehicle ECU flashing process more stable, and further avoiding vehicle failures.

[0063] Please refer to Figure 2 , Figure 2 A flowchart of a firmware flashing method provided in an embodiment of the present application. Exemplarily, the method can be based on Figure 1 The method is implemented by the application scenario shown in the figure, and includes but is not limited to the following steps:

[0064] S201: A first electronic control unit ECU receives a flashing request sent by an electronic device;

[0065] Wherein, the first electronic control unit ECU is configured on the target vehicle.

[0066] Specifically, when the ECU to be flashed, that is, the first ECU, needs to be flashed, the electronic device 200 sends a flash request to the vehicle-mounted device 101, wherein the flash request includes the flash address and the byte size of the flash data, and the flash request is used to inform the ECU to be flashed to prepare to receive the flash data. Then, the vehicle-mounted device 101 determines to flash the first ECU among multiple ECUs according to the flash address in the flash request, for example, to flash the gearbox ECU, and determines whether the storage space of the gearbox ECU meets the byte size of the flash data according to the byte size of the flash data. Finally, the vehicle-mounted device 101 sends the flash request to the first ECU, and the first ECU responds to the flash request and controls the low-voltage power-on of the entire vehicle to complete the initialization of each ECU.

[0067] S202: The first ECU obtains a preset flashing judgment condition according to the flashing request, wherein the preset flashing judgment condition includes at least one parameter criterion acquisition method and a parameter criterion judgment condition.

[0068] The at least one parameter criterion refers to the parameters generated by various components of the target vehicle during the operation of the target vehicle, such as the real-time position of the target vehicle, the start and stop of the transmitter, the engine temperature, the engine speed, the battery voltage, the gear position of the gearbox, etc. The at least one parameter criterion is used to determine whether the operating state of the target vehicle meets the firmware flashing conditions.

[0069] Wherein, the preset judgment flashing condition includes: at least one parameter criterion acquisition method, parameter criterion judgment condition, and at least one corresponding relationship between parameter criterion and parameter criterion judgment condition. For example, the parameter criterion and the parameter criterion judgment relationship can be matched by the name of the parameter, such as the voltage parameter criterion corresponding to the voltage parameter criterion judgment condition. The preset judgment flashing condition is used to determine whether the target vehicle operating state meets the firmware flashing condition. Wherein, the preset judgment flashing condition can be saved in the storage unit of each ECU when each ECU leaves the factory.

[0070] Specifically, the at least one parameter criterion acquisition method includes: at least one parameter type, at least one parameter acquisition instruction, at least one parameter calculation algorithm, and a correspondence between the at least one parameter type and the at least one parameter acquisition instruction, and between the at least one parameter type and the at least one parameter calculation algorithm. The at least one parameter criterion acquisition method is used to determine how to acquire the at least one parameter criterion.

[0071] Among them, the at least one parameter type refers to: the type of parameters generated by each component of the target vehicle during the operation of the target vehicle, and one parameter type corresponds to one parameter criterion. For example, at least one parameter type may include voltage, vehicle speed, ignition state, etc., and the corresponding parameter criteria are voltage 12V, vehicle speed 40km / h, and ignition state is start state. The at least one parameter acquisition instruction is used to obtain a parameter criterion corresponding to each of the parameter types, and one parameter criterion corresponds to one parameter acquisition instruction. For example, the voltage parameter criterion of the target vehicle is obtained through the 0x07e12201 instruction, wherein 0x07e1 indicates that the parameter criterion is read from the battery ECU, and 0x2201 indicates that the parameter type of the read target parameter criterion is a voltage parameter. The at least one parameter calculation algorithm is used to calculate the bytes of a target parameter criterion corresponding to each of the parameter types as a specific parameter of a target parameter criterion, and one parameter criterion corresponds to one parameter calculation algorithm. For example, if the voltage target parameter criterion obtained from the target vehicle is in the form of bytes, then the calculation algorithm corresponding to the voltage parameter Y=X*36 / 255, where X is the byte value of the voltage target parameter criterion collected by the first ECU, and Y is the specific parameter value corresponding to the voltage target parameter criterion, can be used to calculate the bytes of the target parameter criterion into the specific parameter value of the target parameter criterion. The specific parameter value of the parameter criterion calculated by at least one parameter calculation algorithm is used to compare with the above parameter criterion judgment condition.

[0072] Specifically, the parameter criterion judgment condition refers to the reference range value corresponding to the at least one parameter criterion when the firmware flashing condition is met. The parameter criterion judgment condition is used to judge whether the at least one parameter criterion meets the firmware flashing condition. In an embodiment of the present application, the parameter criterion judgment condition may be one or a combination of a numerical range, a threshold value or an operating state. For example, when the parameter criterion is a voltage parameter, the parameter criterion judgment condition corresponding to the voltage parameter criterion may be whether the voltage is between 11.5V-14V; when the parameter criterion is a power parameter, the parameter criterion judgment condition corresponding to the power parameter criterion may be whether the power is greater than 50% of the total power; when the parameter criterion is an ignition state, the parameter criterion judgment condition corresponding to the ignition state parameter criterion may be whether the engine is started.

[0073] S203: The first ECU obtains at least one target parameter criterion from the target vehicle according to the at least one parameter criterion obtaining method;

[0074] Among them, the target parameter criterion refers to the parameter criterion of a specific parameter type, that is, when determining the first ECU, at least one target parameter criterion to be obtained can be determined according to the at least one parameter type stored in the first ECU. For example, when the first ECU is a transmission ECU, the target parameter criterion to be obtained is determined to be a voltage parameter value, a power parameter value, a vehicle speed parameter value, and an ignition state parameter value according to at least one parameter criterion type stored in the transmission ECU; when the first ECU is an engine ECU, the target parameter criterion to be obtained is determined to be a voltage parameter value, a vehicle speed parameter value, and an ignition state parameter value according to at least one parameter criterion type stored in the engine ECU. The second ECU refers to the ECU that generates the at least one target parameter criterion. For example, the at least one target parameter criterion corresponding to the transmission ECU is a voltage parameter value, a power parameter value, a vehicle speed parameter value, and an ignition state parameter value. Then, the ECU that generates the above target parameter criterion is called the second ECU, which is a battery ECU, an ABS ECU, and an electronic ignition ECU.

[0075] Optionally, before step S203, the following steps are included:

[0076] a) the first ECU determines the parameter type of the at least one target parameter criterion according to the at least one parameter criterion acquisition method;

[0077] Specifically, one of the target parameter criteria corresponds to one of the parameter types, that is, according to the parameter type of the at least one target parameter criterion in the at least one parameter criterion acquisition method, it can be determined which types of target parameter criteria need to be acquired. For example, the transmission ECU contains at least one parameter type: voltage, power, vehicle speed and ignition state, then the corresponding target parameter criteria that need to be acquired are: voltage parameter value, power parameter value, vehicle speed parameter value and ignition state parameter value.

[0078] b) the first ECU determines at least one second ECU according to the parameter type;

[0079] Among them, the second ECU refers to the ECU that generates the at least one target parameter criterion. The first ECU determines which types of target parameter criteria need to be obtained based on the at least one parameter type; then, the first ECU determines which second ECU each target parameter criterion should be obtained from based on the parameter type of the target parameter criterion. Exemplarily, the preset judgment flashing condition includes the correspondence between the at least one parameter type and the at least one second ECU. For example, the transmission ECU contains at least one parameter type: voltage, power, vehicle speed and ignition status. Then, according to the corresponding relationship, it can be determined that the voltage parameter value and the power parameter value are obtained from the battery ECU, the vehicle speed parameter value is obtained from the ABS ECU, and the ignition status parameter value is obtained from the electronic ignition ECU.

[0080] In the implementation of the present application, one parameter type may correspond to one second ECU, for example, the ignition status parameter type corresponds to the electronic ignition ECU; or multiple parameter types may correspond to one second ECU, for example, the voltage parameter type and the power parameter type correspond to the battery ECU.

[0081] c) The first ECU establishes a communication connection with each of the at least one second ECU.

[0082] It can be understood that before obtaining at least one target parameter criterion, the correspondence between the parameter type of each target parameter criterion and each second ECU is determined, and then a communication connection is established with each determined second ECU. In this way, loopholes in the judgment of vehicle operating conditions can be avoided, the accuracy of obtaining vehicle operating parameters is improved, and the reliability of the judgment of flashing conditions is ensured.

[0083] Optionally, the step S203 specifically includes:

[0084] a) the first ECU sends a second message to each second ECU in the at least one second ECU according to the parameter type of the at least one target parameter criterion, wherein the second message includes the parameter type corresponding to each second ECU;

[0085] Exemplarily, the second message includes the at least one parameter acquisition instruction corresponding to the parameter type of the at least one target parameter criterion. In an embodiment of the present invention, the second message may include one parameter type or multiple parameter types corresponding to each second ECU.

[0086] For example, when the transmission ECU determines that the parameter type of the target parameter criterion is vehicle speed according to at least one parameter type, the transmission ECU sends a second message 0x04e13101 to the ABS ECU, where 0x4e1 indicates that the parameter criterion is read from the ABS ECU, and 0x3101 indicates that the parameter type read is the vehicle speed parameter criterion. For another example, when the transmission ECU determines that the parameter type of the target parameter criterion is voltage and power according to at least one parameter type, the transmission ECU sends a second message 0x07e12201 and 0x07e12301 to the battery ECU, where 0x7e1 indicates that the parameter criterion is read from the battery ECU, 0x2201 indicates that the parameter type read is the voltage parameter criterion, and 0x2301 indicates that the parameter type read is the power parameter criterion.

[0087] b) The first ECU receives a third message sent by each of the second ECUs, where the third message includes a target parameter criterion corresponding to each of the second ECUs.

[0088] Specifically, after each of the second ECUs receives the second message, each of the second ECUs fills the bytes of at least one target parameter criterion corresponding to the parameter type of the at least one target parameter criterion into the third message according to the parameter type of the at least one target parameter criterion contained in the second message, and sends the third message to the first ECU. Exemplarily, the third message includes at least one parameter reply instruction corresponding to the parameter type of the at least one target parameter criterion. In an embodiment of the present invention, the third message may include one target parameter criterion or multiple target parameter criterions in each of the second ECUs.

[0089] For example, after the engine ECU receives the second message from the transmission ECU, it determines that the parameter type of the target parameter criterion to be obtained is vehicle speed, then fills the collected bytes of the vehicle speed parameter criterion into the third message, and sends the third message 0x04e2310170 to the transmission ECU, where 0x04e2 represents the reply data from the engine ECU, 0x3101 represents the reply parameter type is vehicle speed parameter criterion, and 0x70 represents that the vehicle speed parameter criterion is 70 bytes. For another example, after the battery ECU receives the second message from the transmission ECU, it determines that the parameter types of the target parameter criteria to be obtained are voltage parameters and power, then the collected bytes of the voltage parameter criterion and the bytes of the power parameter criterion are filled in the third message, and the third messages 0x07e2220160 and 0x07e2230170 are sent to the transmission ECU, where 0x07e2 represents the reply data from the battery ECU, 0x2201 represents the reply parameter type is the voltage parameter criterion, and 0x60 represents the voltage parameter criterion is 60 bytes; 0x2301 represents the reply parameter type is the power parameter criterion, and 0x70 represents the power parameter criterion is 70 bytes.

[0090] It can be understood that the vehicle operation data is obtained through the second message and the third message, wherein the second message and the third message both correspond to the parameter type. In this way, loopholes in the judgment of vehicle operating conditions can be avoided, the accuracy of obtaining vehicle operating parameters is improved, and the reliability of firmware flashing is ensured.

[0091] S204: The first ECU determines whether the at least one target parameter criterion satisfies the parameter criterion determination condition.

[0092] Specifically, based on the correspondence between at least one parameter criterion in the preset judgment and writing condition and at least one parameter criterion judgment condition, each of the target parameter criterion is judged. In an embodiment of the present application, the at least one parameter criterion judgment condition may be one or a combination of a numerical range, a threshold value or an operating state.

[0093] For example, the voltage parameter criterion is 13.55V. According to the corresponding relationship, the parameter criterion judgment condition corresponding to the voltage parameter judgment is whether the voltage is between 11.5V-14V, thereby determining that the voltage parameter judgment meets the flashing condition; the power parameter criterion is 80% of the total power. According to the corresponding relationship, the parameter criterion judgment condition corresponding to the power parameter judgment is whether the power is greater than 50% of the total power, thereby determining that the power parameter judgment meets the flashing condition; the ignition state parameter judgment is the starting state. According to the corresponding relationship, the parameter criterion judgment condition corresponding to the ignition state parameter judgment is whether the engine is started, thereby determining that the ignition state parameter judgment meets the flashing condition.

[0094] Optionally, the step S204 may include: comparing each target parameter criterion with the parameter criterion judgment condition corresponding to each target parameter criterion in turn, until each target parameter criterion is judged.

[0095] Optionally, the step S204 may further include: comparing each target parameter criterion with the parameter criterion judgment condition corresponding to each target parameter criterion in turn, and when it is determined that there is a target parameter criterion that does not meet the corresponding parameter criterion judgment condition, stopping the judgment process.

[0096] It is understandable that, for the ECU, by comparing each of the target parameter criteria, the target parameter criteria that do not meet the parameter criterion judgment conditions can be further screened according to the comparison results, and the target parameter criteria that do not meet the parameter criterion judgment conditions can be detected and controlled. When the target parameter criteria that do not meet the parameter criterion judgment conditions meet the flashing conditions, a flashing request is made again, thereby improving the data flashing efficiency. For the vehicle user, when there is a target parameter criterion that does not meet the parameter criterion judgment conditions, the judgment is stopped, and the user can be informed of a message prohibiting flashing, thereby reducing the user's waiting time.

[0097] Optionally, the at least one target parameter criterion is represented as bytes. Therefore, in an embodiment of the present application, before determining whether the at least one target parameter criterion satisfies the parameter criterion determination condition, the first ECU may calculate the bytes of the target parameter criterion in the third message as specific parameters of the target parameter criterion through the at least one parameter calculation algorithm, and then determine whether the specific parameters of the target parameter criterion satisfy the parameter criterion determination condition.

[0098] Specifically, after the first ECU receives the third message, it determines the parameter calculation algorithm corresponding to each third message according to the parameter type of the target parameter criterion contained in each third message. Exemplarily, the preset judgment flashing condition includes the correspondence between the at least one parameter type and the at least one parameter calculation algorithm. Then, the first ECU calculates the bytes of the target parameter criterion in each third message as specific parameters according to the parameter calculation algorithm corresponding to each third message. In an embodiment of the present application, the specific parameter can be a specific value or an operating state.

[0099] For example, after the transmission ECU receives the third message 0x07e2220160 from the battery ECU, first, the transmission ECU determines that the parameter type of the target parameter criterion obtained is voltage data according to 0x220160 in the third message, and the voltage parameter criterion is 60 bytes; then, the transmission ECU determines that the parameter calculation algorithm corresponding to the voltage parameter criterion is Y=X*36 / 255 based on the correspondence between the at least one parameter type and the at least one parameter calculation algorithm in the preset judgment and writing conditions; finally, the transmission ECU calculates the specific parameter of the voltage parameter criterion as 13.55V according to the voltage parameter data byte 60 and the corresponding voltage parameter calculation algorithm Y=X*36 / 255.

[0100] It can be understood that, on the one hand, the target parameter criterion bytes are converted into specific parameters through the calculation algorithm; on the other hand, each calculation algorithm corresponds to the parameter type. In this way, loopholes in the target parameter criterion judgment can be avoided, the accuracy of target parameter criterion acquisition and comparison is improved, and the reliability of firmware flashing is ensured.

[0101] S205: When the at least one target parameter criterion all satisfies the parameter criterion judgment conditions, the first ECU flashes the firmware.

[0102] Optionally, the step S205 may further include:

[0103] a) the first ECU sends a first message to the electronic device, the first message being used to indicate that the at least one target parameter criterion all satisfies the parameter criterion judgment condition;

[0104] Specifically, when the first ECU determines that the at least one target parameter criterion all satisfies the parameter criterion judgment condition, that is, the first ECU determines that the vehicle operation state satisfies the vehicle ECU flashing condition, the first ECU sends a first message to the electronic device, and the first message may be a request data instruction, a diagnosis completion instruction, etc., for indicating that the at least one target parameter criterion all satisfies the parameter criterion judgment condition. After receiving the first message, the electronic device transmits the flashing data to the first ECU.

[0105] b) The first ECU receives the flashing data sent by the terminal device, and flashes the firmware according to the flashing data.

[0106] For example, the first ECU receives the flash data and stores it in a storage unit of the first ECU. According to the flash data, the first ECU flashes the firmware. For example, the transmission ECU sends a first message 0x74 to the electronic device, indicating that the transmission ECU allows the flash data transmission and the byte size of the flash data that the transmission ECU can store.

[0107] It can be understood that the first ECU sends a first message to the electronic device to indicate that the vehicle meets the flashing conditions, and the electronic device will send the flashing data to the first ECU. In this way, the problem of sending the flashing data to the first ECU when the flashing conditions are not met can be avoided, the storage process of the flashing data in the vehicle ECU can be reduced, the vehicle ECU storage space is saved, and the stability of the vehicle operation is further guaranteed.

[0108] S206: When the at least one target parameter criterion does not fully satisfy the parameter criterion judgment condition, the first ECU prohibits flashing the firmware.

[0109] Specifically, when one or more or all of the at least one target parameter criterion do not meet the parameter criterion judgment condition, it is determined that the running state of the vehicle does not meet the firmware flashing condition, and at this time, the first ECU sends a flashing prohibition instruction to the electronic device. Exemplarily, the flashing prohibition instruction can be an instruction requesting to exit or an instruction requesting to wait.

[0110] It can be understood that when not all target parameter criteria meet the flashing conditions, that is, one or more target parameter criteria do not meet the flashing conditions, the first ECU prohibits flashing the firmware. In this way, the problem of forcibly flashing the firmware when the vehicle operating conditions do not meet the flashing conditions is avoided, the success rate of firmware flashing is improved, and vehicle ECU or vehicle failure is further avoided.

[0111] Optionally, after step S206, the method may further include: the first ECU sending a fourth message to the electronic device, wherein the fourth message is used to indicate a target parameter criterion among the at least one target parameter criterion that does not satisfy the parameter criterion judgment condition.

[0112] Specifically, the first ECU determines that one of the at least one target parameter criteria does not meet the parameter criterion determination condition, generates an error code according to the parameter type corresponding to the target parameter criterion that does not meet the parameter criterion determination condition, and generates a fourth message based on the error code. Exemplarily, the preset judgment and flashing condition includes a correspondence between at least one parameter type and at least one error code. Furthermore, the first ECU sends the fourth message to the electronic device, and the electronic device determines which target parameter criteria do not meet the flashing condition by parsing the error code in the fourth message.

[0113] For example, if the transmission ECU determines that the vehicle speed parameter criterion does not meet the firmware flashing conditions of the transmission ECU, the error code 0x7F37310170 corresponding to the vehicle speed parameter criterion is filled into the fourth message, and the fourth message is sent to the electronic device. After receiving the fourth message, the electronic device parses the error code 0x7F37310170 and further determines that the vehicle speed parameter criterion does not meet the firmware flashing conditions of the transmission ECU.

[0114] It is understandable that when the at least one target parameter criterion does not fully satisfy the parameter criterion judgment condition, the first ECU sends a fourth message to the electronic device, indicating the target parameter criterion that does not satisfy the parameter criterion judgment condition among the at least one target parameter criterion. According to the fourth message, the terminal device or the vehicle factory personnel can monitor or adjust the target parameter criterion that does not satisfy the parameter criterion judgment condition, and when the target parameter criterion that does not satisfy the parameter criterion judgment condition satisfies the parameter criterion judgment condition, the electronic device sends a flashing request to the first ECU again. In this way, the vehicle operation status detection steps can be reduced and the flashing efficiency of the vehicle ECU can be improved.

[0115] In order to more clearly illustrate a firmware flashing method provided in the embodiment of the present application. Figure 3 , Figure 3 An interactive diagram of a firmware flashing method provided in an embodiment of the present application. Exemplarily, the method can be based on Figure 1 The method is implemented by the application scenario shown in the figure, and includes but is not limited to the following steps:

[0116] S301: A first electronic control unit ECU receives a flashing request sent by an electronic device;

[0117] S302: The first ECU obtains a preset flashing judgment condition according to the flashing request, wherein the preset flashing judgment condition includes at least one parameter criterion acquisition method and a parameter criterion judgment condition;

[0118] S303: The first ECU determines a parameter type of at least one target parameter criterion according to the at least one parameter criterion acquisition method;

[0119] S304: The first ECU determines at least one second ECU according to the parameter type of the at least one target parameter criterion;

[0120] S305: The first ECU establishes a communication connection with the at least one second ECU;

[0121] S306: The first ECU sends a second message to each second ECU in the at least one second ECU according to the parameter type of the at least one target parameter criterion, where the second message includes the parameter type corresponding to each second ECU;

[0122] S307: The first ECU receives a third message sent by each second ECU, where the third message includes bytes of target parameter criteria corresponding to each second ECU;

[0123] S308: The first ECU calculates the bytes of at least one target parameter criterion into specific parameters of at least one target parameter criterion according to at least one parameter calculation algorithm;

[0124] S309: The first ECU determines that all specific parameters of each target parameter criterion among the specific parameters of the at least one target parameter criterion satisfy the parameter criterion judgment condition;

[0125] S310: The first ECU sends a first message to the electronic device, where the first message is used to indicate that the at least one target parameter criterion all satisfies the parameter criterion judgment condition;

[0126] S311: The first ECU receives the flashing data sent by the electronic device;

[0127] S312: The first ECU flashes the firmware according to the flashing data.

[0128] The above steps and Figure 3 The implementation method of the method steps shown in is the same, and the details can be referred to above Figure 3 The response description of the implementation method shown in is not repeated here.

[0129] The method of the embodiment of the present application is described in detail above, and the device of the embodiment of the present application is provided below.

[0130] Please refer to Figure 4 , Figure 4A schematic diagram of the structure of a firmware flashing device provided in an embodiment of the present application, the device includes an acquisition unit 401, a processing unit 402, a receiving unit 403 and a sending unit 404. The receiving unit 403 and the sending unit 404 can communicate with the outside, and the processing unit 402 is used to process data. The receiving unit 403 and the sending unit 404 can also be referred to as a communication interface, a transceiver unit or a transceiver module (including a receiving unit and / or a sending unit). The receiving unit 403 and the sending unit 404 can be used to execute the actions performed by the first ECU in the above method embodiment. In one possible design, the firmware flashing device can implement the steps or processes executed by the first ECU in the above method embodiment, for example, it can be the first ECU, or a chip or circuit configured in the first ECU. Among them, the detailed description of each unit is as follows:

[0131] The receiving unit 403 is used to receive a flashing request sent by an electronic device;

[0132] The acquisition unit 401 is used to acquire a preset flashing judgment condition according to the flashing request, wherein the preset flashing judgment condition includes at least one parameter judgment acquisition method and a parameter judgment judgment condition;

[0133] The acquisition unit 401 is further configured to acquire at least one target parameter criterion from the target vehicle according to the at least one parameter criterion acquisition method;

[0134] The processing unit 402 is used to determine whether the at least one target parameter criterion satisfies the parameter criterion judgment condition; when the at least one target parameter criterion fully satisfies the parameter criterion judgment condition, the firmware is flashed.

[0135] In one possible implementation, the sending unit 404 is used to send a first message to the electronic device, wherein the first message is used to indicate that the at least one target parameter criterion all satisfies the parameter criterion judgment condition; the processing unit 402 is also used to receive the flash data sent by the electronic device; and the firmware is flashed according to the flash data.

[0136] In one possible implementation, the processing unit 402 is further used to determine the parameter type of the at least one target parameter criterion according to the at least one parameter criterion acquisition method; determine at least one second ECU according to the parameter type, and establish a communication connection with the at least one second ECU.

[0137] In one possible implementation, the sending unit 404 is further used to send a second message to each second ECU in the at least one second ECU according to the parameter type of the at least one target parameter criterion, wherein the second message includes the parameter type corresponding to each second ECU; the receiving unit 403 is further used to receive a third message sent by each second ECU, wherein the third message includes the target parameter criterion corresponding to each second ECU.

[0138] In a possible implementation, the processing unit 402 is further configured to prohibit flashing the firmware when the at least one target parameter criterion does not fully satisfy the parameter criterion judgment condition.

[0139] In a possible implementation, the sending unit 404 is further configured to send a fourth message to the electronic device, where the fourth message is used to indicate a target parameter criterion among the at least one target parameter criterion that does not satisfy the parameter criterion judgment condition.

[0140] It should be noted that the implementation and beneficial effects of each unit can also refer to Figure 2 or Figure 3 The corresponding description of the method embodiment shown.

[0141] See also Figure 5 , Figure 5 is a schematic diagram of the structure of an electronic control unit ECU provided in an embodiment of the present application. The firmware flashing device can be applied to Figure 1 In the scenario shown, the functions of the first ECU in the above method embodiment are executed, or the steps or processes executed by the first ECU in the above method embodiment are implemented.

[0142] like Figure 5 As shown, the firmware flashing device includes a processor 501 and a transceiver 502. Optionally, the firmware flashing device also includes a memory 503. The processor 501, the transceiver 502 and the memory 503 can be connected to each other through a communication bus 504 to transmit control and / or data signals. The memory 503 is used to store computer programs, and the processor 501 is used to call and run the computer program from the memory 503 to control the transceiver 502 to send and receive signals. Optionally, the firmware flashing device may also include an antenna for sending the uplink data or uplink control signaling output by the transceiver 502 through a wireless signal.

[0143] The processor 501 and the memory 503 may be combined into a processing device, and the processor 501 is used to execute the program code stored in the memory 503 to implement the above functions. In specific implementation, the memory 503 may also be integrated into the processor 501, or independent of the processor 501. Figure 4 The processing units in correspondence.

[0144] The transceiver 502 can be used with Figure 4 The receiving unit and the sending unit in correspondence. The transceiver 502 may include a receiver (or receiver, receiving circuit) and a transmitter (or transmitter, transmitting circuit). The receiver is used to receive signals, and the transmitter is used to transmit signals.

[0145] It should be understood that Figure 5 The firmware flashing device shown is capable of Figure 2 or Figure 3 The illustrated method embodiment involves various processes of the first ECU. The operations and / or functions of various modules in the firmware flashing device are respectively to implement the corresponding processes in the above method embodiment. For details, please refer to the description in the above method embodiment. To avoid repetition, the detailed description is appropriately omitted here.

[0146] The processor 501 can be used to execute the actions implemented by the first ECU described in the previous method embodiment, and the transceiver 502 can be used to execute the actions of the first ECU sending or receiving instructions or messages to or from the terminal device and the second ECU described in the previous method embodiment. Please refer to the description in the previous method embodiment for details, which will not be repeated here.

[0147] Among them, the processor 501 can be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It can implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the contents disclosed in this application. The processor 501 can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a digital signal processor and a microprocessor, and so on. The communication bus 504 can be a peripheral component interconnect standard PCI bus or an extended industrial standard structure EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5Only one thick line is used to represent it, but it does not mean that there is only one bus or one type of bus. The communication bus 504 is used to realize the connection communication between these components. Among them, the transceiver 502 in the embodiment of the present application is used to communicate signaling or data with other node devices. The memory 503 may include volatile memory, such as nonvolatile dynamic random access memory (NVRAM), phase change random access memory (PRAM), magnetoresistive random access memory (MRAM), etc., and may also include non-volatile memory, such as at least one disk storage device, electronically erasable programmable read-only memory (EEPROM), flash memory devices, such as NOR flash memory or NAND flash memory, semiconductor devices, such as solid state disk (SSD), etc. The memory 503 may also be at least one storage device located away from the aforementioned processor 501. The memory 503 may also optionally store a set of computer program codes or configuration information. Optionally, the processor 501 may also execute a program stored in the memory 503. The processor may cooperate with the memory and the transceiver to execute any method and function of the firmware flashing device in the above-mentioned application embodiment.

[0148] The embodiment of the present application also provides a firmware flashing device, including a processor and an interface. The processor can be used to execute the method in the above method embodiment.

[0149] It should be understood that the firmware flashing device can be a chip. For example, the firmware flashing device can be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD) or other integrated chips.

[0150] In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in a processor or an instruction in the form of software. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware processor, or a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware. To avoid repetition, it is not described in detail here.

[0151] It should be noted that the processor in the embodiment of the present application can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method embodiment can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or the hardware and software modules in the decoding processor can be combined and performed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0152] According to the method provided in the embodiment of the present application, the embodiment of the present application also provides a firmware flashing system, the system includes a first ECU, and the first ECU is used to execute the method in the above method embodiment.

[0153] According to the method provided in the embodiment of the present application, the embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method in the above method embodiment is implemented.

[0154] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a high-density digital video disc (DVD)), or a semiconductor medium (eg, a solid state disc (SSD)).

[0155] Those of ordinary skill in the art will appreciate that the various illustrative logical blocks and steps described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or in a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0156] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0157] If the functions are implemented in the form of 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 the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a positioning server, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.

[0158] The specific implementation methods described above further illustrate the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only the specific implementation method of the present application and is not intended to limit the scope of protection of the present application. Any modifications, replacements, improvements, etc. made on the basis of the technical solutions of the present application should be included in the scope of protection of the present application.

Claims

1. A firmware flashing method, characterized in that: include: A first electronic control unit ECU receives a flashing request sent by an electronic device, wherein the first ECU is configured on a target vehicle; The first ECU obtains a preset flashing judgment condition according to the flashing request, wherein the preset flashing judgment condition includes at least one parameter criterion acquisition method and a parameter criterion judgment condition; The first ECU determines a parameter type of at least one target parameter criterion according to the at least one parameter criterion acquisition method; The first ECU determines at least one second ECU according to a parameter type of the at least one target parameter criterion; The first ECU establishes a communication connection with the at least one second ECU; The first ECU sends a second message to each second ECU in the at least one second ECU according to the parameter type of the at least one target parameter criterion, wherein the second message includes the parameter type corresponding to each second ECU; The first ECU receives a third message sent by each second ECU, wherein the third message includes bytes of target parameter criteria corresponding to each second ECU; The first ECU calculates bytes of at least one target parameter criterion into specific parameters of at least one target parameter criterion according to at least one parameter calculation algorithm; The first ECU determines that all specific parameters of each target parameter criterion among the specific parameters of the at least one target parameter criterion satisfy the parameter criterion judgment condition; The first ECU sends a first message to the electronic device, the first message being used to indicate that the at least one target parameter criterion all satisfies the parameter criterion judgment condition; The first ECU receives the flashing data sent by the electronic device; The first ECU flashes the firmware according to the flashing data.

2. The method according to claim 1, characterized in that The method further comprises: When the at least one target parameter criterion does not fully satisfy the parameter criterion judgment condition, the first ECU prohibits flashing the firmware.

3. The method according to claim 2, characterized in that After the first ECU prohibits flashing the firmware, it includes: The first ECU sends a fourth message to the electronic device, where the fourth message is used to indicate a target parameter criterion among the at least one target parameter criterion that does not satisfy the parameter criterion judgment condition.

4. A firmware flashing device, characterized in that: include: A receiving unit, used for receiving a flashing request sent by an electronic device; An acquisition unit, configured to acquire a preset flashing judgment condition according to the flashing request, wherein the preset flashing judgment condition includes at least one parameter criterion acquisition method and a parameter criterion judgment condition; The acquisition unit is further used to acquire at least one target parameter criterion from the target vehicle according to the at least one parameter criterion acquisition method; A processing unit, configured to determine whether the at least one target parameter criterion satisfies the parameter criterion determination condition; and when the at least one target parameter criterion satisfies all the parameter criterion determination conditions, flash the firmware; The processing unit is further configured to determine a parameter type of at least one target parameter criterion according to the at least one parameter criterion acquisition method; determine at least one second ECU according to the parameter type of the at least one target parameter criterion, and establish a communication connection with the at least one second ECU; a sending unit, configured to send a second message to each second ECU in the at least one second ECU according to the parameter type of the at least one target parameter criterion, wherein the second message includes the parameter type corresponding to each second ECU; The receiving unit is further used to receive a third message sent by each second ECU, wherein the third message includes bytes of target parameter criteria corresponding to each second ECU; The processing unit is further configured to calculate the bytes of at least one target parameter criterion into specific parameters of at least one target parameter criterion according to at least one parameter calculation algorithm; and determine that all specific parameters of each target parameter criterion in the specific parameters of the at least one target parameter criterion satisfy the parameter criterion determination condition; The sending unit is further used to send a first message to the electronic device, where the first message is used to indicate that the at least one target parameter criterion all satisfies the parameter criterion judgment condition; The processing unit is further used to receive the flashing data sent by the electronic device; and flash the firmware according to the flashing data.

5. An electronic control unit ECU, characterized in that: The ECU is used to execute the method according to any one of claims 1 to 3.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • OTA vehicle upgrading execution condition dynamic configuration method

    CN112188417A