CN114866585A - Remote upgrading method, device and system and equipment end connector - Google Patents

Remote upgrading method, device and system and equipment end connector Download PDF

Info

Publication number
CN114866585A
CN114866585A CN202210454785.4A CN202210454785A CN114866585A CN 114866585 A CN114866585 A CN 114866585A CN 202210454785 A CN202210454785 A CN 202210454785A CN 114866585 A CN114866585 A CN 114866585A
Authority
CN
China
Prior art keywords
vehicle
command
end connector
data packet
data transmission
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210454785.4A
Other languages
Chinese (zh)
Inventor
刘新
李森
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Launch Technology Co Ltd
Original Assignee
Shenzhen Launch Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Launch Technology Co Ltd filed Critical Shenzhen Launch Technology Co Ltd
Priority to CN202210454785.4A priority Critical patent/CN114866585A/en
Publication of CN114866585A publication Critical patent/CN114866585A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • H04L63/123Applying verification of the received information received data contents, e.g. message integrity

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Selective Calling Equipment (AREA)

Abstract

The application discloses a remote upgrading method, a remote upgrading device, an equipment end connector and a remote upgrading system for a vehicle electronic control unit. The method comprises the following steps: when a data packet corresponding to the ith data transmission command in the first N data transmission commands sent by the diagnostic equipment is received, sending the data packet corresponding to the ith data transmission command to a vehicle end connector, wherein N is more than or equal to 2, and i is more than 0 and less than or equal to N; receiving an ith first response command sent by the vehicle end connector; under the condition that the received first N first response commands are the same, when a data packet corresponding to the jth data transmission command sent by the diagnostic equipment is received, sending the first response command to the diagnostic equipment; and sending a data packet corresponding to the jth data transmission command to the vehicle end connector, wherein j is greater than N. Through the scheme, the risk of failure in remote upgrading of the ECU program can be effectively reduced under the condition that the network is not good.

Description

