Remote upgrade method, device, system and device end connector
After receiving the data transmission command from the diagnostic device at the device end connector, it feeds back the response command to the diagnostic device on behalf of the vehicle, which solves the problem of remote upgrade failure caused by network delay and congestion, and improves the success rate of remote upgrade.
Patent Information
- Application Number
- CN202210454785.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-24
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2042-04-24
AI Technical Summary
During the remote upgrade process of the vehicle electronic control unit, due to network delay fluctuations and network congestion, the diagnostic equipment was unable to receive the vehicle's response command in time, causing the remote upgrade to fail.
When the device-side connector receives the data packet of the i-th data transfer command among the first N data transfer commands sent by the diagnostic device, it is sent to the vehicle-side connector and receives the first response from the vehicle-side connector. Order. When the first N first response commands received are the same, the first response command is fed back to the diagnostic device on behalf of the vehicle to ensure that the diagnostic device receives the response command in a timely manner.
It effectively reduces the risk of ECU program remote upgrade failure. Even if the network is poor, the first response command can be received in time to ensure the success of the remote upgrade.
Smart Images

Figure CN114866585B
Abstract
Description
Technical Field
[0001] The present application belongs to the field of vehicle technology, and in particular, relates to a remote upgrade method, a remote upgrade device, a remote upgrade system, a device end connector and a computer-readable storage medium for a vehicle electronic control unit. Background Art
[0002] The remote upgrade technology of the vehicle's Electronic Control Unit (ECU) allows car owners to upgrade the vehicle's ECU program by remotely communicating with the vehicle through diagnostic equipment without having to drive the vehicle to a repair center. However, during the remote upgrade process, the vehicle's response to the command of the diagnostic equipment often times out due to network delay fluctuations and / or network congestion, resulting in remote upgrade failure. Summary of the invention
[0003] In view of this, the present application provides a remote upgrade method, a remote upgrade device, a device-end connector and a remote upgrade system for a vehicle electronic control unit, which can effectively reduce the risk of failure of remote upgrade of ECU programs when the network is poor.
[0004] In a first aspect, the present application provides a remote upgrade method for a vehicle electronic control unit, which is applied to a device-side connector, comprising:
[0005] When receiving a data packet corresponding to the ith data transmission command among the first N data transmission commands sent by the diagnostic device, sending the data packet corresponding to the ith data transmission command to the vehicle end connector, N≥2, 0<i≤N;
[0006] receiving the i-th first response command sent by the vehicle end connector, where the i-th first response command is a command fed back by the vehicle in response to the data packet corresponding to the i-th data transmission command;
[0007] In the case where the first N received first response commands are identical, when a data packet corresponding to the j-th data transmission command sent by the diagnostic device is received, sending the first response command to the diagnostic device, j>N; and
[0008] The data packet corresponding to the j-th data transmission command is sent to the vehicle end connector to instruct the vehicle end connector to send the data packet corresponding to the j-th data transmission command to the vehicle, and the data packet is used to realize remote upgrade of the electronic control unit.
[0009] Optionally, the remote upgrade method further includes:
[0010] Counting the number of unprocessed data packets, wherein each time the device end connector receives a data packet sent by the diagnostic device, the number of unprocessed data packets increases by one, and each time the device end connector receives a first response command sent by the vehicle end connector, the number of unprocessed data packets decreases by one;
[0011] Determine the target duration based on the number of unprocessed data packets;
[0012] Starting from the moment when the data packet corresponding to the j-th data transmission command is received, the first response command is sent to the diagnostic device after delaying the target time.
[0013] Optionally, if the target duration is greater than a preset duration threshold, the remote upgrade method further includes:
[0014] A first timeout extension command is sent to the diagnostic device, where the first timeout extension command is used to instruct the diagnostic device to extend the time for waiting for the first response command, and the time length threshold is less than the time for waiting for the first response command before the extension.
[0015] Optionally, the remote upgrade method further includes:
[0016] In the case that the first N received first response commands are different, when a data packet corresponding to the j-th data transmission command sent by the diagnostic device is received, the data packet corresponding to the j-th data transmission command is sent to the vehicle end connector;
[0017] When the first response command fed back by the vehicle is received from the vehicle end connector, the first response command fed back by the vehicle is sent to the diagnostic device.
[0018] Optionally, after sending the data packet corresponding to the j-th data transmission command to the vehicle end connector, the remote upgrade method further includes:
[0019] When the first response command fed back by the vehicle is received from the vehicle end connector, the first response command fed back by the vehicle is discarded.
[0020] Optionally, the remote upgrade method further includes:
[0021] When receiving the verification command sent by the diagnostic device, sending the verification command to the vehicle end connector to instruct the vehicle end connector to send the verification command to the vehicle, wherein the verification command is used to instruct the vehicle to verify whether the data packet for the remote upgrade is received completely; and
[0022] A second timeout extension command is sent to the diagnostic device, where the second timeout extension command is used to instruct the diagnostic device to extend the time for waiting for a second response command, where the second response command is a response command that the vehicle needs to feedback when receiving the verification command.
[0023] Optionally, after sending the verification command to the vehicle end connector, the remote upgrade method further includes:
[0024] When a second response command fed back by the vehicle based on the verification command is received from the vehicle end connector, the second response command is sent to the diagnostic device.
[0025] In a second aspect, the present application provides a remote upgrade device for a vehicle electronic control unit, which is applied to a device-side connector, comprising:
[0026] A first sending unit is used to send the data packet corresponding to the i-th data transmission command among the first N data transmission commands sent by the diagnostic device to the vehicle end connector when receiving the data packet corresponding to the i-th data transmission command, N≥2, 0<i≤N;
[0027] A first receiving unit, configured to receive an i-th first response command sent by the vehicle-end connector, wherein the i-th first response command is a command fed back by the vehicle in response to a data packet corresponding to the i-th data transmission command;
[0028] A second sending unit is configured to send the first response command to the diagnostic device when receiving a data packet corresponding to the j-th data transmission command sent by the diagnostic device, if the first N received first response commands are the same, where j>N;
[0029] The third sending unit is used to send the data packet corresponding to the j-th data transmission command to the vehicle end connector to instruct the vehicle end connector to send the data packet corresponding to the j-th data transmission command to the vehicle, and the data packet is used to realize remote upgrade of the electronic control unit.
[0030] Optionally, the remote upgrade device further includes:
[0031] A counting unit, used for counting the number of unprocessed data packets, wherein each time the device end connector receives a data packet sent by the diagnostic device, the number of the unprocessed data packets increases by one, and each time the device end connector receives a first response command sent by the vehicle end connector, the number of the unprocessed data packets decreases by one;
[0032] A duration determination unit, configured to determine a target duration based on the number of the unprocessed data packets;
[0033] The fourth sending unit is used to send the first response command to the above-mentioned diagnostic device after delaying the above-mentioned target time length from the moment when the data packet corresponding to the above-mentioned j-th data transmission command is received.
[0034] Optionally, if the target duration is greater than a preset duration threshold, the remote upgrade device further includes:
[0035] The fifth sending unit is used to send a first timeout extension command to the above-mentioned diagnostic device, and the above-mentioned first timeout extension command is used to instruct the above-mentioned diagnostic device to extend the time of waiting for the first response command, and the above-mentioned time length threshold is less than the above-mentioned time of waiting for the first response command before extension.
[0036] Optionally, the remote upgrade device further includes:
[0037] A sixth sending unit, configured to send the data packet corresponding to the j-th data transmission command to the vehicle end connector when receiving the data packet corresponding to the j-th data transmission command sent by the diagnostic device in the case that the first N received first response commands are different;
[0038] The seventh sending unit is used to send the first response command fed back by the vehicle to the diagnostic device when receiving the first response command fed back by the vehicle from the vehicle end connector.
[0039] Optionally, the remote upgrade device further includes:
[0040] The command discarding unit is used to discard the first response command fed back by the vehicle when receiving the first response command fed back by the vehicle from the vehicle end connector.
[0041] Optionally, the remote upgrade device further includes:
[0042] an eighth sending unit, configured to, when receiving the verification command sent by the diagnostic device, send the verification command to the vehicle-end connector to instruct the vehicle-end connector to send the verification command to the vehicle, wherein the verification command is used to instruct the vehicle to verify whether the data packet for the remote upgrade is received completely; and
[0043] The ninth sending unit is used to send a second timeout extension command to the above-mentioned diagnostic device, and the above-mentioned second timeout extension command is used to instruct the above-mentioned diagnostic device to extend the time waiting for the second response command. The above-mentioned second response command is a response command that the above-mentioned vehicle needs to feedback when receiving the verification command.
[0044] Optionally, the remote upgrade device further includes:
[0045] The tenth sending unit is used to send the second response command to the above-mentioned diagnostic device when receiving the second response command fed back by the above-mentioned vehicle based on the above-mentioned verification command from the above-mentioned vehicle end connector.
[0046] In a third aspect, the present application provides a device-end connector, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the method of the first aspect when executing the computer program.
[0047] In a fourth aspect, the present application provides a remote upgrade system for a vehicle electronic control unit, comprising:
[0048] As the device end connector of the third aspect, the device end connector is connected to the diagnostic device;
[0049] The vehicle end connector is connected to the vehicle and is used to realize data forwarding between the vehicle and the device end connector.
[0050] In a fifth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method of the first aspect is implemented.
[0051] In a sixth aspect, the present application provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by one or more processors, the method of the first aspect is implemented.
[0052] As can be seen from the above, in the present application scheme, when the device-end connector receives the data packet corresponding to the ith data transmission command among the first N data transmission commands sent by the diagnostic device, the device-end connector sends the data packet corresponding to the ith data transmission command to the vehicle-end connector, N≥2, 0<i≤N; receives the ith first response command sent by the vehicle-end connector; when the data packet corresponding to the jth data transmission command sent by the diagnostic device is received when the first N first response commands received are the same, the first response command is sent to the diagnostic device; and the data packet corresponding to the jth data transmission command is sent to the vehicle-end connector to instruct the vehicle-end connector to send the data packet corresponding to the jth data transmission command to the vehicle, and the data packet is used to realize remote upgrading of the electronic control unit, j>N. Compared with the prior art in which the device-end connector needs to wait for the first response command fed back by the vehicle and then send the first response command to the diagnostic device, the device-end connector of the present application solution can send and receive data packets corresponding to the first N data transmission commands, and receive the first response commands fed back by the vehicle for the first N data packets, thereby learning the vehicle's response method for the data packets of the data transmission commands (i.e., replying with a first response command). Thereafter, when the device-end connector receives the data packet of the data transmission command sent by the diagnostic device again, the device-end connector can feed back the first response command to the diagnostic device on behalf of the vehicle. Therefore, even if the network between the device-end connector and the vehicle-end connector is not good, the diagnostic device can receive the first response command in time, thereby effectively reducing the risk of failure in remote upgrading of the ECU program.
[0053] It can be understood that the beneficial effects of the second to sixth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0055] Figure 1 It is a schematic diagram of the implementation environment of the remote upgrade method of the vehicle electronic control unit provided by the embodiment of the present application;
[0056] Figure 2 It is a flowchart of a remote upgrade method of a vehicle electronic control unit provided in an embodiment of the present application;
[0057] Figure 3 It is a schematic diagram of the interaction process provided by the embodiment of the present application;
[0058] Figure 4It is a structural block diagram of a remote upgrade device for a vehicle electronic control unit provided in an embodiment of the present application;
[0059] Figure 5 It is a schematic diagram of the structure of the device end connector provided in the embodiment of the present application. DETAILED DESCRIPTION
[0060] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0061] In the existing remote upgrade technology, after the diagnostic device sends a data packet for transmitting ECU upgrade data to the vehicle, it needs to receive a response command from the vehicle within a specified time, and confirm that the vehicle has correctly received the data packet before sending the next data packet. If the diagnostic device does not receive the response command from the vehicle within the specified time, the upgrade is confirmed to have failed. However, although network technology is very advanced nowadays, network delay fluctuations and / or network congestion are still inevitable in the process of wireless communication between the diagnostic device and the vehicle, resulting in a timeout for the diagnostic device to receive the response command, thereby causing the remote upgrade to fail. Especially in the process of ECU programming for the vehicle, the diagnostic device needs to send data packets to the vehicle frequently, which increases the probability of encountering network delay fluctuations and / or network congestion. Based on this, an embodiment of the present application proposes a remote upgrade method, a remote upgrade device, a remote upgrade system, a device-end connector and a computer-readable storage medium for a vehicle electronic control unit. When the device-end connector receives a data packet corresponding to the i-th data transmission command among the first N data transmission commands sent by the diagnostic device, the device-end connector sends the data packet corresponding to the i-th data transmission command to the vehicle-end connector, N≥2, 0<i≤N; receives the i-th first response command sent by the vehicle-end connector; when the data packet corresponding to the j-th data transmission command sent by the diagnostic device is received when the first N first response commands received are the same, the first response command is sent to the diagnostic device; and the data packet corresponding to the j-th data transmission command is sent to the vehicle-end connector to instruct the vehicle-end connector to send the data packet corresponding to the j-th data transmission command to the vehicle, and the data packet is used to realize the remote upgrade of the electronic control unit, j>N. Compared with the prior art in which the device-end connector needs to wait for the first response command fed back by the vehicle and then send the first response command to the diagnostic device, the device-end connector of the present application can send and receive data packets corresponding to the first N data transmission commands, and receive the first response command fed back by the vehicle for the first N data packets, thereby learning the vehicle's response method for the data packets of the data transmission command (i.e., replying to a first response command). Thereafter, when the data packet of the data transmission command sent by the diagnostic device is received again, the device-end connector can feed back the first response command to the diagnostic device on behalf of the vehicle. Therefore, even if the network between the device-end connector and the vehicle-end connector is not good, the diagnostic device can receive the first response command in time, thereby effectively reducing the risk of failure of remote upgrade of the ECU program. In order to illustrate the technical solution proposed in the embodiment of the present application, it is described below through a specific embodiment.
[0062] Combine the following Figure 1 An implementation environment of a remote upgrade method for a vehicle electronic control unit provided in an embodiment of the present application is introduced.
[0063] exist Figure 1In the embodiment, the vehicle-end connector is connected to the vehicle by wire, and the device-end connector is also connected to the diagnostic device by wire. For example, the vehicle-end connector is connected to the vehicle via a Controller Area Network (CAN) line, and the device-end connector is also connected to the diagnostic device via a CAN line. At the same time, both the vehicle-end connector and the device-end connector are wirelessly connected to the cloud platform. For example, both the vehicle-end connector and the device-end connector are connected to the cloud platform via the Internet.
[0064] The vehicle-side connector can interact with the vehicle through the CAN line, collect vehicle data, and transparently transmit the data to the device-side connector through the cloud platform. The device-side connector can interact with the diagnostic device through the CAN line, restore the data received from the cloud platform to CAN data, and then transmit the CAN data to the diagnostic device. In addition, the device-side connector can also transparently transmit the data sent by the diagnostic device to the vehicle-side connector through the cloud platform, and then the vehicle-side connector restores the data received from the cloud platform to CAN data and forwards it to the vehicle, thereby realizing remote upgrades.
[0065] The following describes a remote upgrade method for a vehicle electronic control unit provided in an embodiment of the present application. The remote upgrade method for a vehicle electronic control unit can be applied to Figure 1 For device-side connectors, see Figure 2 , the remote upgrade method of the vehicle electronic control unit includes:
[0066] Step 201 , when a data packet corresponding to the ith data transmission command among the first N data transmission commands sent by the diagnostic device is received, the data packet corresponding to the ith data transmission command is sent to the vehicle end connector.
[0067] Step 202, receiving the i-th first response command sent by the vehicle end connector.
[0068] Step 203 , when the first N received first response commands are identical, when a data packet corresponding to the j-th data transmission command sent by the diagnostic device is received, a first response command is sent to the diagnostic device.
[0069] Step 204 : Send the data packet corresponding to the j-th data transmission command to the vehicle end connector, so as to instruct the vehicle end connector to send the data packet corresponding to the j-th data transmission command to the vehicle.
[0070] In the embodiment of the present application, N is an integer greater than or equal to 2, and i is an integer greater than 0 and less than or equal to N. After the remote upgrade starts, the diagnostic device can send a data packet to the device-end connector, and the data packet is used to implement the remote upgrade of the electronic control unit. Specifically, the diagnostic device can first send a diagnostic start request, and the diagnostic start request reaches the vehicle via the device-end connector, the cloud platform, and the vehicle-end connector. Then, the vehicle returns a response to the diagnostic start request, and after receiving the response, the diagnostic device starts to send data packets to the device-end connector.
[0071] It should be noted that some of the data packets sent by the diagnostic device may be used to scan the ECU system, while the above-mentioned data packets in the embodiments of the present application are data packets corresponding to data transmission commands, which are used to remotely upgrade the vehicle. That is, the remote upgrade method in the embodiments of the present application is only for data packets corresponding to data transmission commands.
[0072] During this remote upgrade, when the device-end connector receives any data packet corresponding to the first N data transmission commands, it can send the data packet to the vehicle-end connector. Then, the vehicle-end connector sends the data packet to the vehicle. Finally, the vehicle will feedback the first response command when receiving the data packet. In this way, the device-end connector can receive the first N first response commands sent by the vehicle-end connector in sequence, and the i-th first response command among the first N first response commands is the command fed back by the vehicle for the data packet corresponding to the i-th data transmission command.
[0073] When the device-end connector receives the above-mentioned N first response commands, it can determine whether the N first response commands are the same (i.e., the same command). If the N first response commands are the same, the first response command is stored locally. Taking the use of the Unified Diagnostic Services (UDS) protocol for communication between the vehicle and the diagnostic device as an example, the diagnostic device can send a data packet through the data transmission command 0x36 under this protocol. The UDS protocol stipulates that when the vehicle receives a data packet of the data transmission command 0x36, it needs to feedback the response command 0x76. Therefore, the first response command in the embodiment of the present application may be the response command 0x76. If the N first response commands received by the device-end connector are all response commands 0x76, the response command 0x76 may be stored locally.
[0074] After receiving the data packet corresponding to the jth data transmission command sent by the diagnostic device, the device-end connector can send the stored first response command to the diagnostic device, and send the data packet corresponding to the jth data transmission command to the vehicle-end connector. In this way, when the diagnostic device receives the first response command sent by the device-end connector, it will consider that the first response command is issued by the vehicle, and determine that the vehicle has correctly received the data packet, so that the diagnostic device will continue the subsequent process of remote upgrading, that is, send the next data packet, where j is an integer greater than N. On the other hand, when the vehicle-end connector receives the data packet corresponding to the jth data transmission command sent by the device-end connector, it can send the data packet to the vehicle. It should be understood that when the vehicle receives the data packet corresponding to the jth data transmission command, it will feedback the first response command to the vehicle-end connector in accordance with the provisions of the communication protocol used between the vehicle and the diagnostic device, and then the vehicle-end connector can send the first response command to the device-end connector.
[0075] In some embodiments, since the device-end connector has previously sent the first response command to the diagnostic device on behalf of the vehicle, when the device-end connector receives the first response command fed back by the vehicle from the vehicle-end connector, the device-end connector can directly discard the first response command sent by the vehicle-end connector. In this way, even if there is a network delay fluctuation and / or network congestion between the vehicle and the diagnostic device, the diagnostic device can still receive the first response command sent by the device-end connector in a timely manner, thereby reducing the risk of remote upgrade failure.
[0076] It should be understood that the data transmission commands mentioned above in each embodiment of the present application can all be the data transmission command 0x36 in the UDS protocol, and the first response command of the vehicle to the data packet of the data transmission command 0x36 can all be the response command 0x76 in the UDS protocol.
[0077] In some embodiments, if the first N received first response commands are not the same, in order to ensure that the remote diagnosis is correct, when the device-end connector receives the data packet corresponding to the j-th data transmission command sent by the diagnostic device, it may not feed back the first response command to the diagnostic device on behalf of the vehicle, but only send the data packet corresponding to the j-th data transmission command to the vehicle-end connector. The vehicle-end connector may send the data packet corresponding to the j-th data transmission command to the vehicle, and the vehicle feeds back the first response command for the data packet corresponding to the j-th data transmission command. When the device-end connector receives the first response command from the vehicle-end connector, it may send the first response command to the diagnostic device.
[0078] In some embodiments, the remote upgrade method of the vehicle electronic control unit further includes:
[0079] Counts the number of packets that have not been processed.
[0080] The target duration is determined based on the number of outstanding packets.
[0081] From the moment when the data packet corresponding to the j-th data transmission command is received, the first response command is sent to the diagnostic device after a delay of the target time length.
[0082] The definition of an unprocessed data packet may be: if the device-end connector receives a data packet sent by the diagnostic device and sends the data packet to the vehicle-end connector, but has not yet received the first response command for the data packet fed back by the vehicle, then the data packet is an unprocessed data packet. Specifically, each time the device-end connector receives a data packet sent by the diagnostic device, the number of unprocessed data packets increases by one, and correspondingly, each time the device-end connector receives a first response command fed back by the vehicle, the number of unprocessed data packets decreases by one.
[0083] For example, assume that at the current moment, the number of unprocessed data packets is 3. At this time, the device-end connector receives the data packet sent by the diagnostic device, so the number of unprocessed data packets is updated to 4, and the data packet is sent to the vehicle-end connector. After the vehicle-end connector sends the data packet to the vehicle, the vehicle feeds back a first response command, and the first response command is sent to the device-end connector via the vehicle-end connector. When the device-end connector receives the first response command, the number of unprocessed data packets is updated to 3. In the embodiment of the present application, since the device-end connector will immediately send the data packet to the vehicle-end connector after receiving the data packet sent by the diagnostic device (the vehicle-end connector adds the data packet to the cache), and the vehicle-end connector will immediately send the first response command to the device-end connector after receiving the first response command fed back by the vehicle (indicating that the vehicle-end connector has deleted the corresponding data packet from the cache), therefore, without considering the communication delay, the number of unprocessed data packets can be understood as the number of data packets cached by the vehicle-end connector.
[0084] By counting the number of unprocessed data packets, the device-end connector can obtain the memory occupancy of the vehicle-end connector. Considering that the speed at which the device-end connector sends data packets to the vehicle-end connector is usually higher than the speed at which the vehicle-end connector sends data packets to the vehicle (because after the device-end connector receives the data packet sent by the diagnostic device, it can immediately respond to the diagnostic device and receive the next data packet sent by the diagnostic device, while after the vehicle-end connector sends the data packet to the vehicle, the vehicle needs to save the data packet, and this process takes time), during the diagnosis process, the vehicle-end connector usually caches a certain amount of data packets, which will occupy a certain amount of memory. Based on this, by counting the number of unprocessed data packets and determining the memory occupancy of the vehicle-end connector, the device-end connector can control the speed of sending data packets, thereby avoiding the situation where data packets occupy too much memory at the vehicle-end connector.
[0085] Among them, the target duration is determined based on the number of unprocessed data packets. Specifically, when the device-end connector receives the data packet corresponding to the j-th data transmission command sent by the diagnostic device, the device-end connector first obtains the number of unprocessed data packets at the current moment (i.e., the moment when the data packet corresponding to the j-th data transmission command is received), and then determines the target duration based on the number of unprocessed data packets, and sends the stored first response command to the diagnostic device after delaying the target duration starting from the moment when the data packet is received. Since in the case that the diagnostic device has multiple data packets to send, after the diagnostic device sends a data packet, it needs to receive the first response command before sending the next data packet. Therefore, by delaying the time for the device-end connector to send the first response command, the frequency of the diagnostic device sending data packets can be reduced, thereby solving the problem of too many data packets cached in the vehicle-end connector and occupying a lot of memory.
[0086] Optionally, the determining of the target duration based on the number of unprocessed data packets includes:
[0087] If the number of unprocessed data packets is less than or equal to a preset first threshold, the preset first duration is determined as the target duration.
[0088] If the number of unprocessed data packets is greater than the first threshold and less than or equal to a preset second threshold, the preset second duration is determined as the target duration.
[0089] If the number of unprocessed data packets is greater than the second threshold, the preset third duration is determined as the target duration.
[0090] In an embodiment of the present application, when the device-side connector receives the jth data packet of the data transmission command sent by the diagnostic device, the device-side connector first obtains the number of unprocessed data packets at the current moment (i.e., the moment when the jth data packet is received). If the number of unprocessed data packets is less than a preset first threshold, the preset first duration is determined as the target duration. If the number of unprocessed data packets is greater than the first threshold and less than or equal to a preset second threshold, the preset second duration is determined as the target duration. If the number of unprocessed data packets is greater than the second threshold, the preset third duration is determined as the target duration. Among them, the first threshold is less than the second threshold, the first duration is less than the second duration, and the second duration is less than the third duration.
[0091] Taking the UDS protocol as an example, the UDS protocol is used as the communication protocol between the diagnostic device and the vehicle. The UDS protocol stipulates that if the diagnostic device sends a service request and does not receive a response within 55 milliseconds, it is determined that the response has timed out, resulting in an upgrade failure. Based on this, as an example, the first time length can be determined as 0, the second time length can be determined as 45 milliseconds, and the third time length can be determined as 1 second.
[0092] In some embodiments, considering that the target duration may be greater than the timeout duration, in order to prevent the diagnostic device from timing out when receiving the first response command, if the target duration is greater than a preset duration threshold, the remote upgrade method of the above-mentioned vehicle electronic control unit also includes: sending a first timeout extension command to the diagnostic device.
[0093] The first timeout extension command is used to instruct the diagnostic device to extend the time for waiting for the first answer command. Specifically, after the diagnostic device sends a data packet, if the first answer command is not received within the time for waiting for the first answer command, it is considered that the first answer command for the data packet has been received overtime. For example, in the UDS protocol, the time for waiting for the first answer command is 55 milliseconds. The duration threshold can be less than the time for waiting for the first answer command before the extension. This is because it takes time for the device end connector to transmit the first answer command to the diagnostic device. If the duration threshold is greater than or equal to the time for waiting for the first answer command before the extension, when the target duration is equal to the duration threshold (the condition for sending the first timeout extension command is not met), the target duration plus the transmission duration of the first answer command will exceed the time for waiting for the first answer command before the extension, resulting in the time for the diagnostic device to receive the first answer command overtime. It should be noted that the extended time for waiting for the first answer command is only valid for the data packet sent this time. When the diagnostic device sends the next data packet, the time for waiting for the first answer command before the extension will be restored to determine whether the first answer command for the next data packet has been received overtime.
[0094] For example, suppose the preset waiting time for the first response command is 55 milliseconds. The diagnostic device sends out data packet 1, and then receives the first timeout extension command sent by the device end connector, so the waiting time for the first response command is extended to 5 seconds. As long as the diagnostic device can receive the first response command corresponding to data packet 1 within 5 seconds after sending the data packet, it is determined that the time for receiving the first response command has not timed out. After the diagnostic device receives the first response command corresponding to data packet 1 within 5 seconds, it then sends data packet 2. Then, for data packet 2, the diagnostic device will still determine whether the time for receiving the first response command corresponding to data packet 2 has timed out based on the waiting time for the first response command before the extension (i.e., 55 milliseconds).
[0095] In some embodiments, the data packet includes a first frame and a continuous frame. Taking the UDS protocol used for communication between a vehicle and a diagnostic device as an example, the first frame contains the total length of the data in the data packet, the SID (Service Identity Document, service request ID) and the data portion. The first byte of each continuous frame identifies the frame sequence number to indicate which continuous frame the continuous frame is in the data packet. Based on this, the remote upgrade method of the above-mentioned vehicle electronic control unit also includes:
[0096] When the first frame in the data packet sent by the diagnostic device is received, a flow control frame is sent to the diagnostic device.
[0097] If all the consecutive frames in the data packet are received, it is determined that the data packet sent by the diagnostic device is received.
[0098] Among them, if the device-end connector receives the first frame in the data packet sent by the diagnostic device, the device-end connector can send a flow control frame to the diagnostic device, and the flow control frame is used to instruct the diagnostic device to send the continuous frames in the data packet. In other words, after sending the first frame, the diagnostic device will only send the remaining continuous frames in the data packet after receiving the flow control frame, until all the continuous frames in the data packet are sent. After the device-end connector receives the first frame and sends the flow control frame to the diagnostic device, if all the continuous frames in the data packet are received, the device-end connector determines that the data frames have been received, that is, the data packet sent by the diagnostic device has been received. It should be understood that the data packet in the embodiment of the present application can be a data packet corresponding to any data transmission command, such as one of the data packets corresponding to the first N data transmission commands, or a data packet corresponding to the jth data transmission command.
[0099] Optionally, the remote upgrade method of the vehicle electronic control unit further includes:
[0100] When a verification command sent by the diagnostic device is received, the verification command is sent to the vehicle end connector, and a second timeout extension command is sent to the diagnostic device.
[0101] In an embodiment of the present application, the verification command is used to instruct the vehicle to verify whether the data packet used for this remote upgrade is received completely. Due to poor network or other reasons, the data packets received by the vehicle during the remote upgrade process often lose packets. Therefore, after the diagnostic device sends all the data packets used for this remote upgrade to the device end connector each time the remote upgrade is performed, it can send a verification command to the device end connector. The device end connector can send the verification command directly to the vehicle end connector, and then the vehicle end connector sends the verification command to the vehicle. After the vehicle verifies the data packet according to the verification command, it can feedback the second response command, which is sent to the diagnostic device via the vehicle end connector and the device end connector. Among them, the diagnostic device can determine whether the time to receive the second response command has timed out according to the time to wait for the second response command. That is, if the diagnostic device does not receive the second response command within the time to wait for the second response command after issuing the verification command, it is determined that the reception of the second response command for the verification command has timed out. Taking into account that it takes a long time for the vehicle to verify the data packet, in order to avoid the diagnostic device from timing out when receiving the second response command, the device end connector may also send a second timeout extension command to the diagnostic device when receiving the verification command. The second timeout extension command is used to instruct the diagnostic device to extend the time waiting for the second response command.
[0102] In some embodiments, if the device-end connector receives a second response command sent by the vehicle-end connector, the second response command may be sent to the diagnostic device, wherein the second response command is fed back by the vehicle after verifying the data packet based on the verification command.
[0103] For ease of understanding, the following Figure 3 The interaction process between the vehicle, the vehicle-end connector, the device-end connector and the diagnostic device in the embodiment of the present application is introduced.
[0104] Step 301: The device-end connector sends a data packet corresponding to the ith data transmission command among the first N data transmission commands to the vehicle-end connector.
[0105] Step 302: the vehicle-end connector sends a data packet corresponding to the i-th data transmission command to the vehicle.
[0106] Step 303: The vehicle receives the data packet corresponding to the i-th data transmission command, and feeds back the i-th first response command to the vehicle end connector.
[0107] Step 304: the vehicle-end connector sends the i-th first response command fed back by the vehicle to the device-end connector.
[0108] Step 305: After receiving the first N first response commands sent by the vehicle end connector, the device end connector determines that the first N first response commands are the same, and then stores the first response commands.
[0109] Step 306 , the diagnostic device determines that the remote upgrade has started.
[0110] Step 307: The diagnostic device sends the first frame in the data packet corresponding to the j-th data transmission command.
[0111] Step 308: After receiving the first frame in the data packet corresponding to the j-th data transmission command, the device end connector sends a flow control frame to the diagnostic device.
[0112] Step 309: After receiving the flow control frame, the diagnostic device sends the continuous frames in the data packet corresponding to the j-th data transmission command to the device end connector.
[0113] Step 310: After the device end connector receives all the consecutive frames in the data packet corresponding to the j-th data transmission command, it determines that the data packet corresponding to the j-th data transmission command has been received.
[0114] Step 311: When the device end connector determines that it has received a data packet corresponding to the jth data transmission command, it obtains a stored first response command.
[0115] Step 312: When the device-end connector determines that it has received the data packet corresponding to the j-th data transmission command, it sends the data packet corresponding to the j-th data transmission command to the vehicle-end connector.
[0116] Step 313: the device end connector sends a first response command to the diagnostic device.
[0117] Step 314: After receiving the data packet corresponding to the j-th data transmission command, the vehicle end connector sends the first frame in the data packet corresponding to the j-th data transmission command to the vehicle.
[0118] Step 315: After receiving the first frame in the data packet corresponding to the j-th data transmission command, the vehicle sends a flow control frame to the vehicle end connector.
[0119] Step 316: After receiving the flow control frame, the vehicle end connector sends the continuous frames in the data packet corresponding to the j-th data transmission command to the vehicle.
[0120] Step 317 : After the vehicle receives all the consecutive frames in the data packet corresponding to the j-th data transmission command, it determines that the data packet corresponding to the j-th data transmission command has been received.
[0121] Step 318: When the vehicle determines that it has received the data packet corresponding to the j-th data transmission command, it feeds back a first response command to the vehicle end connector.
[0122] Step 319: When the vehicle-end connector receives the first response command, it sends the first response command to the device-end connector.
[0123] Step 320: The device-end connector discards the first response command received from the vehicle-end connector.
[0124] Step 321: After the diagnostic device determines that the first response command has been received, it sends a verification command to the device end connector.
[0125] Step 322, the device-side connector determines that all data packets for this remote upgrade have been sent, and sends a verification command to the vehicle-side connector.
[0126] Step 323: the vehicle-end connector sends a verification command to the vehicle.
[0127] Step 324: After receiving the verification command, the vehicle verifies the data packet used for this remote upgrade according to the verification command to determine whether the data packet used for this remote upgrade is received completely.
[0128] Step 325: After the vehicle completes verification of the data packet, it feeds back a second response command to the vehicle end connector.
[0129] Step 326: The vehicle-end connector sends a second response command to the device-end connector.
[0130] Step 327: the device end connector sends a second response command to the diagnostic device.
[0131] As can be seen from the above, in the present application scheme, when the device-end connector receives the data packet corresponding to the ith data transmission command among the first N data transmission commands sent by the diagnostic device, the device-end connector sends the data packet corresponding to the ith data transmission command to the vehicle-end connector, N≥2, 0<i≤N; receives the ith first response command sent by the vehicle-end connector; when the data packet corresponding to the jth data transmission command sent by the diagnostic device is received when the first N first response commands received are the same, the first response command is sent to the diagnostic device; and the data packet corresponding to the jth data transmission command is sent to the vehicle-end connector to instruct the vehicle-end connector to send the data packet corresponding to the jth data transmission command to the vehicle, and the data packet is used to realize remote upgrading of the electronic control unit, j>N. Compared with the prior art in which the device-end connector needs to wait for the first response command fed back by the vehicle and then send the first response command to the diagnostic device, the device-end connector of the present application solution can send and receive data packets corresponding to the first N data transmission commands, and receive the first response commands fed back by the vehicle for the first N data packets, thereby learning the vehicle's response method for the data packets of the data transmission commands (i.e., replying with a first response command). Thereafter, when the device-end connector receives the data packet of the data transmission command sent by the diagnostic device again, the device-end connector can feed back the first response command to the diagnostic device on behalf of the vehicle. Therefore, even if the network between the device-end connector and the vehicle-end connector is not good, the diagnostic device can receive the first response command in time, thereby effectively reducing the risk of failure in remote upgrading of the ECU program.
[0132] Corresponding to the remote upgrade method of the vehicle electronic control unit provided above, the embodiment of the present application also provides a remote upgrade device of the vehicle electronic control unit. Figure 4 As shown, the remote upgrade device 400 in the embodiment of the present application is applied to the device end connector, including:
[0133] The first sending unit 401 is used for sending the data packet corresponding to the i-th data transmission command among the first N data transmission commands sent by the diagnostic device to the vehicle end connector when receiving the data packet corresponding to the i-th data transmission command, N≥2, 0<i≤N;
[0134] The first receiving unit 402 is used to receive the i-th first response command sent by the vehicle end connector, where the i-th first response command is a command fed back by the vehicle in response to the data packet corresponding to the i-th data transmission command;
[0135] The second sending unit 403 is configured to send the first response command to the diagnostic device when receiving a data packet corresponding to the j-th data transmission command sent by the diagnostic device, if the first N received first response commands are the same, where j>N;
[0136] The third sending unit 404 is used to send the data packet corresponding to the j-th data transmission command to the vehicle end connector to instruct the vehicle end connector to send the data packet corresponding to the j-th data transmission command to the vehicle, and the data packet is used to realize remote upgrade of the electronic control unit.
[0137] Optionally, the remote upgrade device 400 further includes:
[0138] A counting unit, used for counting the number of unprocessed data packets, wherein each time the device end connector receives a data packet sent by the diagnostic device, the number of the unprocessed data packets increases by one, and each time the device end connector receives a first response command sent by the vehicle end connector, the number of the unprocessed data packets decreases by one;
[0139] A duration determination unit, configured to determine a target duration based on the number of the unprocessed data packets;
[0140] The fourth sending unit is used to send the first response command to the above-mentioned diagnostic device after delaying the above-mentioned target time length from the moment when the data packet corresponding to the above-mentioned j-th data transmission command is received.
[0141] Optionally, if the target duration is greater than a preset duration threshold, the remote upgrade device 400 further includes:
[0142] The fifth sending unit is used to send a first timeout extension command to the above-mentioned diagnostic device, and the above-mentioned first timeout extension command is used to instruct the above-mentioned diagnostic device to extend the time of waiting for the first response command, and the above-mentioned time length threshold is less than the above-mentioned time of waiting for the first response command before extension.
[0143] Optionally, the remote upgrade device 400 further includes:
[0144] A sixth sending unit, configured to send the data packet corresponding to the j-th data transmission command to the vehicle end connector when receiving the data packet corresponding to the j-th data transmission command sent by the diagnostic device in the case that the first N received first response commands are different;
[0145] The seventh sending unit is used to send the first response command fed back by the vehicle to the diagnostic device when receiving the first response command fed back by the vehicle from the vehicle end connector.
[0146] Optionally, the remote upgrade device 400 further includes:
[0147] The command discarding unit is used to discard the first response command fed back by the vehicle when receiving the first response command fed back by the vehicle from the vehicle end connector.
[0148] Optionally, the remote upgrade device 400 further includes:
[0149] an eighth sending unit, configured to, when receiving the verification command sent by the diagnostic device, send the verification command to the vehicle-end connector to instruct the vehicle-end connector to send the verification command to the vehicle, wherein the verification command is used to instruct the vehicle to verify whether the data packet for the remote upgrade is received completely; and
[0150] The ninth sending unit is used to send a second timeout extension command to the above-mentioned diagnostic device, and the above-mentioned second timeout extension command is used to instruct the above-mentioned diagnostic device to extend the time waiting for the second response command. The above-mentioned second response command is a response command that the above-mentioned vehicle needs to feedback when receiving the verification command.
[0151] Optionally, the remote upgrade device 400 further includes:
[0152] The tenth sending unit is used to send the second response command to the above-mentioned diagnostic device when receiving the second response command fed back by the above-mentioned vehicle based on the above-mentioned verification command from the above-mentioned vehicle end connector.
[0153] As can be seen from the above, in the present application scheme, when the device-end connector receives the data packet corresponding to the ith data transmission command among the first N data transmission commands sent by the diagnostic device, the device-end connector sends the data packet corresponding to the ith data transmission command to the vehicle-end connector, N≥2, 0<i≤N; receives the ith first response command sent by the vehicle-end connector; when the data packet corresponding to the jth data transmission command sent by the diagnostic device is received when the first N first response commands received are the same, the first response command is sent to the diagnostic device; and the data packet corresponding to the jth data transmission command is sent to the vehicle-end connector to instruct the vehicle-end connector to send the data packet corresponding to the jth data transmission command to the vehicle, and the data packet is used to realize remote upgrading of the electronic control unit, j>N. Compared with the prior art in which the device-end connector needs to wait for the first response command fed back by the vehicle and then send the first response command to the diagnostic device, the device-end connector of the present application solution can send and receive data packets corresponding to the first N data transmission commands, and receive the first response commands fed back by the vehicle for the first N data packets, thereby learning the vehicle's response method for the data packets of the data transmission commands (i.e., replying with a first response command). Thereafter, when the device-end connector receives the data packet of the data transmission command sent by the diagnostic device again, the device-end connector can feed back the first response command to the diagnostic device on behalf of the vehicle. Therefore, even if the network between the device-end connector and the vehicle-end connector is not good, the diagnostic device can receive the first response command in time, thereby effectively reducing the risk of failure in remote upgrading of the ECU program.
[0154] Corresponding to the remote upgrade method of the vehicle electronic control unit provided above, the embodiment of the present application also provides a device end connector, see Figure 5 The device end connector 5 in the embodiment of the present application includes: a memory 501, one or more processors 502 ( Figure 5 Only one is shown in the figure) and a computer program stored in the memory 501 and executable on the processor. Among them: the memory 501 is used to store software programs and units, and the processor 502 executes various functional applications and data processing by running the software programs and units stored in the memory 501. Specifically, the processor 502 implements the following steps when running the above-mentioned computer program stored in the memory 501:
[0155] When receiving a data packet corresponding to the ith data transmission command among the first N data transmission commands sent by the diagnostic device, sending the data packet corresponding to the ith data transmission command to the vehicle end connector, N≥2, 0<i≤N;
[0156] receiving the i-th first response command sent by the vehicle end connector, where the i-th first response command is a command fed back by the vehicle in response to the data packet corresponding to the i-th data transmission command;
[0157] In the case where the first N received first response commands are identical, when a data packet corresponding to the j-th data transmission command sent by the diagnostic device is received, sending the first response command to the diagnostic device, j>N; and
[0158] The data packet corresponding to the j-th data transmission command is sent to the vehicle end connector to instruct the vehicle end connector to send the data packet corresponding to the j-th data transmission command to the vehicle, and the data packet is used to realize remote upgrade of the electronic control unit.
[0159] In a second possible implementation provided on the basis of the first possible implementation, the processor 502 further implements the following steps when running the computer program stored in the memory 501:
[0160] Counting the number of unprocessed data packets, wherein each time the device end connector receives a data packet sent by the diagnostic device, the number of unprocessed data packets increases by one, and each time the device end connector receives a first response command sent by the vehicle end connector, the number of unprocessed data packets decreases by one;
[0161] Determine the target duration based on the number of unprocessed data packets;
[0162] Starting from the moment when the data packet corresponding to the j-th data transmission command is received, the first response command is sent to the diagnostic device after delaying the target time.
[0163] In a third possible implementation provided on the basis of the second possible implementation, if the target duration is greater than a preset duration threshold, the processor 502 further implements the following steps when running the computer program stored in the memory 501:
[0164] A first timeout extension command is sent to the diagnostic device, where the first timeout extension command is used to instruct the diagnostic device to extend the time for waiting for the first response command, and the time length threshold is less than the time for waiting for the first response command before the extension.
[0165] In a fourth possible implementation provided on the basis of the first possible implementation, the processor 502 further implements the following steps when running the computer program stored in the memory 501:
[0166] In the case that the first N received first response commands are different, when a data packet corresponding to the j-th data transmission command sent by the diagnostic device is received, the data packet corresponding to the j-th data transmission command is sent to the vehicle end connector;
[0167] When the first response command fed back by the vehicle is received from the vehicle end connector, the first response command fed back by the vehicle is sent to the diagnostic device.
[0168] In a fifth possible implementation provided on the basis of the first possible implementation, after sending the data packet corresponding to the j-th data transmission command to the vehicle end connector, the processor 502 further implements the following steps when running the computer program stored in the memory 501:
[0169] When the first response command fed back by the vehicle is received from the vehicle end connector, the first response command fed back by the vehicle is discarded.
[0170] In a sixth possible implementation provided on the basis of any one of the first to fifth possible implementations, the processor 502 further implements the following steps when running the computer program stored in the memory 501:
[0171] When receiving the verification command sent by the diagnostic device, sending the verification command to the vehicle end connector to instruct the vehicle end connector to send the verification command to the vehicle, wherein the verification command is used to instruct the vehicle to verify whether the data packet for the remote upgrade is received completely; and
[0172] A second timeout extension command is sent to the diagnostic device, where the second timeout extension command is used to instruct the diagnostic device to extend the time for waiting for a second response command, where the second response command is a response command that the vehicle needs to feedback when receiving the verification command.
[0173] In a seventh possible implementation provided as a basis of the sixth possible implementation, after sending the verification command to the vehicle end connector, the processor 502 further implements the following steps by running the computer program stored in the memory 501:
[0174] When a second response command fed back by the vehicle based on the verification command is received from the vehicle end connector, the second response command is sent to the diagnostic device.
[0175] It should be understood that in the embodiment of the present application, the processor 502 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0176] The memory 501 may include a read-only memory and a random access memory, and provide instructions and data to the processor 502. A part or all of the memory 501 may also include a non-volatile random access memory. For example, the memory 501 may also store information of a device category.
[0177] As can be seen from the above, in the present application scheme, when the device-end connector receives the data packet corresponding to the ith data transmission command among the first N data transmission commands sent by the diagnostic device, the device-end connector sends the data packet corresponding to the ith data transmission command to the vehicle-end connector, N≥2, 0<i≤N; receives the ith first response command sent by the vehicle-end connector; when the data packet corresponding to the jth data transmission command sent by the diagnostic device is received when the first N first response commands received are the same, the first response command is sent to the diagnostic device; and the data packet corresponding to the jth data transmission command is sent to the vehicle-end connector to instruct the vehicle-end connector to send the data packet corresponding to the jth data transmission command to the vehicle, and the data packet is used to realize remote upgrading of the electronic control unit, j>N. Compared with the prior art in which the device-end connector needs to wait for the first response command fed back by the vehicle and then send the first response command to the diagnostic device, the device-end connector of the present application solution can send and receive data packets corresponding to the first N data transmission commands, and receive the first response commands fed back by the vehicle for the first N data packets, thereby learning the vehicle's response method for the data packets of the data transmission commands (i.e., replying with a first response command). Thereafter, when the device-end connector receives the data packet of the data transmission command sent by the diagnostic device again, the device-end connector can feed back the first response command to the diagnostic device on behalf of the vehicle. Therefore, even if the network between the device-end connector and the vehicle-end connector is not good, the diagnostic device can receive the first response command in time, thereby effectively reducing the risk of failure in remote upgrading of the ECU program.
[0178] Corresponding to the remote upgrade method of the vehicle electronic control unit provided above, the embodiment of the present application also provides a remote upgrade system of the vehicle electronic control unit, including:
[0179] As in any of the above embodiments, the device end connector is connected to the diagnostic device;
[0180] As in any of the above-mentioned embodiments, the above-mentioned vehicle end connector is connected to the vehicle and is used to realize data forwarding between the above-mentioned vehicle and the above-mentioned device end connector.
[0181] It should be noted that the diagnostic device in the embodiments of the present application may be the diagnostic device mentioned in any of the above embodiments, and the vehicle may be the vehicle mentioned in any of the above embodiments.
[0182] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the above-mentioned device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0183] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0184] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of external device 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 can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0185] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the system embodiments described above are merely schematic. For example, the division of the above modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0186] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0187] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the associated hardware through a computer program. The above-mentioned computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the above-mentioned computer program includes computer program code, and the above-mentioned computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The above-mentioned computer-readable storage medium may include: any entity or device capable of carrying the above-mentioned computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer-readable memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the above-mentioned computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable storage media does not include electrical carrier signals and telecommunication signals.
[0188] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A remote upgrade method for a vehicle electronic control unit, It is characterized in that Applied to the device-side connector, the vehicle-side connector is wired to the vehicle, the device-side connector is also wired to the diagnostic device, and the vehicle-side connector and the device-side connector are both wirelessly connected to the cloud platform, including: When receiving a data packet corresponding to the ith data transmission command among the first N data transmission commands sent by the diagnostic device, sending the data packet corresponding to the ith data transmission command to the vehicle end connector, N≥2, 0<i≤N; receiving the i-th first response command sent by the vehicle end connector, wherein the i-th first response command is a command fed back by the vehicle in response to the data packet corresponding to the i-th data transmission command; In the case that the first N received first response commands are the same, when receiving a data packet corresponding to the jth data transmission command sent by the diagnostic device, the device-end connector feeds back the first response command to the diagnostic device instead of the vehicle, and sends the first response command to the diagnostic device, j>N; and Sending a data packet corresponding to the j-th data transmission command to the vehicle-end connector to instruct the vehicle-end connector to send a data packet corresponding to the j-th data transmission command to the vehicle, wherein the data packet is used to implement a remote upgrade of the electronic control unit; If the first N first response commands received are not the same, when the device-end connector receives the data packet corresponding to the j-th data transmission command sent by the diagnostic device, the device-end connector does not feed back the first response command to the diagnostic device on behalf of the vehicle, but only sends the data packet corresponding to the j-th data transmission command to the vehicle-end connector; the vehicle-end connector sends the data packet corresponding to the j-th data transmission command to the vehicle, and the vehicle feeds back the first response command for the data packet corresponding to the j-th data transmission command; when the device-end connector receives the first response command from the vehicle-end connector, it sends the first response command to the diagnostic device.
2. The remote upgrade method of the vehicle electronic control unit according to claim 1, It is characterized in that The remote upgrade method further includes: Counting the number of unprocessed data packets, wherein each time the device-end connector receives a data packet sent by the diagnostic device, the number of unprocessed data packets increases by one, and each time a first response command sent by the vehicle-end connector is received, the number of unprocessed data packets decreases by one; Determining a target duration based on the number of unprocessed data packets; Starting from the moment when the data packet corresponding to the j-th data transmission command is received, the first response command is sent to the diagnostic device after a delay of the target time length.
3. The remote upgrade method of the vehicle electronic control unit as claimed in claim 2, It is characterized in that If the target duration is greater than a preset duration threshold, the remote upgrade method further includes: A first timeout extension command is sent to the diagnostic device, where the first timeout extension command is used to instruct the diagnostic device to extend the time for waiting for a first response command, and the time length threshold is less than the time for waiting for the first response command before the extension.
4. The remote upgrade method of the vehicle electronic control unit according to claim 1, It is characterized in that After sending the data packet corresponding to the j-th data transmission command to the vehicle end connector, the remote upgrade method further includes: When the first reply command fed back by the vehicle is received from the vehicle end connector, the first reply command fed back by the vehicle is discarded.
5. The remote upgrade method of a vehicle electronic control unit according to any one of claims 1 to 4, It is characterized in that The remote upgrade method further includes: When receiving the verification command sent by the diagnostic device, sending the verification command to the vehicle end connector to instruct the vehicle end connector to send the verification command to the vehicle, wherein the verification command is used to instruct the vehicle to verify whether the data packet for this remote upgrade is received completely; and A second timeout extension command is sent to the diagnostic device, where the second timeout extension command is used to instruct the diagnostic device to extend the time for waiting for a second response command, where the second response command is a response command that the vehicle needs to feedback when receiving the verification command.
6. The remote upgrade method of the vehicle electronic control unit as claimed in claim 5, It is characterized in that After sending the verification command to the vehicle end connector, the remote upgrade method further includes: When a second response command fed back by the vehicle based on the verification command is received from the vehicle end connector, the second response command is sent to the diagnosis device.
7. A remote upgrade device for a vehicle electronic control unit, It is characterized in that Applied to the device-side connector, the vehicle-side connector is wired to the vehicle, the device-side connector is also wired to the diagnostic device, and the vehicle-side connector and the device-side connector are both wirelessly connected to the cloud platform, including: A first sending unit is used to send the data packet corresponding to the i-th data transmission command among the first N data transmission commands sent by the diagnostic device to the vehicle end connector when receiving the data packet corresponding to the i-th data transmission command, N≥2, 0<i≤N; A first receiving unit, configured to receive an i-th first response command sent by the vehicle-end connector, wherein the i-th first response command is a command fed back by the vehicle in response to a data packet corresponding to the i-th data transmission command; A second sending unit is used for, when the first N received first response commands are the same, when receiving a data packet corresponding to the j-th data transmission command sent by the diagnostic device, the device end connector instead of the vehicle feeds back the first response command to the diagnostic device, and sends the first response command to the diagnostic device, j>N; a third sending unit, configured to send a data packet corresponding to the j-th data transmission command to the vehicle-end connector, so as to instruct the vehicle-end connector to send a data packet corresponding to the j-th data transmission command to the vehicle, wherein the data packet is used to implement a remote upgrade of the electronic control unit; If the first N first response commands received are not the same, when the device-end connector receives the data packet corresponding to the j-th data transmission command sent by the diagnostic device, the device-end connector does not feed back the first response command to the diagnostic device on behalf of the vehicle, but only sends the data packet corresponding to the j-th data transmission command to the vehicle-end connector; the vehicle-end connector sends the data packet corresponding to the j-th data transmission command to the vehicle, and the vehicle feeds back the first response command for the data packet corresponding to the j-th data transmission command; when the device-end connector receives the first response command from the vehicle-end connector, it sends the first response command to the diagnostic device.
8. A device end connector, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.
9. A remote upgrade system for a vehicle electronic control unit, It is characterized in that include: The device end connector of claim 8, wherein the device end connector is connected to a diagnostic device; A vehicle-end connector, the vehicle-end connector is connected to the vehicle and is used to implement data forwarding between the vehicle and the device-end connector.
Citation Information
Patent Citations
Distributed storage system upgrade method and apparatus
CN106936622A
Firmware safety upgrading method and device, vehicle-mounted system and vehicle
CN109697081A
Vehicle remote power-on method, vehicle-mounted communication equipment, cloud server and vehicle
CN109698867A
Vehicle remote diagnosis method, equipment connector and vehicle connector
CN111427335A
Vehicle remote diagnosis method and system, equipment connector and vehicle connector
CN111552266A
