Disclosure of Invention
The embodiment of the application provides a vehicle data flashing method, a vehicle data diagnosis device and a vehicle data flashing system, and aims to solve the problem that flashing cannot be performed when a network fails or a server storing a flashing file fails, so that flashing efficiency and convenience are affected.
In a first aspect, a method for vehicle data flashing is applied to a first diagnostic device, the first diagnostic device is in communication connection with a second diagnostic device, the first diagnostic device is in communication connection with a first vehicle, the second diagnostic device is in communication connection with a second vehicle, and the communication connection is a local area network communication connection or an electrical connection, and the method includes:
when second vehicle information sent by the second diagnosis equipment is received, the first vehicle information is obtained, and whether the first vehicle information is matched with the second vehicle information is detected;
when the first vehicle information is detected to be matched with the second vehicle information, sending matching information to the second diagnosis device, so that the second diagnosis device returns the flash data of a second ECU of the second vehicle when receiving the matching information;
and when the flash data is received, performing data flash on the first ECU of the first vehicle.
In one embodiment, when receiving second vehicle information sent by a second diagnostic device, the acquiring the first vehicle information and detecting whether the first vehicle information and the second vehicle information match includes:
when a second vehicle identifier sent by a second diagnosis device is received, the first vehicle identifier is obtained;
when the first vehicle identifier is detected to be matched with the second vehicle identifier, sending a first matching instruction to the second diagnostic equipment, so that when the second diagnostic equipment receives the first matching instruction, acquiring a second ECU identifier of the second vehicle and a second software identifier corresponding to the second ECU, and returning the second ECU identifier and the second software identifier to the first diagnostic equipment;
when the second ECU identifier and the second software identifier sent by the second diagnostic equipment are received, the first ECU identifier of the first vehicle and the first software identifier of the first ECU are obtained;
and when the second ECU identification is detected to be matched with the first ECU identification and the second software identification is the updated version identification of the second software, determining that the first vehicle information is matched with the second vehicle information.
In one embodiment, the flashing data to the first ECU of the first vehicle upon receiving the flash data includes:
when the flash address information and the flash data size are received, sending a request instruction for obtaining flash data to the second diagnostic equipment, so that the second diagnostic equipment sends the flash data to the first diagnostic equipment in a grouping mode when receiving the request instruction for the flash data;
when the flash data is received, performing data flash on a first ECU of the first vehicle according to the flash address information;
and when the total amount of the received brushing data reaches the size of the brushing data and brushing of all the received brushing data is completed, judging that the brushing of the first ECU of the first vehicle is successful.
In one embodiment, the sending, to the second diagnostic device, a request instruction for obtaining the flush data when the flush address information and the flush data size are received includes:
when the flashing address information and the flashing data size are received, a request of safety verification is sent to the first ECU;
and when receiving the verification success command sent by the first ECU, sending a request command for acquiring the flash data to the second diagnostic equipment.
In a second aspect, the present application provides a method for vehicle data flashing, which is applied to a second diagnostic device, where the second diagnostic device is in communication connection with a first diagnostic device, the first diagnostic device is in communication connection with a first vehicle, and the second diagnostic device is in communication connection with a second vehicle, where the communication connection is a local area network communication connection or an electrical connection, and the method includes:
when a flash instruction sent by a user is received, obtaining the second vehicle information, and sending the second vehicle information to the first diagnosis device, so that the first diagnosis device returns matching information to the second diagnosis device when detecting that the first vehicle information is matched with the second vehicle information;
and when the matching information is received, the flash data of the second ECU of the second vehicle is sent to the first diagnostic equipment, so that the first diagnostic equipment performs data flash on the first ECU of the first vehicle when receiving the flash data.
In one embodiment, when a flash instruction sent by a user is received, the second vehicle information is obtained and sent to the first diagnostic device, so that when the first diagnostic device detects that the first vehicle information is matched with the second vehicle information, the returning of matching information to the second diagnostic device includes:
when a brushing instruction sent by a user is received, acquiring a second vehicle identifier, and sending the second vehicle identifier to the first diagnostic equipment, so that the first diagnostic equipment sends a first matching instruction to the second diagnostic equipment when detecting that the first vehicle identifier is matched with the second vehicle identifier;
and when the first matching instruction is received, acquiring a second ECU identifier of the second vehicle and a second software identifier corresponding to the second ECU, and returning the second ECU identifier and the second software identifier to the first diagnostic equipment, so that when the first diagnostic equipment detects that the second ECU identifier is matched with the first ECU identifier and the second software identifier is an updated version identifier of the second software, the first vehicle information is determined to be matched with the second vehicle information, and matching information is sent to the second diagnostic equipment.
In one embodiment, the sending, to the first diagnostic device, the flush data of the second ECU of the second vehicle when receiving the matching information includes:
when the matching information is received, sending a request for safety verification to the second ECU;
and when a verification success command sent by the second ECU is received, acquiring the flash data and sending the flash data to the first diagnostic equipment.
In one embodiment, the obtaining the flash data and sending the flash data to the first diagnostic device includes:
acquiring the size of the flashing data of the second ECU, and sending the size of the flashing data to the first diagnostic equipment;
when a request instruction of the flash data sent by first diagnostic equipment is received, the flash data is obtained and sent to the first diagnostic equipment in a grouping mode, so that the first diagnostic equipment carries out data flash on a first ECU of a first vehicle.
In a third aspect, an embodiment of the present application provides a vehicle data flashing device, which is applied to a first diagnostic device, and includes:
the detection module is used for acquiring the first vehicle information when receiving second vehicle information sent by the second diagnosis equipment and detecting whether the first vehicle information is matched with the second vehicle information;
the sending module is used for sending matching information to the second diagnostic equipment when the first vehicle information is detected to be matched with the second vehicle information, so that the second diagnostic equipment returns the flash data of a second ECU of the second vehicle when receiving the matching information;
and the flashing module is used for flashing data to the first ECU of the first vehicle when the flashing data is received.
In a fourth aspect, an embodiment of the present application provides a vehicle data flashing device, which is applied to a second diagnostic apparatus, and includes:
the acquisition module is used for acquiring the second vehicle information when receiving a flash instruction sent by a user and sending the second vehicle information to the first diagnostic equipment so that the first diagnostic equipment returns matching information to the second diagnostic equipment when detecting that the first vehicle information is matched with the second vehicle information;
and the receiving module is used for sending the flash data of the second ECU of the second vehicle to the first diagnostic equipment when receiving the matching information, so that the first diagnostic equipment carries out data flash on the first ECU of the first vehicle when receiving the flash data.
In a fifth aspect, an embodiment of the present application provides a diagnostic apparatus, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the data flashing method of the first aspect when executing the computer program, or implements the steps of the data flashing method of the second aspect when executing the computer program.
In a sixth aspect, an embodiment of the present application provides a data flashing system, including a first diagnostic device and a second diagnostic device:
the first diagnostic device is configured to execute the steps of the vehicle data flashing method according to the first aspect;
the second diagnostic device is used to perform the steps of the vehicle data flashing method according to the second aspect.
In a seventh aspect, an embodiment of the present application provides a computer-readable storage medium, where a computer program is stored, and the computer program implements, when executed by a processor, the steps of the data flashing method in the first aspect, or the computer program implements, when executed by a processor, the steps of the data flashing method in the second aspect.
In an eighth aspect, an embodiment of the present application provides a computer program product, which, when run on an electronic device, causes the electronic device to execute the steps of the data flashing method according to the first aspect, or causes the electronic device to implement the steps of the data flashing method according to the second aspect when executed.
Compared with the prior art, the embodiment of the application has the advantages that: in the embodiment of the application, a first diagnostic device is in communication connection with a second diagnostic device, the first diagnostic device is in communication connection with a first vehicle, the second diagnostic device is in communication connection with a second vehicle, the communication connection is local area network communication connection or electrical connection, when receiving second vehicle information sent by the second diagnostic device, the first vehicle information is obtained, and whether the first vehicle information is matched with the second vehicle information is detected; when the first vehicle information is detected to be matched with the second vehicle information, sending matching information to the second diagnosis device, so that the second diagnosis device returns the flash data of a second ECU of the second vehicle when receiving the matching information; and when the flash data is received, performing data flash on the first ECU of the first vehicle. Due to the fact that under the condition that the flashing data cannot be obtained when special problems occur (such as network faults, poor network signals or problems of a server for storing the flashing files), the data can be flashed by reading ECU flashing data of the same type of vehicles matched with the vehicle information, and therefore data flashing efficiency and convenience are improved.
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 order to explain the technical solution described in the present application, the following description is given by way of specific examples.
Example one
The embodiment of the application provides a vehicle data flashing system, the vehicle data flashing system 1 comprises afirst diagnosis device 10 and asecond diagnosis device 20, thefirst diagnosis device 10 is in communication connection with afirst vehicle 30, thesecond diagnosis device 20 is in communication connection with asecond vehicle 40, and the communication connection is a local area network communication connection or an electrical connection.
In a specific application scenario, the first Diagnostic device is an On-Board Diagnostic (OBD) device, and the second Diagnostic device is a second OBD device. If first OBD equipment passes through vehicle OBD diagnostic interface on the first vehicle and is connected with first vehicle, second OBD equipment passes through vehicle OBD diagnostic interface on the second vehicle and is connected with the second vehicle, first OBD equipment and second OBD equipment carry out the communication through LAN communication modes such as bluetooth or WIFI.
In one embodiment, an embodiment of the present application provides a vehicle data flashing method, including: the second diagnostic equipment acquires second vehicle information when receiving a flash instruction sent by a user and sends the second vehicle information to the first diagnostic equipment; when the first diagnostic equipment receives second vehicle information sent by the second diagnostic equipment, the first vehicle information is obtained, whether the first vehicle information is matched with the second vehicle information is detected, and when the first vehicle information is detected to be matched with the second vehicle information, matching information is sent to the second diagnostic equipment; when the second diagnostic equipment receives the matching information, the second diagnostic equipment returns the flash data of the second ECU of the second vehicle to the first diagnostic equipment; and when receiving the flash data, the first diagnostic equipment performs data flash on the first ECU of the first vehicle. Specifically, in the embodiment of the present application, the functions of the first diagnostic device and the second diagnostic device may be implemented by the same diagnostic device; in the same vehicle data flashing scene, two diagnostic devices of the same type are respectively plugged into vehicle OBD diagnostic interfaces of a first vehicle and a second vehicle, and the functions of the first diagnostic device and the second diagnostic device are correspondingly realized. This is not specifically limited by the present application, and the partial flashing function on the first vehicle and the second vehicle is separately described.
In an embodiment, referring to fig. 2, a schematic diagram of a vehicle data flashing method is shown, where the vehicle data flashing method is applied to the vehicle flashing system, and the method includes:
step S101, when receiving a flash instruction sent by a user, a second diagnostic device obtains the second vehicle identifier and sends the second vehicle identifier to the first diagnostic device.
Specifically, the vehicle identifier may include a vehicle type of the vehicle and a type of the ECU that needs to be written over, the user may send a writing over instruction to the second diagnostic device through a key preset in the diagnostic device or an APP pre-loaded in the diagnostic device, and when the second diagnostic device receives the writing over instruction, the second diagnostic device obtains the identifier of the vehicle connected to the second diagnostic device and information of the type of the EUC that needs to be written over, for example, the type of the ECU includes an engine EUC, an ignition ECU, a battery ECU, and the like. The model and the ECU type of the second vehicle are sent to the first diagnostic apparatus.
In the application, when the second diagnostic device receives a flash instruction sent by a user, for example, the flash instruction includes the vehicle type information and the ECU type to be flashed (for example, flashing data is performed on the engine ECU whose vehicle type information is the speed S350), the user may select or input the vehicle type and the ECU type to be flashed on the APP of the diagnostic device, and submit the flash instruction including the vehicle type information and the ECU type of the vehicle. When the second diagnosis device receives the vehicle type information and the ECU type included in the flashing instruction, the vehicle type information of the connected vehicle is obtained, and whether the vehicle type information of the connected vehicle of the second diagnosis device is the same as the vehicle type information included in the flashing instruction or not is detected. And if the vehicle type information of the vehicle connected with the second diagnostic equipment is the same as the vehicle type information included in the flash instruction, sending the vehicle type information of the second vehicle and the ECU type needing flash to the first diagnostic equipment.
In one embodiment, the diagnostic device may acquire the model information of the connected vehicle by: sequentially sending a command for acquiring vehicle identification codes to the vehicle according to the pre-stored diagnostic protocols of the N vehicle types; the method comprises the steps that a diagnosis protocol of a vehicle cannot be confirmed at the beginning, so that a command for acquiring a vehicle identification code (VIN code) is sequentially sent to an OBD system in the vehicle according to a plurality of pre-stored diagnosis protocols according to a preset sequence; when a vehicle identification code returned by a vehicle based on a certain diagnostic protocol is received, the vehicle identification code is obtained, and the vehicle type information of the vehicle is determined according to the vehicle identification. If the vehicle identification code may be 17 bytes of vehicle identification, the VIN code is WDD2210222a253260, which indicates that the family is speed (BENZ), and the vehicle type is S350.
Step S102, when the first diagnostic device receives a second vehicle identifier sent by the second diagnostic device, the first diagnostic device obtains the first vehicle identifier, and when the first vehicle identifier is detected to be matched with the second vehicle identifier, a first matching instruction is sent to the second diagnostic device.
Specifically, the first diagnostic device receives the second vehicle identifier sent by the second diagnostic device, and obtains the vehicle type of the first vehicle connected to the first diagnostic device, for example, when the vehicle type information of the second vehicle and the type of the ECU that needs to be written are received, the vehicle type information of the first vehicle is obtained, and the obtaining of the vehicle type information of the first vehicle can be the same as the obtaining of the vehicle type information of the connected vehicle, which is not repeated here. And when the vehicle type of the first vehicle is detected to be matched with the vehicle type of the second vehicle, sending a first matching instruction to the second diagnosis device.
Step S103, when the second diagnostic device receives the first matching instruction, a second ECU identifier of the second vehicle and a second software identifier corresponding to the second ECU are obtained, and the second ECU identifier and the second software identifier are returned to the first diagnostic device.
Specifically, when the second diagnostic device receives the first matching instruction, the models of the two vehicles are consistent, at this time, a second ECU identifier of the second vehicle and a second software identifier corresponding to the second ECU are obtained, and the second ECU identifier and the second software identifier are returned to the first diagnostic device. Such as obtaining the model of the corresponding ECU of the second vehicle and the version number of the software loaded in the ECU.
In one embodiment, before a second ECU identifier of a second vehicle and a corresponding second software identifier of the second ECU, a communication connection is established with the second ECU, for example, diagnostic information of the second ECU is acquired, and a communication connection between a diagnostic device and the second ECU is established; the diagnostic information of the ECU comprises a diagnostic protocol of the ECU; an activation command is sent to the ECU. After the diagnostic information of the ECU is acquired, the communication connection between the diagnostic equipment and the ECU is established according to the diagnostic protocol included in the diagnostic information of the ECU, an activation command is sent to the ECU, and after the ECU is activated, the ECU identification and the software identification loaded by the ECU can be acquired from the ECU. If it is the engine ECU, a command 0x22f001 is sent to the engine ECU, the engine ECU returns 0x62f001030402,03 denotes that the engine model is ME28,0402 denotes that the software version is 4.2, and then the engine model and the software version number are sent to the first diagnostic device.
Step S104, when the first diagnostic equipment receives the second ECU identifier and the second software identifier sent by the second diagnostic equipment, acquiring a first ECU identifier of the first vehicle and a first software identifier of a first ECU; and when the second ECU identification is matched with the first ECU identification and the second software identification is the updated version identification of the second software, judging that the first vehicle information is matched with the second vehicle information, and sending matched information to the second diagnostic equipment.
Specifically, when the first diagnostic device receives the second ECU identifier and the second software identifier sent by the second diagnostic device, the first diagnostic device obtains an ECU identifier of the first vehicle, which is called a first ECU identifier, and obtains an identifier of software loaded on the first vehicle, which is called a first software identifier. And judging whether the second ECU identifier is the same as the first ECU identifier, wherein the ECU identifier can be understood as the version number of the loaded software, and if the ECU is the engine ECU, the ECU identifier is the engine model. The detecting that the second ECU identifier matches the first ECU identifier may be detecting whether the models of the first ECU and the second ECU are consistent, and if the models of the first ECU and the second ECU are consistent and the second software identifier is an update version identifier of the second software, determining that the first vehicle information matches the second vehicle information, and sending matching information to the second diagnostic device.
Step S105, when receiving the matching information, the second diagnostic device sends a request for security verification to the second ECU, and when receiving a verification success instruction sent by the second ECU, the second diagnostic device obtains the brushing address information and the brushing data size of the second ECU, and sends the brushing address information and the brushing data size to the first diagnostic device.
Specifically, when the second diagnostic device receives the matching information, the second diagnostic device indicates that the second vehicle is a vehicle capable of providing the flashing data for the ECU corresponding to the first vehicle, and the second ECU is sent a request for security verification to perform engine security verification, so that the engine can be prevented from being operated illegally. When receiving the verification success command sent by the second ECU, the ECU may be instructed to inquire the start address and all the byte numbers of the flash data, for example, send a command 0x2300, reply 0x6300112233440000ffff by the ECU, 0x11223344 as the start address, 0x0000ffff as the byte number of all the data, and then send the start address and the byte number to the first diagnostic device.
In one application scenario, the specific process of checking the safety of the engine ECU may be: the method comprises the steps that a request of safety check is sent to an engine ECU, when the engine ECU receives the request of vehicle safety check, the engine ECU can return a safety check code, and the diagnosis equipment generates corresponding check information according to safety check rules which are set correspondingly according to vehicle types in advance and the safety check code. And after the diagnostic equipment generates corresponding verification information, the verification information is sent to the engine ECU, so that the engine ECU verifies the verification information, and when the engine ECU verifies the verification information successfully, a verification success instruction is returned based on the verification information. The diagnosis equipment receives a successful verification instruction returned by the engine ECU based on the verification information, and after the diagnosis equipment passes the safety verification of the engine, the vehicle-mounted equipment can control the state of the engine ECU.
In a specific application scenario, if the ECU security check is performed through a command to prevent illegal operations, the method is equivalent to a password, for example, the diagnosis first sends a 0x2703 command to the corresponding ECU, the ECU replies a SEED data, for example, 0x670311223344, where 11223344 is the SEED data, after the SEED data is obtained, the SEED data is calculated into a CODE by a preset decryption algorithm, the ECU allows the flashing operation to be performed only if the CODE is correctly calculated, and the diagnostic device may calculate the CODE by the diagnostic algorithm with the SEED, for example, the CODE calculated by the preset decryption of 0x11223344 is 0x55667788, and fill the calculated CODE into the security check command to send to the ECU, for example, 0x 2704567788. After receiving the CODE, the engine ECU performs calculation and verification in the ECU to see whether the CODE is correct, if the CODE is correct, the correct data is returned to the diagnostic device, for example, 0x6704, which indicates that the safety verification of the ECU passes, and after the safety verification of the engine ECU passes, the engine ECU sends a command to inquire the engine ECU about the start address and all bytes of read data, for example, sends a command 0x2300, and returns 0x6300112233440000ffff to the ECU, where 0x11223344 is the start address and 0x0000ffff is the number of bytes of all data.
Step S106, when the first diagnostic equipment receives the flash address information and the flash data size, sending a request of safety verification to the first ECU; and when receiving the verification success command sent by the first ECU, sending a request command for acquiring the flash data to the second diagnostic equipment.
Specifically, when the first diagnostic device receives the flash address information and the flash data size, it is also necessary to send a request for security verification to the first ECU to perform engine security verification, which can prevent the ECU from being operated illegally. Sending a request for security verification to the first ECU; and when receiving the verification success command sent by the first ECU, sending a request command for acquiring the flash data to the second diagnostic equipment.
And step S107, when the second diagnostic device receives the request instruction of the flash data, the second diagnostic device sends the flash data to the first diagnostic device in a grouping mode.
Specifically, in consideration of the fact that the data amount of the flash data may be large, the second diagnostic device may transmit the data packet to the first diagnostic device in a grouped manner in a plurality of times.
As in the specific application scenario, the second diagnostic device reads 1024 bytes at a time, the second diagnostic device sends a command 0x 351122330000400 to the second ECU, 0x35 indicates that ECU data is to be read, 0x11223344 indicates the address of the ECU data to be read (which is different for each command depending on the address of the read data), 0x00000400 is 1024 bytes to indicate the number of bytes to be read, and after each reading, 1024 bytes of data that are read are sent to the first diagnostic device in sequence, and if the last frame of data may be less than 1024 bytes, the data are sent as the actually received data.
Step S108, when the first diagnostic equipment receives the flash data, the first diagnostic equipment performs data flash on a first ECU of the first vehicle; and when the total amount of the received brushing data reaches the size of the brushing data and brushing of all the received brushing data is completed, judging that the brushing of the first ECU of the first vehicle is successful.
Specifically, when the flash data is received, performing data flash on a first ECU of the first vehicle according to a flash address; when the number of bytes which have been received and sent by the second diagnostic equipment reaches the total number of bytes to be flashed and the data is successfully flashed, the flash is indicated to be completed.
According to the embodiment of the application, under the condition that the brushing data cannot be obtained when special problems occur (such as network faults, poor network signals or problems of a server for storing brushing files), the data can be brushed by reading the ECU brushing data of the similar vehicle matched with the vehicle information, so that the data brushing efficiency and convenience are improved.
Example two
The embodiment of the application provides a vehicle data flashing method, which is applied to a first diagnostic device, wherein the first diagnostic device is in communication connection with a second diagnostic device, the first diagnostic device is in communication connection with a first vehicle, the second diagnostic device is in communication connection with a second vehicle, the communication connection is a local area network communication connection or an electrical connection, as shown in fig. 3, and the method comprises the following steps:
step S201, when receiving second vehicle information sent by the second diagnostic device, acquiring the first vehicle information, and detecting whether the first vehicle information matches the second vehicle information.
In application, the second vehicle information is obtained when the second diagnostic device receives a flash instruction sent by a user, and is sent to the first diagnostic device.
In one embodiment, as shown in fig. 4, step S201 includes steps S2011 to S2014, including:
step S2011, when a second vehicle identifier sent by a second diagnostic device is received, acquiring the first vehicle identifier;
step S2012, when it is detected that the first vehicle identifier matches the second vehicle identifier, send a first matching instruction to the second diagnostic device, so that when the second diagnostic device receives the first matching instruction, the second ECU identifier of the second vehicle and the second software identifier corresponding to the second ECU are obtained, and the second ECU identifier and the second software identifier are returned to the first diagnostic device;
step S2013, when the second ECU identifier and the second software identifier sent by the second diagnostic equipment are received, the first ECU identifier of the first vehicle and the first software identifier of the first ECU are obtained;
step S2014, when it is detected that the second ECU identifier matches the first ECU identifier and the second software identifier is an updated version identifier of the second software, determining that the first vehicle information matches the second vehicle information.
Specifically, the above steps S2011 to S2014 are the same as or similar to the above steps S101 to S104, and reference may be specifically made to the related descriptions of the steps S101 to S104, which are not repeated herein.
Step S202, when the first vehicle information is detected to be matched with the second vehicle information, matching information is sent to the second diagnosis device, so that the second diagnosis device returns the flash data of the second ECU of the second vehicle when receiving the matching information.
Specifically, when it is detected that the second ECU identifier matches the first ECU identifier and the second software identifier is an update version identifier of the second software, it is determined that the first vehicle information matches the second vehicle information, and matching information is sent to the second diagnostic device.
In one embodiment, the second diagnostic device sends a request for security verification to the second ECU when receiving the matching information, and obtains the brushing address information and the brushing data size of the second ECU when receiving a verification success instruction sent by the second ECU, and sends the brushing address information and the brushing data size to the first diagnostic device.
Specifically, where the content in the step S202 is the same as or similar to that in the step S104 and the step S105, reference may be specifically made to the related description of the step S104 and the step S105, and details are not repeated here.
And step S203, when the flash data is received, performing data flash on the first ECU of the first vehicle.
In one embodiment, as shown in fig. 5, step S203 includes steps S2031 to S2033:
step S2031, when receiving the flash address information and the size of the flash data, sending a request instruction for obtaining the flash data to the second diagnostic device, so that the second diagnostic device sends the flash data to the first diagnostic device in a packet when receiving the request instruction for the flash data;
in one embodiment, the sending, to the second diagnostic device, a request instruction for obtaining the flush data when the flush address information and the flush data size are received includes: when the size of the flash data is received, sending a request of safety verification to the first ECU; and when receiving the verification success command sent by the first ECU, sending a request command for acquiring the flash data to the second diagnostic equipment.
Step S2032, when the flash data is received, performing data flash on the first ECU of the first vehicle according to the flash address information;
and step S2033, when the total amount of the received brushing data reaches the size of the brushing data and the brushing of all the received brushing data is finished, judging that the brushing of the first ECU of the first vehicle is successful.
Specifically, the above steps S2031 to S2033 are the same as or similar to the above steps S106 to S108, and reference may be specifically made to the related description of the steps S106 to S108, and the description is not repeated here.
According to the embodiment of the application, under the condition that the brushing data cannot be obtained when special problems occur (such as network faults, poor network signals or problems of a server for storing brushing files), the data can be brushed by reading the ECU brushing data of the similar vehicle matched with the vehicle information, so that the data brushing efficiency and convenience are improved.
EXAMPLE III
The embodiment of the application provides a vehicle data flashing method, which is applied to a second diagnostic device, wherein the second diagnostic device is in communication connection with a first diagnostic device, the first diagnostic device is in communication connection with a first vehicle, the second diagnostic device is in communication connection with a second vehicle, the communication connection is a local area network communication connection or an electrical connection, as shown in fig. 6, the method includes:
step S301, when a flash instruction sent by a user is received, obtaining the second vehicle information, and sending the second vehicle information to the first diagnostic equipment, so that the first diagnostic equipment returns matching information to the second diagnostic equipment when detecting that the first vehicle information is matched with the second vehicle information;
specifically, when a flash instruction sent by a user is received, the second vehicle information is obtained and sent to the first diagnostic device, so that the first diagnostic device obtains the first vehicle information when receiving the second vehicle information, and returns matching information to the second diagnostic device when detecting that the first vehicle information is matched with the second vehicle information.
In one embodiment, step S301 includes steps S3011 to S3016:
step S3011, when a flash instruction sent by a user is received, obtaining the second vehicle identifier, and sending the second vehicle identifier to the first diagnostic device, so that the first diagnostic device sends a first matching instruction to the second diagnostic device when detecting that the first vehicle identifier matches with the second vehicle identifier;
step S3012, when the first matching instruction is received, obtaining a second ECU identifier of the second vehicle and a second software identifier corresponding to the second ECU, and returning the second ECU identifier and the second software identifier to the first diagnostic device, so that when the first diagnostic device detects that the second ECU identifier matches the first ECU identifier and the second software identifier is an update version identifier of the second software, it determines that the first vehicle information matches the second vehicle information, and sends matching information to the second diagnostic device.
Specifically, the above steps S3031 to S3012 are the same as or similar to the above steps S101 to S104, and reference may be specifically made to the related description of the steps S101 to S104, which is not repeated herein.
Step S302, when receiving the matching information, sending the flashing data of the second ECU of the second vehicle to the first diagnostic device, so that when receiving the flashing data, the first diagnostic device performs data flashing on the first ECU of the first vehicle.
In one embodiment, the sending, to the first diagnostic device, the flush data of the second ECU of the second vehicle when receiving the matching information includes: when the matching information is received, sending a request for safety verification to the second ECU; and when a verification success command sent by the second ECU is received, acquiring the flash data and sending the flash data to the first diagnostic equipment.
In one embodiment, the obtaining the flash data and sending the flash data to the first diagnostic device includes: acquiring the size of the flashing data and the flashing address information of the second ECU, and sending the size of the flashing data and the flashing address information to the first diagnostic equipment;
when a request instruction of the flash data sent by first diagnostic equipment is received, the flash data is read according to the flash address, and the flash data is sent to the first diagnostic equipment in a grouping mode, so that the first diagnostic equipment conducts data flash on a first ECU of a first vehicle.
Specifically, the above step S302 is the same as or similar to the above steps S105 to S108, and reference may be specifically made to the related description of the step S105 to the step S108, and details are not repeated here.
According to the embodiment of the application, under the condition that the brushing data cannot be obtained when special problems occur (such as network faults, poor network signals or problems of a server for storing brushing files), the data can be brushed by reading the ECU brushing data of the similar vehicle matched with the vehicle information, so that the data brushing efficiency and convenience are improved.
It should be noted that the first embodiment, the second embodiment and the third embodiment are embodiments with different implementation subjects, and specific technical contents may be referred to each other.
In response to the vehicle data flashing method, on one hand, an embodiment of the present application further provides a vehicle data flashing device, which is applied to a first diagnostic device, and includes:
the detection module is used for acquiring the first vehicle information when receiving second vehicle information sent by the second diagnosis equipment and detecting whether the first vehicle information is matched with the second vehicle information;
the sending module is used for sending matching information to the second diagnostic equipment when the first vehicle information is detected to be matched with the second vehicle information, so that the second diagnostic equipment returns the flash data of a second ECU of the second vehicle when receiving the matching information;
and the flashing module is used for flashing data to the first ECU of the first vehicle when the flashing data is received.
On the other hand, the embodiment of the present application provides a vehicle data flashing device, which is applied to a second diagnostic device, and includes:
the acquisition module is used for acquiring the second vehicle information when receiving a flash instruction sent by a user and sending the second vehicle information to the first diagnostic equipment so that the first diagnostic equipment returns matching information to the second diagnostic equipment when detecting that the first vehicle information is matched with the second vehicle information;
and the receiving module is used for sending the flash data of the second ECU of the second vehicle to the first diagnostic equipment when receiving the matching information, so that the first diagnostic equipment carries out data flash on the first ECU of the first vehicle when receiving the flash data.
Example four
The embodiment of the application provides a vehicle data flashing system, as shown in fig. 1, the vehicle data flashing system includes a firstdiagnostic device 10 and a seconddiagnostic device 20, the firstdiagnostic device 10 is in communication connection with afirst vehicle 30, the seconddiagnostic device 20 is in communication connection with asecond vehicle 40, and the communication connection is a local area network communication connection or an electrical connection.
As shown in fig. 8, the firstdiagnostic apparatus 10 includes:
thedetection module 11 is configured to, when receiving second vehicle information sent by the second diagnostic device, obtain the first vehicle information, and detect whether the first vehicle information matches the second vehicle information;
the sendingmodule 12 is configured to send matching information to the second diagnostic device when it is detected that the first vehicle information matches the second vehicle information, so that the second diagnostic device returns the flash data of the second ECU of the second vehicle when receiving the matching information;
and the flashingmodule 13 is configured to perform data flashing on the first ECU of the first vehicle when the flashing data is received.
As shown in fig. 9, the seconddiagnostic apparatus 20 includes:
the obtainingmodule 21 is configured to obtain the second vehicle information when a flash instruction sent by a user is received, and send the second vehicle information to the first diagnostic device, so that when the first diagnostic device detects that the first vehicle information matches the second vehicle information, the first diagnostic device returns matching information to the second diagnostic device;
the receivingmodule 22 is configured to send the brushing data of the second ECU of the second vehicle to the first diagnostic device when receiving the matching information, so that the first diagnostic device performs data brushing on the first ECU of the first vehicle when receiving the brushing data.
According to the embodiment of the application, under the condition that the brushing data cannot be obtained when special problems occur (such as network faults, poor network signals or problems of a server for storing brushing files), the data can be brushed by reading the ECU brushing data of the similar vehicle matched with the vehicle information, so that the data brushing efficiency and convenience are improved.
EXAMPLE five
A fifth embodiment of the present application provides a schematic diagram of a terminal device, and as shown in fig. 10, adiagnostic device 100 in the present embodiment includes: aprocessor 1001, amemory 1002, and acomputer program 1003 stored in thememory 1002 and executable on theprocessor 1001, the computer program comprising:
the detection module is used for acquiring the first vehicle information when receiving second vehicle information sent by the second diagnosis equipment and detecting whether the first vehicle information is matched with the second vehicle information;
the sending module is used for sending matching information to the second diagnostic equipment when the first vehicle information is detected to be matched with the second vehicle information, so that the second diagnostic equipment returns the flash data of a second ECU of the second vehicle when receiving the matching information;
and the flashing module is used for flashing data to the first ECU of the first vehicle when the flashing data is received.
The acquisition module is used for acquiring the second vehicle information when receiving a flash instruction sent by a user and sending the second vehicle information to the first diagnostic equipment so that the first diagnostic equipment returns matching information to the second diagnostic equipment when detecting that the first vehicle information is matched with the second vehicle information;
and the receiving module is used for sending the flash data of the second ECU of the second vehicle to the first diagnostic equipment when receiving the matching information, so that the first diagnostic equipment carries out data flash on the first ECU of the first vehicle when receiving the flash data.
Thediagnostic device 100 may be a vehicle-mounted device, an intelligent device, a computer, a notebook, a palm computer, or other computing devices. Thediagnostic device 100 may include, but is not limited to, aprocessor 1001 and amemory 1002. Those skilled in the art will appreciate that fig. 10 is merely an example of thediagnostic device 100, and does not constitute a limitation of thediagnostic device 100, and may include more or less components than those shown, or combine certain components, or different components, for example, thediagnostic device 100 may also include input-output devices, network access devices, buses, etc.
TheProcessor 1001 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Thememory 1002 may be an internal storage unit of thediagnostic apparatus 100, such as a hard disk or a memory of thediagnostic apparatus 100. Thememory 1002 may also be an external storage device of thediagnostic apparatus 100, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like, provided on thediagnostic apparatus 100. Further, thememory 1002 may include both an internal storage unit and an external storage device of thediagnostic apparatus 100. Thememory 1002 is used to store the computer programs and other programs and data required by thediagnostic apparatus 100. Thememory 1002 may also be used to temporarily store data that has been output or is to be output.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process described above may refer to the corresponding process in the foregoing method embodiment, and is not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, server and method may be implemented in other ways. 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. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The present invention is not limited to the above preferred embodiments, and any modifications, equivalent substitutions and improvements made within the spirit and principle of the present invention should be included in the protection scope of the present invention.