Remote upgrading method, device and system and equipment end connector
Technical Field
The present application belongs to the field of vehicle technologies, and in particular, to a remote upgrade method, a remote upgrade apparatus, a remote upgrade system, an equipment terminal connector, and a computer-readable storage medium for a vehicle electronic control unit.
Background
The remote upgrading technology of the vehicle Electronic Control Unit (ECU) can enable a vehicle owner to realize the upgrading of the ECU program of the vehicle without driving the vehicle to a maintenance point, and a vehicle maintenance worker can remotely communicate with the vehicle through a diagnostic device. However, during the remote upgrade process, the command response of the vehicle to the diagnostic device is often timed out due to network delay fluctuation and/or network congestion, so that the remote upgrade fails.
Disclosure of Invention
In view of this, the present application provides a remote upgrade method, a remote upgrade apparatus, an equipment end connector and a remote upgrade system for a vehicle electronic control unit, which can effectively reduce the risk of failure in remote upgrade of an ECU program under the condition of poor network.
In a first aspect, the present application provides a method for remotely upgrading an electronic control unit of a vehicle, applied to an equipment-end connector, including:
when a data packet corresponding to the ith data transmission command in the first N data transmission commands sent by the diagnostic equipment is received, sending the data packet corresponding to the ith data transmission command to a vehicle end connector, wherein N is more than or equal to 2, and i is more than 0 and less than or equal to N;
receiving an ith first response command sent by the vehicle end connector, wherein the ith first response command is a command fed back by the vehicle aiming at a data packet corresponding to the ith data transmission command;
under the condition that the received first N first response commands are the same, when a data packet corresponding to the jth data transmission command sent by the diagnostic equipment is received, sending the first response command to the diagnostic equipment, wherein j is larger than N; and
and sending the data packet corresponding to the jth data transmission command 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, wherein the data packet is used for realizing remote upgrade of the electronic control unit.
Optionally, the remote upgrade method further includes:
counting the number of unprocessed data packets, wherein the number of unprocessed data packets is increased by one when the equipment end connector receives a data packet sent by the diagnostic equipment, and the number of unprocessed data packets is decreased by one when a first response command sent by the vehicle end connector is received;
determining a target duration based on the number of the unprocessed data packets;
and after delaying the target time length from the moment of receiving the data packet corresponding to the jth data transmission command, sending the first response command to the diagnostic equipment.
Optionally, if the target duration is greater than a preset duration threshold, the remote upgrade method further includes:
and sending a first timeout extending command to the diagnostic equipment, wherein the first timeout extending command is used for indicating that the diagnostic equipment extends the time for waiting for the first response command, and the time threshold is smaller than the time for waiting for the first response command before extension.
Optionally, the remote upgrade method further includes:
under the condition that the received first N first response commands are different, when a data packet corresponding to the jth data transmission command sent by the diagnostic equipment is received, sending the data packet corresponding to the jth data transmission command to the vehicle end connector;
and when receiving a first response command fed back by the vehicle from the vehicle end joint, sending the first response command fed back by the vehicle to the diagnostic equipment.
Optionally, after the sending the data packet corresponding to the jth data transmission command to the vehicle end connector, the remote upgrade method further includes:
and when receiving the first response command fed back by the vehicle from the vehicle end connector, discarding the first response command fed back by the vehicle.
Optionally, the remote upgrade method further includes:
when a verification command sent by the diagnostic equipment is received, 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 for instructing the vehicle to verify whether a data packet for the remote upgrade is received completely; and
and sending a second timeout extending command to the diagnostic device, wherein the second timeout extending command is used for indicating that the diagnostic device extends the waiting time of a second response command, and the second response command is a response command which needs to be fed back when the vehicle receives the verification command.
Optionally, after the sending the verification command to the vehicle end connector, the remote upgrade method further includes:
and when a second response command fed back by the vehicle based on the verification command is received from the vehicle end connector, transmitting the second response command to the diagnostic device.
In a second aspect, the present application provides a remote upgrading apparatus for a vehicle electronic control unit, applied to an equipment end connector, including:
the first sending unit is used for sending the data packet corresponding to the ith data transmission command to the vehicle end connector when receiving the data packet corresponding to the ith data transmission command in the previous N data transmission commands sent by the diagnostic equipment, wherein N is more than or equal to 2, and i is more than 0 and less than or equal to N;
a first receiving unit, configured to receive an ith first response command sent by the vehicle end connector, where the ith first response command is a command fed back by the vehicle for a data packet corresponding to the ith data transmission command;
the second sending unit is used for sending the first response command to the diagnostic equipment when receiving a data packet corresponding to a jth data transmission command sent by the diagnostic equipment under the condition that the received first N first response commands are the same, wherein j is larger than N;
and a third sending unit, configured to send a data packet corresponding to the jth data transmission command to the vehicle end connector, so as to instruct the vehicle end connector to send the data packet corresponding to the jth data transmission command to the vehicle, where the data packet is used to implement remote upgrade of the electronic control unit.
Optionally, the remote upgrading apparatus further includes:
a counting unit, configured to count the number of unprocessed packets, where the number of unprocessed packets is incremented by one each time the device-side connector receives a packet sent by the diagnostic device, and the number of unprocessed packets is decremented by one each time a first response command sent by the vehicle-side connector is received;
a time length determining unit, configured to determine a target time length based on the number of the unprocessed data packets;
a fourth sending unit, configured to send the first response command to the diagnostic device after delaying the target time duration from a time when a data packet corresponding to the jth data transmission command is received.
Optionally, if the target duration is greater than a preset duration threshold, the remote upgrade apparatus further includes:
a fifth sending unit, configured to send a first timeout extending command to the diagnostic device, where the first timeout extending command is used to instruct the diagnostic device to extend a time for waiting for a first response command, and the time threshold is smaller than the time for waiting for the first response command before the extension.
Optionally, the remote upgrade apparatus further includes:
a sixth sending unit, configured to, when receiving a data packet corresponding to a jth data transmission command sent by the diagnostic device under the condition that the received first N first response commands are different, send the data packet corresponding to the jth data transmission command to the vehicle end connector;
a seventh sending unit, configured to send the first response command fed back by the vehicle to the diagnostic device when the first response command fed back by the vehicle is received from the vehicle end connector.
Optionally, the remote upgrade apparatus further includes:
and the command discarding unit is used for discarding the first response command fed back by the vehicle when the first response command fed back by the vehicle is received from the vehicle end connector.
Optionally, the remote upgrade apparatus further includes:
an eighth sending unit, configured to send, when receiving a verification command sent by the diagnostic device, the verification command to the vehicle end connector to instruct the vehicle end connector to send the verification command to the vehicle, where the verification command is used to instruct the vehicle to verify whether a data packet for the current remote upgrade is received completely; and
and a ninth transmitting unit, configured to transmit a second timeout extending command to the diagnostic device, where the second timeout extending command is used to instruct the diagnostic device to extend a time for waiting for a second response command, and the second response command is a response command that the vehicle needs to feed back when receiving the verification command.
Optionally, the remote upgrade apparatus further includes:
a tenth transmitting unit configured to transmit a second response command, which is fed back by the vehicle based on the verification command, to the diagnostic device when the second response command is received from the vehicle end connector.
In a third aspect, the present application provides an apparatus-side connector, where the apparatus-side connector includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the method according to the first aspect when executing the computer program.
In a fourth aspect, the present application provides a remote upgrade system for a vehicle electronic control unit, comprising:
an equipment end fitting as in the third aspect, said equipment end fitting being connected to a diagnostic device;
and the vehicle end connector is connected with the vehicle and is used for realizing data forwarding between the vehicle and the equipment end connector.
In a fifth aspect, the present application provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method of the first aspect as described above.
In a sixth aspect, the present application provides a computer program product comprising a computer program that, when executed by one or more processors, performs the method of the first aspect as described above.
As can be seen from the above, in the solution of the present application, when receiving a data packet corresponding to an ith data transmission command in the first N data transmission commands of the data transmission command 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, where N is greater than or equal to 2, and i is greater than 0 and less than or equal to N; receiving an ith first response command sent by the vehicle end connector; under the condition that the received first N first response commands are the same, when a data packet corresponding to the jth data transmission command sent by the diagnostic equipment is received, sending the first response command to the diagnostic equipment; and sending the data packet corresponding to the jth data transmission command to the vehicle end connector to indicate the vehicle end connector to send the data packet corresponding to the jth data transmission command to the vehicle, wherein the data packet is used for realizing remote upgrade of the electronic control unit, and j is greater than N. Compared with the prior art that the equipment terminal connector needs to wait for the first response command fed back by the vehicle and then sends the first response command to the diagnostic equipment, the equipment terminal connector can receive and send the data packets corresponding to the first N data transmission commands and receive the first response command fed back by the vehicle aiming at the first N data packets, so that the response mode (namely, replying one first response command) of the vehicle aiming at the data packets of the data transmission commands is learned, and when the data packets sent by the diagnostic equipment and sent by the diagnostic equipment are received again, the equipment terminal connector can replace the vehicle to feed back the first response command to the diagnostic equipment.
It is understood that the beneficial effects of the second to sixth aspects can be seen from the description of the first aspect, and are not described herein again.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
FIG. 1 is a schematic diagram of an implementation environment of a remote upgrading method for a vehicle electronic control unit according to an embodiment of the present application;
FIG. 2 is a schematic flow chart of a method for remotely upgrading an electronic control unit of a vehicle according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an interaction flow provided by an embodiment of the present application;
FIG. 4 is a block diagram of a remote upgrading device of a vehicle electronic control unit provided by an embodiment of the application;
fig. 5 is a schematic structural diagram of an equipment end connector according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
In the existing remote upgrading technology, after the diagnostic device sends a data packet for transmitting ECU upgrading data to the vehicle, a response command fed back by the vehicle needs to be received within a specified time, and after the vehicle is confirmed to have correctly received the data packet, the next data packet is sent. And if the diagnosis equipment does not receive the response command fed back by the vehicle within the specified time, confirming that the upgrade fails. However, although network technologies are developed, network delay fluctuation and/or network congestion still occur inevitably in the process of the wireless communication between the diagnostic device and the vehicle, which leads to the timeout of the time for the diagnostic device to receive the response command, thereby failing the remote upgrade. Especially during ECU programming of 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, the embodiment of the application provides a remote upgrading method, a remote upgrading device, a remote upgrading system, an equipment end connector and a computer readable storage medium for a vehicle electronic control unit, wherein when receiving a data packet corresponding to an ith data transmission command in the first N data transmission commands of the data transmission commands sent by a diagnosis device, the equipment end connector sends the data packet corresponding to the ith data transmission command to the vehicle end connector, wherein N is greater than or equal to 2, and i is greater than 0 and less than or equal to N; receiving an ith first response command sent by the vehicle end connector; under the condition that the received first N first response commands are the same, when a data packet corresponding to the jth data transmission command sent by the diagnostic equipment is received, sending the first response command to the diagnostic equipment; and sending the data packet corresponding to the jth data transmission command to the vehicle end connector to indicate the vehicle end connector to send the data packet corresponding to the jth data transmission command to the vehicle, wherein the data packet is used for realizing remote upgrade of the electronic control unit, and j is greater than N. Compared with the prior art that the equipment terminal connector needs to wait for the first response command fed back by the vehicle and then sends the first response command to the diagnostic equipment, the equipment terminal connector can receive and send the data packets corresponding to the first N data transmission commands and receive the first response command fed back by the vehicle aiming at the first N data packets, so that the response mode (namely, replying one first response command) of the vehicle aiming at the data packets of the data transmission commands is learned, and when the data packets sent by the diagnostic equipment and sent by the diagnostic equipment are received again, the equipment terminal connector can replace the vehicle to feed back the first response command to the diagnostic equipment. In order to explain the technical solutions proposed in the embodiments of the present application, the following description will be given by way of specific examples.
An implementation environment of the method for remotely upgrading the vehicle electronic control unit according to the embodiment of the present application is described below with reference to fig. 1.
In fig. 1, the vehicle end connector is wired to the vehicle, and the device end connector is also wired to the diagnostic device, for example, the vehicle end connector is wired to the vehicle via a Controller Area Network (CAN) line, and the device end connector is wired to the diagnostic device via a CAN line. Meanwhile, the vehicle end connector and the equipment end connector are both in wireless connection with the cloud platform, for example, the vehicle end connector and the equipment end connector are both connected with the cloud platform through the internet.
The vehicle end connector CAN interact with a vehicle through a CAN line, collects data of the vehicle, and CAN transmit the data to the equipment end connector through the cloud platform. The equipment end connector CAN interact with the diagnostic equipment through the CAN line, restore the data received from the cloud platform into CAN data, and then transmit the CAN data to the diagnostic equipment. And the equipment end connector CAN also transmit data sent by the diagnostic equipment to the vehicle end connector through the cloud platform, and the vehicle end connector restores the data received from the cloud platform into CAN data and forwards the CAN data to the vehicle, so that remote upgrading is realized.
The following describes a remote upgrading method for a vehicle electronic control unit provided by an embodiment of the application. The remote upgrading method for the vehicle electronic control unit can be applied to the equipment end connector in fig. 1, please refer to fig. 2, and comprises the following steps:
step 201, when receiving a data packet corresponding to the ith data transmission command in 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.
Step 202, receiving the ith first response command sent by the vehicle end connector.
Step 203, under the condition that the received first N first response commands are the same, when a data packet corresponding to the jth data transmission command sent by the diagnostic device is received, sending the first response command to the diagnostic device.
And 204, sending the data packet corresponding to the jth data transmission command 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.
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 is started, the diagnostic device may send a data packet to the device-end connector, where the data packet is used to implement the remote upgrade of the electronic control unit. Specifically, the diagnostic device may first issue a diagnostic initiation request that reaches the vehicle via the device-end connector, the cloud platform, and the vehicle-end connector. Then, the vehicle returns a response to the diagnosis start request, and the diagnosis device starts to send a data packet to the device-side connector after receiving the response.
It should be noted that the data packet sent by the diagnostic device may be a system for scanning the ECU, and the data packets described above in this embodiment of the present application are all data packets corresponding to the data transmission command and are used for performing remote upgrade on the vehicle, that is, the remote upgrade method in this embodiment of the present application is only directed to the data packet corresponding to the data transmission command.
In the process of the remote upgrade, when any data packet in the data corresponding to the previous N data transmission commands is received, the equipment end connector can send the data packet to the vehicle end connector. The data packet is then transmitted by the vehicle end connector to the vehicle. Finally, the vehicle will feed back the first response command upon receiving the data packet. In this way, the device-side connector may receive the first N first response commands sequentially sent by the vehicle-side connector, where an ith first response command in the first N first response commands is a command fed back by the vehicle for a data packet corresponding to the ith data transmission command.
When receiving the N first response commands, the device-side connector may determine whether the N first response commands are the same (i.e., the same command). If the N first reply commands are the same, the first reply commands are stored locally. Taking the example of the use of a Universal Diagnostic Services (UDS) protocol for communication between the vehicle and the Diagnostic device, the Diagnostic device may issue packets via data transfer command 0x36 under the protocol. The UDS protocol provides that the vehicle needs to feed back the response command 0x76 when it receives a data packet of the data transfer command 0x 36. Therefore, the first response command in the embodiment of the present application may be a response command 0x 76. If all of the N first acknowledgement commands received by the device-side connector are acknowledgement commands 0x76, then acknowledgement commands 0x76 may be stored locally.
After receiving the data packet corresponding to the jth data transmission command sent by the diagnostic device, the device-side connector may 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-side connector. Therefore, when the diagnostic device receives the first response command sent by the device end connector, the diagnostic device considers that the first response command is sent by the vehicle and determines that the vehicle has correctly received the data packet, so that the diagnostic device continues to perform the subsequent process of remote upgrading, namely, sends the next data packet, wherein j is an integer greater than N. And on the other hand, when receiving a data packet corresponding to the jth data transmission command sent by the equipment end connector, the vehicle end connector 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, the vehicle may feed back a first response command to the vehicle end connector as specified by the communication protocol used between the vehicle and the diagnostic device, and the vehicle end connector may then send the first response command to the device end connector.
In some embodiments, since the device-side connector has previously sent the first reply command to the diagnostic device in place of the vehicle, the device-side connector may directly discard the first reply command sent by the vehicle-side connector when the device-side connector receives the first reply command from the vehicle-side connector that is fed back by the vehicle. By the method, even if network delay fluctuation and/or network blockage occur between the vehicle and the diagnosis equipment, the diagnosis equipment can still receive the first response command sent by the equipment end connector in time, and therefore the risk of remote upgrading failure is reduced.
It should be understood that the data transmission commands described in the embodiments of the present application may be the data transmission command 0x36 in the UDS protocol, and the first reply command of the vehicle to the data packet of the data transmission command 0x36 may be the reply command 0x76 in the UDS protocol.
In some embodiments, if the first N received first response commands are not the same, in order to ensure that the remote diagnosis does not make an error, when the device end connector receives a data packet corresponding to the jth data transmission command sent by the diagnostic device, the device end connector may send only the data packet corresponding to the jth data transmission command to the vehicle end connector without feeding back the first response command to the diagnostic device instead of the vehicle. The vehicle end connector can send a data packet corresponding to the jth data transmission command to the vehicle, and the vehicle feeds back a first response command aiming at the data packet corresponding to the jth data transmission command. The device end connector may send the first response command to the diagnostic device upon receiving the first response command from the vehicle end connector.
In some embodiments, the method for remotely upgrading an electronic control unit of a vehicle further includes:
the number of unprocessed packets is counted.
The target duration is determined based on the number of outstanding packets.
And from the moment of receiving the data packet corresponding to the jth data transmission command, delaying the target time length and then sending the first response command to the diagnostic equipment.
The definition of the unprocessed data packet may be: if the device end connector receives a data packet sent by the diagnosis device and sends the data packet to the vehicle end connector, but a first response command which is fed back by the vehicle and is aiming at the data packet is not received, the data packet is an unprocessed data packet. Specifically, the device-side connector adds one to the number of unprocessed data packets each time a data packet sent by the diagnostic device is received, and correspondingly, the device-side connector subtracts one from the number of unprocessed data packets each time a first response command fed back by the vehicle is received.
For example, assume that the number of unprocessed packets at the current time is 3. At this time, the device-side connector receives the data packet transmitted from the diagnostic device, updates the number of unprocessed data packets to 4, and transmits the data packets to the vehicle-side 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 equipment end connector through the vehicle end connector. And when the equipment end connector receives the first response command, updating the number of the unprocessed data packets to 3. In this embodiment of the application, after receiving the data packet sent by the diagnostic device, the device-side connector immediately sends the data packet to the vehicle-side connector (the vehicle-side connector adds the data packet to the cache), and after receiving a first response command fed back by the vehicle, the vehicle-side connector immediately sends the first response command to the device-side connector (which represents that the vehicle-side connector has deleted the corresponding data packet from the cache), so that the number of unprocessed data packets can be understood as the number of data packets cached by the vehicle-side connector without considering communication delay.
By counting the number of unprocessed data packets, the equipment end connector can acquire the memory occupation condition of the vehicle end connector. Considering that the speed of sending a data packet to the vehicle end connector by the device end connector is usually higher than the speed of sending a data packet to the vehicle by the vehicle end connector (because the device end connector can immediately respond to the diagnostic device and receive the next data packet sent by the diagnostic device after receiving the data packet sent by the diagnostic device, and the vehicle needs to store the data packet after sending the data packet to the vehicle, the process is time-consuming), during the diagnosis process, the vehicle end connector usually caches a certain amount of data packets, and the data packets occupy a certain size of memory. Based on this, through counting the number of the unprocessed data packets, after the memory occupation condition of the vehicle end connector is determined, the speed of sending the data packets can be controlled by the equipment end connector, so that the condition that the data packets occupy too much memory in the vehicle end connector is avoided.
Wherein the target duration is determined based on the number of unprocessed packets. Specifically, when the device end connector receives a data packet corresponding to a jth data transmission command sent by the diagnostic device, the device end connector first obtains the number of unprocessed data packets at the current time (i.e., the time when the data packet corresponding to the jth data transmission command is received), then determines a target duration according to the number of unprocessed data packets, and sends the stored first response command to the diagnostic device after delaying the target duration from the time when the data packet is received. Under the condition that a plurality of data packets need to be sent by the diagnostic equipment, the diagnostic equipment needs to receive the first response command to send the next data packet after sending one data packet, so that the frequency of sending the data packets by the diagnostic equipment can be reduced by delaying the time of sending the first response command by the equipment end connector, and the problems that the vehicle end connector caches too many data packets and occupies too much memory are solved.
Optionally, the determining the target duration based on the number of unprocessed data packets includes:
and if the number of the unprocessed data packets is less than or equal to a preset first threshold, determining a preset first time length as a target time length.
And if the number of the unprocessed data packets is greater than the first threshold and less than or equal to a preset second threshold, determining the preset second time length as the target time length.
And if the number of the unprocessed data packets is larger than the second threshold, determining the preset third time length as the target time length.
In this embodiment of the present application, when the device end connector receives a jth data packet of a data transmission command sent by the diagnostic device, the device end connector first obtains the number of unprocessed data packets at a current time (i.e., a time when the jth data packet is received). And if the number of the unprocessed data packets is smaller than a preset first threshold value, determining a preset first time length as a target time length. And if the number of the unprocessed data packets is greater than the first threshold and less than or equal to a preset second threshold, determining the preset second time length as the target time length. And if the number of the unprocessed data packets is larger than the second threshold, determining a preset third time length as the target time length. The first threshold is smaller than the second threshold, the first duration is smaller than the second duration, and the second duration is smaller than the third duration.
Taking the communication protocol used between the diagnostic device and the vehicle as the UDS protocol for example, the UDS protocol provides that if no response is received within 55 milliseconds after the diagnostic device issues a service request, the response is determined to be timed out, resulting in a failed upgrade. Based on this, as one example, the first time period may be determined to be 0, the second time period may be determined to be 45 milliseconds, and the third time period may be determined to be 1 second.
In some embodiments, in order to prevent the diagnosis device from receiving the first response command time out in consideration that the target time length may be greater than the timeout time length, if the target time length is greater than a preset time length threshold, the remote upgrade method for the vehicle electronic control unit further includes: a first timeout extending command is sent to the diagnostic device.
Wherein the first timeout extending command is used for indicating that the diagnosis equipment is to wait for the first response command for an extended time. Specifically, after issuing a packet, if a first reply command is not received within a time of waiting for the first reply command, the diagnostic device considers that the first reply command for the packet has been received timed out, such as 55 milliseconds in the UDS protocol. If the time length threshold is greater than or equal to the time length of waiting for the first response command before the extension, when the target time length is equal to the time length threshold (the condition for sending the first timeout extension command is not met), the target time length plus the transmission time length of the first response command will exceed the time length of waiting for the first response command before the extension, so that the reception of the first response command by the diagnostic device is timeout. It should be noted that the extended time for waiting for the first response command is only valid for the data packet sent this time, and when the diagnostic device sends the next data packet, the time for waiting for the first response command before the extension is resumed to determine whether the first response command for the next data packet is received overtime.
For example, assume that the preset time waiting for the first response command is 55 msec. The diagnostic device sends a data packet 1, then receives a first timeout extending command sent by the device end connector, so that the time for waiting for the first response command is extended to 5 seconds, and as long as the diagnostic device can receive the first response command corresponding to the data packet 1 within 5 seconds after sending the data packet, the diagnostic device determines that the time for receiving the first response command is not timeout. The diagnostic device receives the first response command corresponding to the data packet 1 within 5 seconds and then transmits the data packet 2, and then for the data packet 2, the diagnostic device will still determine whether the time for receiving the first response command corresponding to the data packet 2 is overtime according to the time for waiting for the first response command before being extended (i.e. 55 milliseconds).
In some embodiments, the data packet includes a first frame and a consecutive frame. Taking the UDS protocol as an example for communication between the vehicle and the diagnostic device, the first frame includes the total length of data in the packet, the SID (Service Identity Document) and the data portion. The first byte of each successive frame identifies the frame sequence number to indicate that the successive frame is the next successive frame in the data packet. Based on this, the remote upgrading method for the vehicle electronic control unit further includes:
and when the first frame in the data packet sent by the diagnostic equipment is received, sending the flow control frame to the diagnostic equipment.
And if all the continuous frames in the data packet are received, determining that the data packet sent by the diagnostic equipment is received.
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, wherein the flow control frame is used for instructing the diagnostic device to send the continuous frames in the data packet. That is, after sending the first frame, the diagnostic device will send the remaining consecutive frames in the data packet only after receiving the flow control frame until all the consecutive 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 frame is received completely, that is, the data packet sent by the diagnostic device is received.
Optionally, the method for remotely upgrading the vehicle electronic control unit further includes:
upon receiving a verification command sent by the diagnostic device, sending the verification command to the vehicle end fitting, and sending a second timeout extending command to the diagnostic device.
In the embodiment of the application, the verification command is used for indicating the vehicle to verify whether the data packet for the remote upgrade is completely received. Due to poor network or other reasons, the data packets received by the vehicle in the remote upgrade process often have the condition of packet loss, so that the diagnostic device can send a check command to the device end connector after sending all the data packets for the remote upgrade to the device end connector every time the diagnostic device is remotely upgraded, the device end connector can directly send the check command to the vehicle end connector, and then the vehicle end connector sends the check command to the vehicle. After the vehicle verifies the data packet according to the verification command, a second response command can be fed back, and the second response command is sent to the diagnostic equipment through the vehicle end connector and the equipment end connector. The diagnostic device may determine whether the time for receiving the second response command is overtime according to the time for waiting for the second response command, that is, if the diagnostic device does not receive the second response command within the time for waiting for the second response command after sending the verification command, it determines that the second response command for the verification command is received overtime. In order to avoid the time-out of the diagnostic device receiving the second response command in consideration of the time taken for the vehicle to verify the data packet, the device-side connector may further transmit a second timeout extending command to the diagnostic device when receiving the verification command, the second timeout extending command being used to instruct the diagnostic device to extend the time to wait for the second response command.
In some embodiments, the device end connector may send a second reply command to the diagnostic device if the second reply command sent by the vehicle end connector is received. Wherein the second response command is fed back after the vehicle verifies the data packet based on the verification command.
For ease of understanding, the interaction flow between the vehicle, the vehicle end connector, the equipment end connector and the diagnostic equipment in the embodiment of the present application is described below with reference to fig. 3.
Step 301, the device end connector sends a data packet corresponding to the ith data transmission command in the first N data transmission commands to the vehicle end connector.
And step 302, the vehicle end connector sends a data packet corresponding to the ith data transmission command to the vehicle.
And step 303, the vehicle receives the data packet corresponding to the ith data transmission command, and feeds back the ith first response command to the vehicle end connector.
And step 304, the vehicle end connector sends the ith first response command fed back by the vehicle to the equipment end connector.
In step 305, after the device-side connector receives the first N first response commands sent by the vehicle-side connector, it is determined that the first N first response commands are the same, and then the first response commands are stored.
At step 306, the diagnostic device determines that a remote upgrade has begun.
Step 307, the diagnostic device sends the first frame in the data packet corresponding to the jth data transmission command.
And step 308, after the device end connector receives the first frame in the data packet corresponding to the jth data transmission command, the device end connector sends a flow control frame to the diagnostic device.
Step 309, after receiving the flow control frame, the diagnostic device sends the continuous frame in the data packet corresponding to the jth data transmission command to the device end connector.
In step 310, after the device end connector finishes all the continuous frames in the data packet corresponding to the jth data transmission command, it is determined that the data packet corresponding to the jth data transmission command is received.
Step 311, when the device end connector determines that the data packet corresponding to the jth data transmission command is received, the device end connector obtains the stored first response command.
In step 312, when the device end connector determines that the data packet corresponding to the jth data transmission command is received, the device end connector sends the data packet corresponding to the jth data transmission command to the vehicle end connector.
In step 313, the device-side connector sends the first response command to the diagnostic device.
And step 314, after receiving the data packet corresponding to the jth data transmission command, the vehicle end connector sends the first frame in the data packet corresponding to the jth data transmission command to the vehicle.
And 315, after receiving the first frame in the data packet corresponding to the jth data transmission command, the vehicle sends a flow control frame to the vehicle end connector.
And step 316, after the vehicle end connector receives the flow control frame, sending the continuous frames in the data packet corresponding to the jth data transmission command to the vehicle.
Step 317, after the vehicle collects all the continuous frames in the data packet corresponding to the jth data transmission command, determining to receive the data packet corresponding to the jth data transmission command.
And step 318, when the vehicle determines that the data packet corresponding to the jth data transmission command is received, feeding back the first response command to the vehicle end connector.
Step 319, the vehicle end connector, upon receiving the first response command, sends the first response command to the device end connector.
At step 320, the equipment end connector discards the first reply command received from the vehicle end connector.
In step 321, after the diagnostic device determines that the first response command is received, the diagnostic device sends a verification command to the device-side connector.
In step 322, the device end connector determines that all data packets for the present remote upgrade have been sent, and sends the verification command to the vehicle end connector.
At step 323, the vehicle end fitting sends a verification command to the vehicle.
And 324, after the vehicle receives the verification command, verifying the data packet for the remote upgrade according to the verification command to determine whether the data packet for the remote upgrade is completely received.
Step 325, after the vehicle finishes checking the data packet, feeding back a second response command to the vehicle end connector.
The vehicle end connector sends a second reply command to the equipment end connector, step 326.
The device-side connector sends 327 a second response command to the diagnostic device.
As can be seen from the above, in the solution of the present application, when receiving a data packet corresponding to an ith data transmission command in the first N data transmission commands of the data transmission command 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, where N is greater than or equal to 2, and i is greater than 0 and less than or equal to N; receiving an ith first response command sent by the vehicle end connector; under the condition that the received first N first response commands are the same, when a data packet corresponding to the jth data transmission command sent by the diagnostic equipment is received, sending the first response command to the diagnostic equipment; and sending the data packet corresponding to the jth data transmission command to the vehicle end connector to indicate the vehicle end connector to send the data packet corresponding to the jth data transmission command to the vehicle, wherein the data packet is used for realizing remote upgrade of the electronic control unit, and j is larger than N. Compared with the prior art that the equipment terminal connector needs to wait for the first response command fed back by the vehicle and then sends the first response command to the diagnostic equipment, the equipment terminal connector can receive and send the data packets corresponding to the first N data transmission commands and receive the first response command fed back by the vehicle aiming at the first N data packets, so that the response mode (namely, replying one first response command) of the vehicle aiming at the data packets of the data transmission commands is learned, and when the data packets sent by the diagnostic equipment and sent by the diagnostic equipment are received again, the equipment terminal connector can replace the vehicle to feed back the first response command to the diagnostic equipment.
Corresponding to the method for remotely upgrading the vehicle electronic control unit, the embodiment of the application also provides a device for remotely upgrading the vehicle electronic control unit. As shown in fig. 4, a remote upgrade apparatus 400 in the embodiment of the present application is applied to an equipment end connector, and includes:
the first sending unit 401 is configured to send a data packet corresponding to an ith data transmission command to the vehicle end connector when receiving a data packet corresponding to the ith data transmission command in the first N data transmission commands sent by the diagnostic device, where N is greater than or equal to 2, and i is greater than 0 and less than or equal to N;
a first receiving unit 402, configured to receive an ith first response command sent by the vehicle end connector, where the ith first response command is a command fed back by the vehicle for a data packet corresponding to the ith data transmission command;
a second sending unit 403, configured to send, when receiving a data packet corresponding to a jth data transmission command sent by the diagnostic device, the first N first response commands that are received are the same, the first response command to the diagnostic device, where j is greater than N;
a third sending unit 404, configured to send a data packet corresponding to the jth data transmission command to the vehicle end connector, so as to instruct the vehicle end connector to send the data packet corresponding to the jth data transmission command to the vehicle, where the data packet is used to implement remote upgrade of the electronic control unit.
Optionally, the remote upgrade apparatus 400 further includes:
a counting unit, configured to count the number of unprocessed packets, where the number of unprocessed packets is increased by one each time the device-side connector receives a packet sent by the diagnostic device, and the number of unprocessed packets is decreased by one each time a first response command sent by the vehicle-side connector is received;
a time length determining unit, configured to determine a target time length based on the number of the unprocessed data packets;
a fourth sending unit, configured to send the first response command to the diagnostic device after delaying the target time duration from a time when a data packet corresponding to the jth data transmission command is received.
Optionally, if the target duration is greater than a preset duration threshold, the remote upgrade apparatus 400 further includes:
a fifth sending unit, configured to send a first timeout extending command to the diagnostic device, where the first timeout extending command is used to instruct the diagnostic device to extend a time for waiting for a first response command, and the time threshold is smaller than the time for waiting for the first response command before the extension.
Optionally, the remote upgrade apparatus 400 further includes:
a sixth sending unit, configured to, when receiving a data packet corresponding to a jth data transmission command sent by the diagnostic device under the condition that the received first N first response commands are different, send the data packet corresponding to the jth data transmission command to the vehicle end connector;
a seventh sending unit, configured to send the first response command fed back by the vehicle to the diagnostic device when the first response command fed back by the vehicle is received from the vehicle end connector.
Optionally, the remote upgrade apparatus 400 further includes:
and the command discarding unit is used for discarding the first response command fed back by the vehicle when the first response command fed back by the vehicle is received from the vehicle end connector.
Optionally, the remote upgrade apparatus 400 further includes:
an eighth sending unit, configured to send, when receiving a verification command sent by the diagnostic device, the verification command to the vehicle end connector to instruct the vehicle end connector to send the verification command to the vehicle, where the verification command is used to instruct the vehicle to verify whether a data packet for the current remote upgrade is received completely; and
and a ninth transmitting unit, configured to transmit a second timeout extending command to the diagnostic device, where the second timeout extending command is used to instruct the diagnostic device to extend a time for waiting for a second response command, and the second response command is a response command that the vehicle needs to feed back when receiving the verification command.
Optionally, the remote upgrade apparatus 400 further includes:
a tenth transmitting unit configured to transmit a second response command, which is fed back by the vehicle based on the verification command, to the diagnostic device when the second response command is received from the vehicle end connector.
As can be seen from the above, in the solution of the present application, when receiving a data packet corresponding to an ith data transmission command in the first N data transmission commands of the data transmission command 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, where N is greater than or equal to 2, and i is greater than 0 and less than or equal to N; receiving an ith first response command sent by the vehicle end connector; under the condition that the received first N first response commands are the same, when a data packet corresponding to the jth data transmission command sent by the diagnostic equipment is received, sending the first response command to the diagnostic equipment; and sending the data packet corresponding to the jth data transmission command to the vehicle end connector to indicate the vehicle end connector to send the data packet corresponding to the jth data transmission command to the vehicle, wherein the data packet is used for realizing remote upgrade of the electronic control unit, and j is greater than N. Compared with the prior art that the equipment terminal connector needs to wait for the first response command fed back by the vehicle and then sends the first response command to the diagnostic equipment, the equipment terminal connector can receive and send the data packets corresponding to the first N data transmission commands and receive the first response command fed back by the vehicle aiming at the first N data packets, so that the response mode (namely, replying one first response command) of the vehicle aiming at the data packets of the data transmission commands is learned, and when the data packets sent by the diagnostic equipment and sent by the diagnostic equipment are received again, the equipment terminal connector can replace the vehicle to feed back the first response command to the diagnostic equipment.
Corresponding to the above-provided method for remotely upgrading an electronic control unit of a vehicle, an embodiment of the present application further provides an equipment end connector, please refer to fig. 5, where the equipment end connector 5 in the embodiment of the present application includes: a memory 501, one or more processors 502 (only one shown in fig. 5), and a computer program stored on the memory 501 and executable on the processors. Wherein: the memory 501 is used for storing software programs and units, and the processor 502 executes various functional applications and data processing by operating the software programs and units stored in the memory 501. Specifically, the processor 502 realizes the following steps by running the above-mentioned computer program stored in the memory 501:
when a data packet corresponding to the ith data transmission command in the first N data transmission commands sent by the diagnostic equipment is received, sending the data packet corresponding to the ith data transmission command to a vehicle end connector, wherein N is more than or equal to 2, and i is more than 0 and less than or equal to N;
receiving an ith first response command sent by the vehicle end connector, wherein the ith first response command is a command fed back by the vehicle aiming at a data packet corresponding to the ith data transmission command;
under the condition that the received first N first response commands are the same, when a data packet corresponding to the jth data transmission command sent by the diagnostic equipment is received, sending the first response command to the diagnostic equipment, wherein j is larger than N; and
and sending the data packet corresponding to the jth data transmission command 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, wherein the data packet is used for realizing remote upgrade of the electronic control unit.
In a second possible implementation provided on the basis of the first possible implementation, the processor 502 further implements the following steps when executing the computer program stored in the memory 501:
counting the number of unprocessed data packets, wherein the number of unprocessed data packets is increased by one when the equipment end connector receives a data packet sent by the diagnostic equipment, and the number of unprocessed data packets is decreased by one when a first response command sent by the vehicle end connector is received;
determining a target duration based on the number of the unprocessed data packets;
and after delaying the target time length from the moment of receiving the data packet corresponding to the jth data transmission command, sending the first response command to the diagnostic equipment.
In a third possible implementation manner provided on the basis of the second possible implementation manner, if the target duration is greater than a preset duration threshold, the processor 502 further implements the following steps by running the computer program stored in the memory 501:
and sending a first timeout extending command to the diagnostic equipment, wherein the first timeout extending command is used for indicating that the diagnostic equipment extends the time for waiting for the first response command, and the time threshold is smaller than the time for waiting for the first response command before extension.
In a fourth possible implementation based on the first possible implementation, the processor 502 further implements the following steps when executing the computer program stored in the memory 501:
under the condition that the received first N first response commands are different, when a data packet corresponding to the jth data transmission command sent by the diagnostic equipment is received, sending the data packet corresponding to the jth data transmission command to the vehicle end connector;
and when receiving a first response command fed back by the vehicle from the vehicle end joint, sending the first response command fed back by the vehicle to the diagnostic equipment.
In a fifth possible implementation form based on the first possible implementation form, after the data packet corresponding to the jth data transmission command is sent to the vehicle end connector, the processor 502 executes the computer program stored in the memory 501 to further implement the following steps:
and when receiving the first response command fed back by the vehicle from the vehicle end connector, discarding the first response command fed back by the vehicle.
In a sixth possible implementation manner provided on the basis of any one of the first to fifth possible implementation manners, the processor 502 further implements the following steps when executing the above computer program stored in the memory 501:
when a verification command sent by the diagnostic equipment is received, 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 for instructing the vehicle to verify whether a data packet for the remote upgrade is received completely; and
and sending a second timeout extending command to the diagnostic device, wherein the second timeout extending command is used for indicating that the diagnostic device extends the waiting time of a second response command, and the second response command is a response command which needs to be fed back when the vehicle receives the verification command.
In a seventh possible implementation form provided as a basis for the sixth possible implementation form, after the sending of the verification command to the vehicle end connector, the processor 502 further implements the following steps when executing the computer program stored in the memory 501:
and when a second response command fed back by the vehicle based on the verification command is received from the vehicle end connector, transmitting the second response command to the diagnostic device.
It should be understood that in the embodiments of the present Application, the Processor 502 may be a Central Processing Unit (CPU), and the Processor may be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Memory 501 may include both read-only memory and random access memory and provides instructions and data to processor 502. Some or all of the memory 501 may also include non-volatile random access memory. For example, the memory 501 may also store device class information.
As can be seen from the above, in the solution of the present application, when receiving a data packet corresponding to an ith data transmission command in the first N data transmission commands of the data transmission command 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, where N is greater than or equal to 2, and i is greater than 0 and less than or equal to N; receiving an ith first response command sent by the vehicle end connector; under the condition that the received first N first response commands are the same, when a data packet corresponding to the jth data transmission command sent by the diagnostic equipment is received, sending the first response command to the diagnostic equipment; and sending the data packet corresponding to the jth data transmission command to the vehicle end connector to indicate the vehicle end connector to send the data packet corresponding to the jth data transmission command to the vehicle, wherein the data packet is used for realizing remote upgrade of the electronic control unit, and j is greater than N. Compared with the prior art that the equipment terminal connector needs to wait for the first response command fed back by the vehicle and then sends the first response command to the diagnostic equipment, the equipment terminal connector can receive and send the data packets corresponding to the first N data transmission commands and receive the first response command fed back by the vehicle aiming at the first N data packets, so that the response mode (namely, replying one first response command) of the vehicle aiming at the data packets of the data transmission commands is learned, and when the data packets sent by the diagnostic equipment and sent by the diagnostic equipment are received again, the equipment terminal connector can replace the vehicle to feed back the first response command to the diagnostic equipment.
Corresponding to the above provided remote upgrading method for the vehicle electronic control unit, the embodiment of the application also provides a remote upgrading system for the vehicle electronic control unit, which includes:
an equipment end fitting as claimed in any preceding embodiment, the equipment end fitting being connected to a diagnostic device;
the vehicle end connector according to any one of the embodiments above, wherein the vehicle end connector is connected to a vehicle, and is configured to implement data forwarding between the vehicle and the equipment end connector.
It should be noted that the diagnostic device in the embodiment of the present application may be the diagnostic device mentioned in any one of the embodiments described above, and the vehicle may be the vehicle mentioned in any one of the embodiments described above.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned functions may be distributed as different functional units and modules according to needs, that is, the internal structure of the apparatus may be divided into different functional units or modules to implement all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art would appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of external device software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described system embodiments are merely illustrative, and for example, the division of the above-described modules or units is only one logical functional division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The integrated unit may be stored in a computer-readable storage medium if it is implemented in the form of a software functional unit and sold or used as a separate product. Based on such understanding, all or part of the flow in the method of the embodiments described above can be realized by the present application, and the computer program can also be executed by associated hardware, and the computer program can be stored in a computer readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments described above can be realized. The computer program includes computer program code, and the computer program code may be in a source code form, an object code form, an executable file or some intermediate form. The computer-readable storage medium may include: any entity or device capable of carrying the above-described computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer readable Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signal, telecommunication signal, software distribution medium, etc. It should be noted that the computer readable storage medium may contain other contents which can be appropriately increased or decreased according to the requirements of the legislation and the patent practice in the jurisdiction, for example, in some jurisdictions, the computer readable storage medium does not include an electrical carrier signal and a telecommunication signal according to the legislation and the patent practice.
The above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A remote upgrading method of a vehicle electronic control unit is applied to an equipment end connector and comprises the following steps:
when a data packet corresponding to the ith data transmission command in the first N data transmission commands sent by the diagnostic equipment is received, sending the data packet corresponding to the ith data transmission command to a vehicle end connector, wherein N is more than or equal to 2, and i is more than 0 and less than or equal to N;
receiving an ith first response command sent by the vehicle end connector, wherein the ith first response command is a command fed back by the vehicle aiming at a data packet corresponding to the ith data transmission command;
under the condition that the received first N first response commands are the same, when a data packet corresponding to the jth data transmission command sent by the diagnostic equipment is received, sending the first response command to the diagnostic equipment, wherein j is larger than N; and
and sending the data packet corresponding to the jth data transmission command to the vehicle end connector to indicate the vehicle end connector to send the data packet corresponding to the jth data transmission command to the vehicle, wherein the data packet is used for realizing remote upgrading of the electronic control unit.
2. The remote upgrade method of a vehicle electronic control unit according to claim 1, further comprising:
counting the number of unprocessed data packets, wherein the number of unprocessed data packets is increased by one when the device end connector receives a data packet sent by the diagnostic device, and the number of unprocessed data packets is decreased by one when a first response command sent by the vehicle end connector is received;
determining a target duration based on the number of the unprocessed data packets;
and after the target time length is delayed from the moment of receiving the data packet corresponding to the jth data transmission command, sending the first response command to the diagnostic equipment.
3. The remote upgrade method of a vehicle electronic control unit according to claim 2, wherein if the target duration is greater than a preset duration threshold, the remote upgrade method further comprises:
sending a first timeout extending command to the diagnostic device, wherein the first timeout extending command is used for indicating that the diagnostic device extends the time for waiting for the first response command, and the time threshold is smaller than the time for waiting for the first response command before extension.
4. The remote upgrade method of a vehicle electronic control unit according to claim 1, further comprising:
under the condition that the received first N first response commands are different, when a data packet corresponding to the jth data transmission command sent by the diagnostic equipment is received, sending the data packet corresponding to the jth data transmission command to the vehicle end connector;
when receiving a first response command fed back by the vehicle from the vehicle end joint, sending the first response command fed back by the vehicle to the diagnostic device.
5. The remote upgrade method for a vehicle electronic control unit as claimed in claim 1, wherein after said transmitting a data packet corresponding to said jth data transmission command to said vehicle end fitting, said remote upgrade method further comprises:
when receiving a first response command fed back by the vehicle from the vehicle end connector, discarding the first response command fed back by the vehicle.
6. The remote upgrade method of a vehicle electronic control unit according to any one of claims 1 to 5, characterized by further comprising:
when a verification command sent by the diagnostic equipment is received, sending the verification command to the vehicle end connector to indicate the vehicle end connector to send the verification command to the vehicle, wherein the verification command is used for indicating whether the data packet for the remote upgrade is completely received or not in the vehicle verification; and
and sending a second timeout extending command to the diagnostic equipment, wherein the second timeout extending command is used for indicating that the diagnostic equipment extends the waiting time of a second response command, and the second response command is a response command which needs to be fed back when the vehicle receives the verification command.
7. The remote upgrade method for a vehicle electronic control unit as claimed in claim 6, wherein after said transmitting said verification command to said vehicle end fitting, said remote upgrade method further comprises:
when a second reply command fed back by the vehicle based on the verification command is received from the vehicle end fitting, the second reply command is sent to the diagnostic device.
8. A remote upgrading device of a vehicle electronic control unit is applied to an equipment end connector and comprises the following components:
the first sending unit is used for sending the data packet corresponding to the ith data transmission command to the vehicle end connector when receiving the data packet corresponding to the ith data transmission command in the first N data transmission commands sent by the diagnostic equipment, wherein N is more than or equal to 2, and i is more than 0 and less than or equal to N;
a first receiving unit, configured to receive an ith first response command sent by the vehicle end connector, where the ith first response command is a command fed back by the vehicle for a data packet corresponding to the ith data transmission command;
the second sending unit is used for sending the first response command to the diagnosis equipment when receiving a data packet corresponding to a jth data transmission command sent by the diagnosis equipment under the condition that the received first N first response commands are the same, wherein j is larger than N;
and the third sending unit is used for sending the data packet corresponding to the jth data transmission command to the vehicle end connector so as to instruct the vehicle end connector to send the data packet corresponding to the jth data transmission command to the vehicle, wherein the data packet is used for realizing remote upgrade of the electronic control unit.
9. An equipment-side connector comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the method of any one of claims 1 to 7 when executing the computer program.
10. A remote upgrade system for a vehicle electronic control unit, comprising:
the equipment end fitting of claim 9, the equipment end fitting being connected with a diagnostic device;
the vehicle end connector is connected with a vehicle and used for realizing data forwarding between the vehicle and the equipment end connector.
CN202210454785.4A 2022-04-24 2022-04-24 Remote upgrading method, device and system and equipment end connector Pending CN114866585A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210454785.4A CN114866585A (en) 2022-04-24 2022-04-24 Remote upgrading method, device and system and equipment end connector

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210454785.4A CN114866585A (en) 2022-04-24 2022-04-24 Remote upgrading method, device and system and equipment end connector

Publications (1)

Publication Number Publication Date
CN114866585A true CN114866585A (en) 2022-08-05

Family

ID=82634233

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210454785.4A Pending CN114866585A (en) 2022-04-24 2022-04-24 Remote upgrading method, device and system and equipment end connector

Country Status (1)

Country Link
CN (1) CN114866585A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115314540A (en) * 2022-08-09 2022-11-08 深圳市元征科技股份有限公司 Request response timeout processing method, device, equipment and medium

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05284573A (en) * 1992-04-03 1993-10-29 Mitsubishi Electric Corp Remote fault diagnostic system for numerical controller
CN106936622A (en) * 2015-12-31 2017-07-07 阿里巴巴集团控股有限公司 A kind of distributed memory system upgrade method and device
WO2018045700A1 (en) * 2016-09-07 2018-03-15 中兴通讯股份有限公司 On-board automatic diagnosis system device and upgrading method therefor
CN109697081A (en) * 2018-12-19 2019-04-30 广州小鹏汽车科技有限公司 Firmware security upgrading method, device, onboard system and vehicle
CN111427335A (en) * 2020-04-22 2020-07-17 深圳市元征科技股份有限公司 Vehicle remote diagnosis method, equipment connector and vehicle connector
CN111552266A (en) * 2020-04-22 2020-08-18 深圳市元征科技股份有限公司 Vehicle remote diagnosis method, system, equipment connector and vehicle connector
CN111552268A (en) * 2020-04-22 2020-08-18 深圳市元征科技股份有限公司 Vehicle remote diagnosis method, equipment connector and vehicle connector
CN111901076A (en) * 2020-09-03 2020-11-06 北京经纬恒润科技有限公司 Vehicle diagnosis data forwarding method and device and gateway
US20210065474A1 (en) * 2019-09-02 2021-03-04 Launch Tech Co., Ltd. Method for performing vehicle remote diagnosis and related devices
US20210134086A1 (en) * 2018-12-29 2021-05-06 Autel Intelligent Technology Corp., Ltd. Data transmission method in vehicle communication interface apparatus and vehicle communication interface apparatus
CN114253251A (en) * 2022-01-20 2022-03-29 深圳市元征科技股份有限公司 Vehicle remote diagnosis method and device, equipment connector and storage medium
CN114281065A (en) * 2021-12-28 2022-04-05 深圳市元征科技股份有限公司 Electronic control unit flashing method and device for vehicle and diagnostic equipment
CN114827206A (en) * 2022-04-24 2022-07-29 深圳市元征科技股份有限公司 Remote upgrading method, device and system and equipment end connector

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05284573A (en) * 1992-04-03 1993-10-29 Mitsubishi Electric Corp Remote fault diagnostic system for numerical controller
CN106936622A (en) * 2015-12-31 2017-07-07 阿里巴巴集团控股有限公司 A kind of distributed memory system upgrade method and device
WO2018045700A1 (en) * 2016-09-07 2018-03-15 中兴通讯股份有限公司 On-board automatic diagnosis system device and upgrading method therefor
CN109697081A (en) * 2018-12-19 2019-04-30 广州小鹏汽车科技有限公司 Firmware security upgrading method, device, onboard system and vehicle
US20210134086A1 (en) * 2018-12-29 2021-05-06 Autel Intelligent Technology Corp., Ltd. Data transmission method in vehicle communication interface apparatus and vehicle communication interface apparatus
US20210065474A1 (en) * 2019-09-02 2021-03-04 Launch Tech Co., Ltd. Method for performing vehicle remote diagnosis and related devices
CN111552266A (en) * 2020-04-22 2020-08-18 深圳市元征科技股份有限公司 Vehicle remote diagnosis method, system, equipment connector and vehicle connector
CN111552268A (en) * 2020-04-22 2020-08-18 深圳市元征科技股份有限公司 Vehicle remote diagnosis method, equipment connector and vehicle connector
CN111427335A (en) * 2020-04-22 2020-07-17 深圳市元征科技股份有限公司 Vehicle remote diagnosis method, equipment connector and vehicle connector
CN111901076A (en) * 2020-09-03 2020-11-06 北京经纬恒润科技有限公司 Vehicle diagnosis data forwarding method and device and gateway
CN114281065A (en) * 2021-12-28 2022-04-05 深圳市元征科技股份有限公司 Electronic control unit flashing method and device for vehicle and diagnostic equipment
CN114253251A (en) * 2022-01-20 2022-03-29 深圳市元征科技股份有限公司 Vehicle remote diagnosis method and device, equipment connector and storage medium
CN114827206A (en) * 2022-04-24 2022-07-29 深圳市元征科技股份有限公司 Remote upgrading method, device and system and equipment end connector

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115314540A (en) * 2022-08-09 2022-11-08 深圳市元征科技股份有限公司 Request response timeout processing method, device, equipment and medium

Similar Documents

Publication Publication Date Title
CN114827206A (en) Remote upgrading method, device and system and equipment end connector
US8174975B2 (en) Network adapter with TCP support
CN102510409A (en) Method and system for quickly and remotely updating program of mobile terminal by using wireless network
CN112751737B (en) CAN message transmission method at vehicle end
CN107342848A (en) A kind of adaptive code stream transmission method, device and equipment
CN113746892B (en) Remote upgrading method and wireless terminal equipment
CN114866585A (en) Remote upgrading method, device and system and equipment end connector
US20210184973A1 (en) Vehicle gateway and method of controlling the same
CN106713044B (en) Data upgrading method and device
JP2002527935A (en) Data communication methods and systems
US20230090382A1 (en) Devices, Methods, and System for Reducing Latency in Remote Direct Memory Access System
CN111736866A (en) One-to-one and one-to-many compatible online upgrading method and terminal equipment
US8943362B2 (en) Control and monitoring for fast millimeter-wave link using out-of-band wireless channel
CN110913431A (en) Data wireless transmission method and device, computer equipment and storage medium
CN112395237A (en) Method and system for communication between at least two controllers
CN107317731A (en) A kind of detection method of client and server connection state
CN109889368B (en) GPRS remote upgrading method based on STM32 controller
US7213074B2 (en) Method using receive and transmit protocol aware logic modules for confirming checksum values stored in network packet
CN115344405A (en) Data processing method, network interface card, electronic equipment and storage medium
US20090193422A1 (en) Universal serial bus driving device and method
KR102418404B1 (en) Apparatus and method for controlling guided control computer to update guided weapon embedded software
CN111694581B (en) Software upgrading method of automobile noise reduction system and automobile noise reduction system
CN111427606B (en) Vehicle MCU upgrading method based on full duplex SPI
CN114650194B (en) Data communication method, device, electronic equipment and storage medium
JP3833746B2 (en) Checkpoint communication processing system and checkpoint communication processing method

Legal Events

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