Vehicle diagnosis method and device

The remote communication connection and data analysis are performed in vehicle diagnosis through the device connector, which solves the problem of remote diagnosis in vehicle diagnosis technology, improves diagnostic efficiency and stability, and realizes remote communication between the vehicle and the diagnostic instrument.

CN119011650APending Publication Date: 2024-11-22LAUNCH TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411106194.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-13
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

Existing vehicle diagnostic technology cannot achieve remote diagnosis, and only close-range connections can be made between the diagnostic instrument and the vehicle, resulting in low diagnostic efficiency and frequent connection configuration.

Method used

Through the remote communication connection between the device connector and the vehicle connector, the initialization data sent by the diagnostic instrument is received for data analysis and packaging, avoiding error intervals caused by remote communication delays, and improving the stability and efficiency of communication connection between the diagnostic instrument and the vehicle.

Benefits of technology

Remote diagnosis between the vehicle and the diagnostic instrument is realized, the stability and diagnostic efficiency of initial data transmission are improved, and the connection configuration steps are reduced during each diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119011650A_ABST
    Figure CN119011650A_ABST
Patent Text Reader

Abstract

The invention provides a vehicle diagnosis method and device, the method is applied to an equipment connector, the equipment connector is in K line connection with a diagnosis instrument, the equipment connector is in remote communication connection with a vehicle connector, and the vehicle connector is in K line connection with a vehicle, and the method comprises the following steps: receiving first initialization data sent by the diagnosis instrument, first initialization data is acquired, data analysis is carried out on the first initialization data, second initialization data is acquired, the first initialization data is used for realizing diagnosis communication connection between the diagnosis instrument and the vehicle, and the second initialization data comprises serial port data; and performing data packaging on the second initialization data, and then sending the second initialization data to the vehicle connector, so that the vehicle connector sends the second initialization data to the vehicle. Remote communication based on the device connector and the vehicle connector may enable remote diagnosis of the vehicle by the diagnostic apparatus.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] Vehicle diagnosis generally requires that the diagnostic instrument be connected to the vehicle's diagnostic socket based on the K-line, and that data exchange between the diagnostic instrument and the vehicle control unit be realized based on the corresponding diagnostic protocol, so as to realize the diagnosis of vehicle faults. However, the diagnostic instrument is wired to the vehicle's diagnostic socket based on the K-line, so that only short-distance diagnosis can be realized between the diagnostic instrument and the vehicle. Therefore, how to realize remote diagnosis of vehicles is a technical problem that urgently needs to be solved in this field. Summary of the invention

[0003] The present application provides a vehicle diagnosis method and apparatus, which can realize remote diagnosis between a vehicle and a diagnostic instrument through a remote communication connection between a device connector and a vehicle connector.

[0004] In a first aspect, the present application provides a vehicle diagnostic method, which is applied to a device connector, the device connector is connected to a diagnostic instrument by a K-line, the device connector is connected to a vehicle connector by a remote communication, and the vehicle connector is connected to the vehicle by a K-line, the method comprising:

[0005] Receiving first initialization data sent by the diagnostic instrument, and performing data analysis on the first initialization data to obtain second initialization data, wherein the first initialization data is used to realize a diagnostic communication connection between the diagnostic instrument and the vehicle, and the second initialization data includes serial port data;

[0006] The second initialization data is data-encapsulated and then sent to the vehicle connector, so that the vehicle connector sends the second initialization data to the vehicle.

[0007] It can be seen that in this application, remote communication based on the device connector and the vehicle connector can realize remote diagnosis of the vehicle by the diagnostic instrument. At the same time, during the initialization process of the diagnostic system, since the first initialization data sent by the diagnostic instrument based on the K line is level information, if the device connector directly sends the level information corresponding to the first initialization data to the vehicle connector through remote communication after receiving it, it may cause an error interval between the level information corresponding to the first initialization data based on the delay of remote communication, so that the vehicle cannot accurately identify the level information after receiving the level information sent synchronously by the vehicle connector, and thus cannot establish a communication connection between the diagnostic instrument and the vehicle. In this application, after receiving the first initialization data sent by the diagnostic instrument, the device connector restores and analyzes the first initialization data as a whole to obtain the second initialization data, and then encapsulates it and sends it to the device connector, so that when the device connector sends the restored and analyzed second initialization data to the vehicle based on the K line, it can avoid the failure to establish a communication connection between the diagnostic instrument and the vehicle due to the possible remote communication delay after the first initialization data is directly sent to the vehicle connector. Thereby improving the stability of the initialization data transmission between the vehicle and the diagnostic instrument.

[0008] In a feasible example, first initialization data sent by a diagnostic instrument is received, and data of the first initialization data is parsed to obtain second initialization data, including: when receiving the first initialization data sent by the diagnostic instrument, level signal acquisition is performed to obtain a first level signal and a second level signal, the first level signal is acquired before the second level signal; baud rate calculation is performed based on the level signal duration in the second level signal to obtain a first baud rate corresponding to the first initialization data; the second level signal is parsed according to the first baud rate to obtain first serial port data; if the first serial port data meets the preset data format, serial port data acquisition is performed on the remaining data in the first initialization data according to the first baud rate to obtain at least one second serial port data, and character intervals between multiple serial port data, the multiple serial port data including the first serial port data and at least one second serial port data; the second initialization data is obtained, and the second initialization data includes the first level signal, multiple serial port data, the first baud rate, and character intervals between multiple serial port data.

[0009] In the present application, when receiving the first initialization data, the baud rate is calculated according to the level signal corresponding to the first serial port data in the collected first initialization data, and the subsequent serial port data is collected according to the baud rate, thereby realizing the collection and analysis of the first initialization data. In this way, the first initialization data can be restored and analyzed on the basis that the device connector does not know the format of the first initialization data sent by the diagnostic instrument, which improves the intelligence of the device connector and avoids the need to configure the connection between the device connector and the diagnostic instrument every time the vehicle diagnosis is performed, thereby improving the efficiency of vehicle diagnosis.

[0010] In a feasible example, when it is determined that the duration of the collected single-segment level signal is less than the first preset duration, it is determined that the collected level signal is a second level signal.

[0011] In the present application, the level signal in the first initialization data is distinguished by the duration of the collected single-segment level signal, so as to facilitate identification of the level signal corresponding to the serial port data in the first initialization data.

[0012] In a feasible example, before receiving the first initialization data sent by the diagnostic instrument, the method also includes: performing serial port data acquisition; when receiving the first initialization data sent by the diagnostic instrument, if the acquired level signal does not meet the serial port data format, switching to level signal acquisition.

[0013] In the present application, when a serial port data acquisition error occurs in the device connector, it automatically switches to level signal acquisition, thereby enabling the acquisition of the first level signal in the first initialization data, and facilitating the subsequent calculation of the first baud rate based on the second level signal.

[0014] In a feasible example, a baud rate calculation is performed based on the duration of a level signal in a second level signal to obtain a first baud rate corresponding to the first initialization data, including: determining a target minimum value in the duration of at least one level signal in the second level signal, and determining the second baud rate based on the ratio between the unit time and the target minimum value; if it is determined that the relative deviation between a first preset baud rate and the second baud rate in at least one preset baud rate is not greater than the preset deviation, then determining the first preset baud rate as the first baud rate, and the first preset baud rate is the baud rate that is closest to the second baud rate in at least one preset baud rate.

[0015] In the present application, after the second baud rate is determined based on the ratio between the unit time and the target minimum value, a first preset baud rate that is very close to the second baud rate is determined from at least one preset baud rate as the first baud rate, thereby improving the accuracy of determining the first baud rate.

[0016] In a feasible example, after determining the second baud rate, the method also includes: if it is determined that the relative deviation between the first preset baud rate and the second baud rate is greater than the preset deviation, continuing to increase the second baud rate by one time until the relative deviation between the second preset baud rate and the third baud rate after at least one increase is no greater than the preset deviation, determining that the second preset baud rate is the first baud rate, and the second preset baud rate is the baud rate that is closest to the third baud rate among at least one preset baud rate.

[0017] In the present application, when a baud rate very close to the second baud rate cannot be determined directly from at least one preset baud rate according to the second baud rate, a baud rate very close to the third baud rate after at least one single increase can be determined from at least one preset baud rate based on the continuous single increase of the second baud rate. This improves the stability of determining the first baud rate.

[0018] In a feasible example, after obtaining the first serial port data, the method also includes: if it is determined that the first serial port data is composed of the first data and preset stop bit data, then it is determined that the first serial port data satisfies the preset data format, and the first data includes the start bit data and complete data bit data determined by parsing the second level signal according to the first baud rate; or if it is determined that the first serial port data is composed of the second data, the first data bit data and the preset stop bit data, and there is a rising edge in the level signal to be collected after the second level signal is collected, then it is determined that the first serial port data satisfies the preset data format, and the second data includes the start bit data and partial data bit data determined by parsing the second level signal according to the first baud rate, the partial data bit data differs from the complete data bit data by one data bit data, and the first data bit data corresponds to a high level signal.

[0019] In the present application, according to the aforementioned method, when the level signal corresponding to the first serial port data is not completely collected, the complete first serial port data can be determined, and after determining that it meets the preset data format, the serial port data collection is switched according to the first baud rate to facilitate the subsequent serial port data collection of the serial port data after the first serial port data.

[0020] In a second aspect, the present application provides a vehicle diagnostic device, which is applied to a device connector, the device connector is connected to the diagnostic instrument by a K-line, the device connector is connected to the vehicle connector by a remote communication, and the vehicle connector is connected to the vehicle by a K-line, and the device includes:

[0021] A receiving unit, used for receiving first initialization data sent by the diagnostic instrument, and performing data parsing on the first initialization data through the processing unit to obtain second initialization data, wherein the first initialization data is used to realize a diagnostic communication connection between the diagnostic instrument and the vehicle, and the second initialization data includes serial port data;

[0022] The sending unit is used to encapsulate the second initialization data and then send the data to the vehicle connector, so that the vehicle connector sends the second initialization data to the vehicle.

[0023] In a third aspect, the present application provides an electronic device comprising a processor, a memory, and a communication interface. The processor, the memory, and the communication interface are interconnected and perform communication with each other. The memory stores executable program code, the communication interface is used for wireless communication, and the processor is used to call the executable program code stored in the memory to execute, for example, some or all of the steps described in any method of the first aspect.

[0024] In a fourth aspect, the present application provides a computer-readable storage medium, in which electronic data is stored. When the electronic data is executed by a processor, it is used to execute the electronic data to implement some or all of the steps described in the first aspect of the present application.

[0025] In a fifth aspect, the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps described in the first aspect of the present application. The computer program product may be a software installation package. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0027] Figure 1 A schematic diagram of the structure of a vehicle diagnostic system provided in an embodiment of the present application;

[0028] Figure 2 A schematic diagram of a vehicle diagnostic method provided in an embodiment of the present application;

[0029] Figure 3 A schematic diagram of the structure of a fast initialization format provided in an embodiment of the present application;

[0030] Figure 4 A structural diagram of a serial port data format provided in an embodiment of the present application;

[0031] Figure 5 A block diagram of the functional units of a vehicle diagnostic device provided in an embodiment of the present application;

[0032] Figure 6 A block diagram of the functional units of another vehicle diagnostic device provided in an embodiment of the present application;

[0033] Figure 7 A structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0034] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0035] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps is not limited to the listed steps, but optionally includes steps that are not listed, or optionally includes other steps inherent to these processes, methods, products or devices.

[0036] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0037] See also Figure 1 , Figure 1 A schematic diagram of the structure of a vehicle diagnostic system provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the vehicle diagnostic system 100 includes a diagnostic instrument 101 , a device connector 102 , a vehicle connector 103 and a vehicle 104 .

[0038] The diagnostic instrument 101 may be a terminal device with a diagnostic program installed, such as a desktop computer, a laptop computer, a tablet computer, a smart phone, etc. The device connector 102 and the vehicle connector 103 are used to realize data transfer, and the vehicle 104 includes a diagnostic socket of the vehicle automatic diagnostic system (On-Board Diagnostics, OBD).

[0039] The diagnostic instrument 101 is connected to the device connector 102 based on the K line, the device connector 102 is connected to the vehicle connector 103 through a remote communication, and the vehicle connector 103 is connected to the vehicle 104 based on the K line. The remote communication connection between the device connector 102 and the vehicle connector 103 includes but is not limited to: data transfer through a server, P2P communication, Wi-Fi, Bluetooth, cellular network and other IoT communications.

[0040] Before the diagnostic device 101 diagnoses the vehicle 104, it needs to send an initialization message to the vehicle 104 to establish a communication connection between the diagnostic device 101 and the control unit of the vehicle 104. The initialization message is information determined based on a corresponding diagnostic standard protocol, such as the ISO14230 protocol.

[0041] The diagnostic instrument 101 sends the first initialization data to the device connector 102 based on the K line. After receiving the first initialization data, the device connector 102 parses the first initialization data to obtain the second initialization information including the serial port data, and then encapsulates the second initialization information and sends it to the vehicle connector 103. The vehicle connector 103 sends the second initialization information to the vehicle 104 based on the K line. After the vehicle 104 responds based on the second initialization information, it sends the response information to the vehicle connector 103 based on the reverse route. The vehicle connector 103 sends the response information to the device connector 102, and the device connector 102 sends the response information to the diagnostic instrument 101.

[0042] Remote communication based on the device connector 102 and the vehicle connector 103 can realize remote diagnosis of the vehicle 104 by the diagnostic instrument 101. And because the first initialization data sent by the diagnostic instrument 101 based on the K line is level information, if the device connector 102 directly sends the level information corresponding to the first initialization data to the vehicle connector 103 through remote communication after receiving it, there may be a delay in remote communication, resulting in an error interval between the level information corresponding to the first initialization data, so that the vehicle 104 cannot accurately identify the level information after receiving the level information synchronously sent by the vehicle connector 103, and thus the communication connection between the diagnostic instrument 101 and the vehicle 104 cannot be established. Therefore, after receiving the first initialization data sent by the diagnostic instrument 101, the device connector 102 restores and parses the first initialization data as a whole to obtain the second initialization data, and encapsulates it before sending it to the vehicle connector 103, so that the vehicle connector 103 sends the restored and parsed second initialization data to the vehicle 104 based on the K line, thereby avoiding the situation where the first initialization data is sent directly to the vehicle connector 103, resulting in the inability to establish a communication connection between the diagnostic instrument 101 and the vehicle 104 due to possible remote communication delays.

[0043] Based on this, an embodiment of the present application provides a vehicle diagnosis method, and the embodiment of the present application is described in detail below in conjunction with the accompanying drawings.

[0044] See also Figure 2 , Figure 2 A flow chart of a vehicle diagnostic method provided in an embodiment of the present application is shown, and the method is applied to the above-mentioned vehicle diagnostic system, such as Figure 2 As shown, the method comprises the following steps:

[0045] Step S201: the diagnostic instrument sends first initialization data. Correspondingly, the device connector receives the first initialization data sent by the diagnostic instrument.

[0046] The diagnostic instrument sends the first initialization data based on the K line, so that the first initialization data is a level signal.

[0047] Step S202: the device connector parses the first initialization data to obtain second initialization data.

[0048] Among them, the first initialization data is used to realize the diagnostic communication connection between the diagnostic instrument and the vehicle, and the second initialization data includes serial port data. If the first initialization data is directly forwarded to the vehicle connector, there may be an error interval in the first initialization data due to the delay of remote communication. Therefore, the present application completely restores and parses the first initialization data to obtain the second initialization data including serial port data. It is convenient to encapsulate it and send it to the vehicle connector later. The serial port data of a character may include a start bit, a data bit, a check bit (optional), and a stop bit.

[0049] The following is a detailed description of the current steps:

[0050] In a feasible embodiment, first initialization data sent by a diagnostic instrument is received, and data of the first initialization data is parsed to obtain second initialization data, including: when receiving the first initialization data sent by the diagnostic instrument, level signal acquisition is performed to obtain a first level signal and a second level signal, the first level signal is acquired before the second level signal; baud rate calculation is performed based on the level signal duration in the second level signal to obtain a first baud rate corresponding to the first initialization data; the second level signal is parsed according to the first baud rate to obtain first serial port data; if the first serial port data meets the preset data format, serial port data acquisition is performed on the remaining data in the first initialization data according to the first baud rate to obtain at least one second serial port data, and character intervals between multiple serial port data, the multiple serial port data including the first serial port data and at least one second serial port data; the second initialization data is obtained, and the second initialization data includes the first level signal, multiple serial port data, the first baud rate, and character intervals between multiple serial port data.

[0051] Among them, since the initialization data corresponding to different vehicles are different, for example, the baud rates corresponding to the initialization data are different. When the device connector parses the first initialization data, if it cannot know the data format of the first initialization data, it is difficult to correctly restore and parse it. Therefore, when receiving the first initialization data, this embodiment calculates the baud rate according to the duration of the level signal corresponding to the first serial port data in the collected first initialization data, and collects subsequent serial port data according to the baud rate, thereby realizing the collection and parsing of the first initialization data.

[0052] Specifically, if the first initialization data is sent based on the K line, then the first initialization data should be represented by a level signal, which may include a level signal corresponding to the wake-up mode and a level signal corresponding to the start communication request message. The level signal corresponding to the wake-up mode is a specific level signal, usually a long low level signal plus a long high level signal. The level signal corresponding to the start communication request message is the level signal corresponding to the serial port data, and the level signal corresponding to the start communication request message can be parsed into the corresponding serial port data through the corresponding baud rate.

[0053] When the level signal is collected for the first initialization data, the first level signal is collected first, that is, the level signal corresponding to the aforementioned wake-up mode, and then the second level signal is collected, that is, the partial or complete level signal corresponding to the first serial port data in the level signal corresponding to the aforementioned start communication request message. The first level signal and the second level signal can be distinguished according to the duration of the single-segment level signal.

[0054] Since the second level signal is used to characterize the level signal corresponding to the serial port data, when collecting the second level signal, the first baud rate corresponding to the first initialization data can be calculated according to the level signal duration in the second level signal. After the second level signal is parsed according to the first baud rate and the first serial port data is obtained, it is necessary to determine whether the first serial port data satisfies a preset data format, and the preset data format is determined according to the format of the serial port data of a single character. After determining that the first serial port data satisfies the preset data format, it can be determined that the first serial port data is serial port data of one character.

[0055] Subsequently, the subsequent serial port data can be collected according to the first baud rate, so as to obtain multiple serial port data and the character intervals between the multiple serial port data, and the multiple serial port data include the first serial port data and at least one second serial port data. The second initialization data is composed of the aforementioned first level signal, multiple serial port data, the first baud rate and the character intervals between the multiple serial port data. Collecting the subsequent serial port data according to the first baud rate means setting the serial port format according to the first baud rate, and then directly collecting the subsequent serial port data according to the set serial port format. It can be understood that at the machine collection level, the level signal corresponding to the serial port data is collected and automatically parsed into serial port data.

[0056] For example, see Figure 3 , Figure 3 A schematic diagram of a fast initialization format provided in an embodiment of the present application is shown in FIG. Figure 3 As shown, it includes a level signal corresponding to fast initialization, that is, a level signal corresponding to the first initialization data. Specifically, it includes a first level signal corresponding to the wake-up model (Twup) and a level signal corresponding to the start communication request message (StartCommunication request message), the first level signal also includes an initialization low level signal (TiniL), and the level signal corresponding to the start communication request message includes a plurality of level signals corresponding to serial port data.

[0057] For example, see Figure 4 , Figure 4 A structural diagram of a serial port data format provided in an embodiment of the present application, such as Figure 4 As shown, the first serial port data includes a start bit, a data bit, and a stop bit. In addition, the first serial port data may also include a check bit ( Figure 4 Generally, the start bit corresponds to a low level signal, and the stop bit corresponds to a high level signal.

[0058] In the present application, when receiving the first initialization data, the baud rate is calculated according to the level signal corresponding to the first serial port data in the collected first initialization data, and the subsequent serial port data is collected and parsed according to the baud rate, thereby realizing the collection and parsing of the first initialization data. In this way, the first initialization data can be restored and parsed on the basis that the device connector does not know the format of the first initialization data sent by the diagnostic instrument, thereby improving the intelligence of the device connector, avoiding the configuration of the device connector every time the vehicle diagnosis is performed, and thus improving the efficiency of vehicle diagnosis.

[0059] Specifically, in a feasible embodiment, when it is determined that the duration of the collected single-segment level signal is less than the first preset duration, it is determined that the collected level signal is a second level signal.

[0060] Among them, since the first level signal is generally a long period of low level signal plus a long period of high level signal, and the second level signal is a level signal corresponding to the serial port data, the duration of a single-segment level signal in the second level signal will be much shorter than the first level signal. Therefore, when it is determined that the duration of the collected single-segment level signal is less than the first preset duration, it can be determined that the collected level signal is the second level signal. The first preset duration can be determined according to the strength of the level signal corresponding to the bit data of at least one bit.

[0061] In the present application, the level signal in the first initialization data is distinguished by the duration of the collected single-segment level signal, so as to facilitate identification of the level signal corresponding to the serial port data in the first initialization data.

[0062] In addition, in a feasible embodiment, before receiving the first initialization data sent by the diagnostic instrument, the method also includes: performing serial port data acquisition; when receiving the first initialization data sent by the diagnostic instrument, if the acquired level signal does not meet the serial port data format, switching to level signal acquisition.

[0063] Among them, when the device connector is collecting data, in order to avoid losing important serial port data, it will first collect serial port data for the level signal sent by the diagnostic instrument. When the collected level signal does not meet the serial port data format, the device connector will generate an error interrupt and automatically switch to level signal collection. In the serial port data format, the start bit corresponds to a low-level signal, but the stop bit corresponds to a high-level signal. Since the first initialization data is first sent with a long low-level signal, there is no stop bit corresponding to the high-level signal, so it is determined that it cannot meet the serial port data format.

[0064] In this way, the first initialization data of different formats can be adapted, so that the first baud rate corresponding to the first initialization data can be calculated in the manner shown in the above embodiment. The second preset duration is determined according to the duration of the level signal corresponding to the serial port data, for example, according to the duration of the level signal corresponding to the serial port data of a single character.

[0065] In the present application, when a serial port data acquisition error occurs in the device connector, it automatically switches to level signal acquisition, thereby enabling the acquisition of the first level signal in the first initialization data, facilitating the subsequent calculation of the first baud rate.

[0066] The calculation of the first baud rate is described in detail below:

[0067] In a feasible embodiment, a baud rate calculation is performed based on the duration of the level signal in the second level signal to obtain a first baud rate corresponding to the first initialization data, including: determining a target minimum value in the duration of at least one level signal in the second level signal, and determining the second baud rate based on the ratio between the unit time and the target minimum value; if it is determined that the relative deviation between the first preset baud rate and the second baud rate in at least one preset baud rate is not greater than the preset deviation, then determining the first preset baud rate as the first baud rate, and the first preset baud rate is the baud rate that is closest to the second baud rate in at least one preset baud rate.

[0068] Among them, the overall duration of the second level signal should be lower than the duration of the level signal corresponding to the serial port data of one character, and the baud rate refers to the number of code element symbols transmitted per unit time, so in order to make the ratio between the unit duration and the duration of a certain segment of the level signal in the second level signal closer to the first baud rate, the target minimum value in the duration of at least one segment of the level signal in the second level signal can be selected. Therefore, the present embodiment determines the second baud rate based on the ratio between the unit time and the target minimum value. It is understandable. The boundary condition between two adjacent segments of the level signal should refer to the occurrence of a level signal strength change, that is, each segment of the level signal is a level signal strength.

[0069] However, due to hardware or other reasons, the duration of the determined third level signal may have errors, which may lead to errors in the calculated second baud rate. Therefore, this embodiment determines a baud rate that is very close to the second baud rate in at least one preset baud rate, and determines it as the first baud rate corresponding to the first initialization data. At least one preset baud rate is a baud rate determined according to the standard corresponding to vehicle diagnosis, for example, the common baud rates specified in the ISO 14230 protocol include 10.4kbps, 9600bps, etc. Since vehicle diagnosis should follow the corresponding standard protocol, the baud rate of data transmission during vehicle diagnosis should also be the common baud rate specified in the standard protocol.

[0070] Specifically, this embodiment defines whether the two baud rates are very close to each other based on the size of the relative deviation. If it is determined that the relative deviation between the first preset baud rate and the second baud rate in at least one preset baud rate (which can be determined based on the difference between the first preset baud rate and the second baud rate and the ratio between the first preset baud rates) is not greater than the preset deviation, it is determined that the first preset baud rate and the second baud rate are very close to each other. At this time, it can be determined that the first preset baud rate is the first baud rate corresponding to the first initialization data.

[0071] In addition, the calculation for the second baud rate may also be performed using the following method:

[0072] When the second level signal has a strength change, the second baud rate is determined based on the ratio of the unit time to the duration of the third level signal, where the third level signal is the level signal before the first strength change of the second level signal occurs.

[0073] The second level signal is a level signal corresponding to part or all of the data in the serial port data (first serial port data) of the first character, and the start bit of the first serial port data is a low level signal, and the stop bit is a high level signal, then the level signal corresponding to the first serial port data will definitely have at least one level signal strength change. Therefore, when the second level signal has a level signal strength change, it means that the level signal corresponding to the first serial port data has not been fully collected. At this time, the level signal strength change may occur at the first bit of the data bit, so at this time, the duration of the third level signal should correspond to the level signal duration of a data bit. Since the baud rate refers to the number of code element symbols transmitted per unit time, a second baud rate can be determined based on the ratio between the unit time and the duration of the third level signal.

[0074] In the present application, after the second baud rate is determined based on the ratio between the unit time and the target minimum value, a first preset baud rate that is very close to the second baud rate is determined from at least one preset baud rate as the first baud rate, thereby improving the accuracy of determining the first baud rate.

[0075] Furthermore, in a feasible embodiment, after determining the second baud rate, the method also includes: if it is determined that the relative deviation between the first preset baud rate and the second baud rate is greater than the preset deviation, then continuing to increase the second baud rate by one time until the relative deviation between the second preset baud rate and the third baud rate after at least one increase is no greater than the preset deviation, determining that the second preset baud rate is the first baud rate, and the second preset baud rate is the baud rate that is closest to the third baud rate among at least one preset baud rate.

[0076] If a preset baud rate very close to the second baud rate is not determined directly from at least one preset baud rate, it means that the duration of the third level signal is not the duration of the level signal corresponding to a single data bit, and the second baud rate can be increased by a single factor, and after each single factor increase, it is determined whether there is a baud rate very close to the baud rate after each single factor increase in at least one preset baud rate.

[0077] Specifically, after the second baud rate is increased by a single factor, a fourth baud rate is obtained, and the fourth baud rate is double the second baud rate. If it is determined that the third preset baud rate closest to the fourth baud rate in at least one preset baud rate has a relative deviation greater than the preset deviation from the fourth baud rate, the fourth baud rate is increased by a single factor of the second baud rate to obtain a fifth baud rate, and the fifth baud rate is three times the second baud rate. And it is determined again whether the fourth preset baud rate closest to the fifth baud rate in at least one preset baud rate has a relative deviation greater than the preset difference from the fifth baud rate. If not greater than the preset difference, the second baud rate is continued to be increased by a single factor. Until it is determined that the second preset baud rate closest to the third baud rate after at least one increase in at least one preset baud rate has a relative deviation less than the preset deviation from the third baud rate. At this time, the second preset baud rate is determined to be the first baud rate.

[0078] Exemplarily, if the third level signal is a level signal corresponding to three data bits, then the second baud rate obtained according to the ratio between the unit time and the duration of the third level signal should be one third of the first baud rate corresponding to the first initialization data. At this time, the second baud rate needs to be increased by two times, and then a baud rate that is very close to the baud rate after two single increases can be determined from at least one preset baud rate and determined as the first baud rate.

[0079] In the present application, when a baud rate very close to the second baud rate cannot be determined directly from at least one preset baud rate according to the second baud rate, a baud rate very close to the third baud rate after at least one single increase can be determined from at least one preset baud rate based on the continuous single increase of the second baud rate. This improves the stability of determining the first baud rate.

[0080] The following is a detailed description of how to determine that the first serial port data meets the preset data format:

[0081] In a feasible embodiment, after obtaining the first serial port data, the method further includes: if it is determined that the first serial port data is composed of the first data and preset stop bit data, then it is determined that the first serial port data satisfies the preset data format, and the first data includes the start bit data and complete data bit data determined by parsing the second level signal according to the first baud rate; or if it is determined that the first serial port data is composed of the second data, the first data bit data and the preset stop bit data, and there is a rising edge in the level signal to be collected after the second level signal is collected, then it is determined that the first serial port data satisfies the preset data format, and the second data includes the start bit data and partial data bit data determined by parsing the second level signal according to the first baud rate, the partial data bit data differs from the complete data bit data by one data bit data, and the first data bit data corresponds to a high level signal.

[0082] In order not to delay the collection of the second character and subsequent serial port data, it is necessary to determine the first baud rate before all the level signals corresponding to the serial port data of the first character are collected. Therefore, generally, when the level signal corresponding to the stop bit in the serial port data of the first character is not collected, it is necessary to switch to serial port data collection, in order to better collect subsequent serial port data.

[0083] If the start bit data and the complete data bit data are directly determined after parsing the second level signal according to the first baud rate, it means that the level signal corresponding to the stop bit is not collected. Since the stop bit data generally corresponds to a fixed high-level signal, the first serial port data can be directly determined according to the start bit data, the complete data bit data and the preset stop bit data. At this time, it can be determined that the first serial port data meets the preset data format. The preset data format is determined according to the serial port data format of a single character, for example, it can be a single start bit, eight data bits and one stop bit. In addition, the preset data format can also include a check bit, that is, the first serial port data can also include a check bit after the data bit.

[0084] If the start bit data and the data bit data of the part that is only the last bit are directly determined after the second level signal is parsed according to the first baud rate, and the level signal to be collected after the second level signal collected at this time has a rising edge, it can be determined that the last data bit definitely corresponds to a high level signal. At this time, the first serial port data can also be determined according to the aforementioned start bit data, part of the data bit data, the first data bit data corresponding to a high level signal, and the preset stop bit data. At the same time, the first serial port data also meets the preset data format.

[0085] In the present application, according to the aforementioned method, when the level signal corresponding to the first serial port data is not completely collected, the complete first serial port data can be determined, and after determining that it meets the preset data format, it is switched to serial port data collection according to the first baud rate, so as to facilitate the subsequent serial port data collection of the serial port data after the first serial port data.

[0086] The complete process of receiving the first initialization data is described in detail below:

[0087] The receiving state of the K-line receiving K-line data converted to serial port data of the device connector (the device connector turns on the serial port data error interrupt). When the first initialization data is first received, it is a long low-level signal. At this time, the long-term level signal is much larger than a character time of the serial port data, and cannot meet the serial port data format, causing the device connector to generate an error interrupt. When the serial port data error interrupt occurs, the device connector switches to the level signal acquisition and turns on the level signal strength change interrupt (that is, each time the level signal strength changes, it interrupts, and then collects level signals with different level signal strengths). After the device connector collects the long-term level signal, it records it as the first level signal. When the collected level signal appears for a duration shorter than the level signal below the preset duration (that is, the second level signal), serial port data learning begins. The baud rate is calculated using the minimum value of the duration of at least one level signal in the second level signal duration to obtain the second baud rate.

[0088] At this time, it is necessary to compare the first preset baud rate that is closest to the second baud rate among at least one preset baud rate with the second baud rate to determine whether the first preset baud rate is very close to the second baud rate. If so, the first preset baud rate is determined to be the first baud rate. If the first preset baud rate is not very close to the second baud rate, it is necessary to continue to increase the second baud rate by a single factor until it is determined that the third baud rate after at least one single factor increase is very close to the second preset baud rate, and then the third baud rate is determined to be the first baud rate, and the second preset baud rate is the baud rate that is closest to the third baud rate among at least one preset baud rate.

[0089] Then, the collected second level signal is parsed according to the first baud rate to determine whether the bit corresponding to the second level signal at this time meets the preset number. For example, if the format of the serial port data of a single character is a single start bit, eight data bits and a single stop bit, then it can be determined whether the number of bits obtained after parsing the second level signal is equal to the number of a single start bit plus eight data bits. If not, continue to collect until the number of bits parsed by the collected second level signal is equal to the number of a single start bit plus eight data bits. Alternatively, if the number of bits obtained after parsing the second level signal at this time is equal to the number of a single start bit plus seven data bits, and there is a rising edge interrupt when the second level signal is collected at this time, then it can be directly determined that the eighth data bit corresponds to a high level signal. After determining that the bit corresponding to the second level signal meets the preset number at this time, the first serial port data can be obtained. Then, the serial port data is collected for the remaining initialization data that has not been collected according to the first baud rate. Thereby obtaining the remaining at least one second serial port data and the character interval between all serial port data.

[0090] Step S203: the device connector encapsulates the second initialization data and sends it to the vehicle connector. Correspondingly, the vehicle connector receives the encapsulated second initialization data.

[0091] After the device connector encapsulates the second initialization data, a data packet can be obtained, and the data packet is compressed and sent to the vehicle connector, or directly sent to the vehicle connector.

[0092] Step S204: the vehicle connector sends the second initialization data to the vehicle. Correspondingly, the vehicle receives the second initialization data sent by the vehicle connector.

[0093] Among them, the vehicle connector first sends the first level signal to the vehicle based on the K line, and then sends multiple serial port data to the vehicle according to the first baud rate in the second initialization data and the character interval of multiple serial port data. After receiving the second initialization data, the vehicle will generate response data and send it back to the diagnostic instrument along the original route, thereby establishing a communication connection between the diagnostic instrument and the vehicle, and then starting the subsequent diagnostic process.

[0094] It can be seen that in the embodiment of the present application, remote communication based on the device connector and the vehicle connector can realize remote diagnosis of the vehicle by the diagnostic instrument. During the initialization process of the diagnostic system, since the first initialization data sent by the diagnostic instrument based on the K line is level information, if the device connector directly sends the level information corresponding to the first initialization data to the vehicle connector through remote communication after receiving the level information corresponding to the first initialization data, it may cause an error interval between the level information corresponding to the first initialization data based on the delay of remote communication, so that the vehicle cannot accurately identify the level information after receiving the level information sent synchronously by the vehicle connector, and thus cannot establish a communication connection between the diagnostic instrument and the vehicle. In the present application, after receiving the first initialization data sent by the diagnostic instrument, the device connector restores and analyzes the first initialization data as a whole to obtain the second initialization data, and then encapsulates it and sends it to the device connector, so that when the device connector sends the restored and analyzed second initialization data to the vehicle based on the K line, it can avoid the failure to establish a communication connection between the diagnostic instrument and the vehicle due to the possible remote communication delay after the first initialization data is directly sent to the vehicle connector. Thereby improving the stability of the initialization data transmission between the vehicle and the diagnostic instrument.

[0095] In accordance with the above-mentioned embodiments, please refer to Figure 5 , Figure 5 This is a functional unit block diagram of a vehicle diagnostic device provided in an embodiment of the present application. The vehicle diagnostic device may be the above-mentioned diagnostic connector or a part of the diagnostic connector, such as Figure 5 As shown, the vehicle diagnostic device 50 includes:

[0096] The receiving unit 501 is used to receive the first initialization data sent by the diagnostic instrument, and perform data analysis on the first initialization data to obtain the second initialization data, wherein the first initialization data is used to realize the diagnostic communication connection between the diagnostic instrument and the vehicle, and the second initialization data includes serial port data;

[0097] The sending unit 503 is used to encapsulate the second initialization data and send the data to the vehicle connector, so that the vehicle connector sends the second initialization data to the vehicle.

[0098] In a feasible embodiment, the receiving unit 501 is used to collect the level signal when receiving the first initialization data sent by the diagnostic instrument, and obtain the first level signal and the second level signal, and the first level signal is collected before the second level signal; the processing unit 502 is used to calculate the baud rate based on the level signal duration in the second level signal to obtain the first baud rate corresponding to the first initialization data; the second level signal is parsed according to the first baud rate to obtain the first serial port data; if the first serial port data meets the preset data format, the receiving unit 501 collects serial port data for the remaining data in the first initialization data according to the first baud rate, and parses it through the processing unit 502 to obtain at least one second serial port data, and the character interval between multiple serial port data, the multiple serial port data including the first serial port data and at least one second serial port data; the second initialization data is obtained, and the second initialization data includes the first level signal, multiple serial port data, the first baud rate and the character interval between multiple serial port data.

[0099] In a feasible embodiment, when it is determined that the duration of the collected single-segment level signal is less than the first preset duration, it is determined that the collected level signal is a second level signal.

[0100] In a feasible embodiment, the receiving unit 501 is also used to collect serial port data before receiving the first initialization data sent by the diagnostic instrument; when receiving the first initialization data sent by the diagnostic instrument, if the collected level signal does not meet the serial port data format, it switches to level signal collection.

[0101] In a feasible embodiment, in terms of performing baud rate calculation based on the duration of the level signal in the second level signal to obtain the first baud rate corresponding to the first initialization data, the processing unit 502 is specifically used to: determine the target minimum value in the duration of at least one level signal in the second level signal, and determine the second baud rate based on the ratio between the unit time and the target minimum value; if it is determined that the relative deviation between the first preset baud rate and the second baud rate in at least one preset baud rate is not greater than the preset deviation, then determine the first preset baud rate as the first baud rate, and the first preset baud rate is the baud rate that is closest to the second baud rate in at least one preset baud rate.

[0102] In a feasible embodiment, the processing unit 502 is also used to: if it is determined that the relative deviation between the first preset baud rate and the second baud rate is greater than the preset deviation, continue to increase the second baud rate by a single factor until the relative deviation between the second preset baud rate and the third baud rate after at least one increase is no greater than the preset deviation, determine that the second preset baud rate is the first baud rate, and the second preset baud rate is the baud rate that is closest to the third baud rate among at least one preset baud rate.

[0103] In a feasible embodiment, the processing unit 502 is further used to: if it is determined that the first serial port data is composed of the first data and the preset stop bit data, then it is determined that the first serial port data meets the preset data format, and the first data includes the start bit data and the complete data bit data determined by parsing the second level signal according to the first baud rate; or if it is determined that the first serial port data is composed of the second data, the first data bit data and the preset stop bit data, and there is a rising edge in the level signal to be collected after the second level signal is collected, then it is determined that the first serial port data meets the preset data format, and the second data includes the start bit data and part of the data bit data determined by parsing the second level signal according to the first baud rate, the partial data bit data differs from the complete data bit data by one data bit data, and the first data bit data corresponds to a high level signal.

[0104] It can be understood that since the method embodiment and the device embodiment are different presentation forms of the same technical concept, the content of the method embodiment part in this application should be synchronously adapted to the device embodiment part and will not be repeated here.

[0105] In the case of an integrated unit, such as Figure 6 As shown, Figure 6 This is a block diagram of the functional units of another vehicle diagnostic device 50 provided in an embodiment of the present application. Figure 6 In the embodiment, the vehicle diagnostic device 50 includes: a processing module 612 and a communication module 611. The processing module 612 is used to control and manage the actions of the vehicle diagnostic device 50, for example, the steps of the processing unit 502, and / or other processes for executing the technology described herein. The communication module 611 is used to support the interaction between the vehicle diagnostic device 50 and other devices, for example, the steps of the receiving unit 501 and the sending unit 503, and / or other processes for executing the technology described herein. Figure 6 As shown, the vehicle diagnostic device 50 may further include a storage module 613 , and the storage module 613 is used to store program codes and data of the vehicle diagnostic device 50 .

[0106] Among them, the processing module 612 can be a processor or a controller, for example, a central processing unit (CPU), a general processor, a digital signal processor (DSP), an ASIC, an FPGA or other programmable logic device, a transistor logic device, a hardware component or any combination thereof. It can implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements a computing function, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like. The communication module 611 can be a transceiver, an RF circuit or a communication interface, and the like. The storage module 613 can be a memory.

[0107] Among them, all relevant contents of each scenario involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and will not be repeated here. The above vehicle diagnostic device 50 can execute the above Figure 2 Vehicle diagnostic method shown.

[0108] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When a computer instruction or computer program is loaded or executed on a computer, a process or function according to an embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired or wireless means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center containing one or more available media sets. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.

[0109] Figure 7 This is a structural block diagram of an electronic device provided in an embodiment of the present application. Figure 7As shown, the electronic device 700 may include one or more of the following components: a processor 701, a memory 702 and a communication interface 703. The processor 701, the memory 702 and the communication interface 703 are interconnected and perform communication work with each other, wherein the memory 702 may store one or more computer programs, and the one or more computer programs may be configured to implement the methods described in the above embodiments when executed by one or more processors 701.

[0110] The processor 701 may include one or more processing cores. The processor 701 uses various interfaces and lines to connect the various parts of the entire electronic device 700, and executes various functions and processes data of the electronic device 700 by running or executing instructions, programs, code sets or instruction sets stored in the memory 702, and calling data stored in the memory 702. Optionally, the processor 701 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 701 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processor (Graphics Processing Unit, GPU) and a modem. It is understandable that the above-mentioned modem may not be integrated into the processor 701, and may be implemented separately through a communication chip.

[0111] The memory 702 may include a random access memory (RAM) or a read-only memory (ROM). The memory 702 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 702 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc. The data storage area may also store data created by the electronic device 700 during use, etc.

[0112] It is understandable that the electronic device 700 may include more or fewer structural elements than those in the above structural block diagram, for example, including a power module, physical buttons, a WiFi (Wireless Fidelity) module, a speaker, a Bluetooth module, a sensor, etc., which are not limited here.

[0113] The electronic device 700 may be a device connector or a part of a device connector.

[0114] An embodiment of the present application provides a computer-readable storage medium, wherein program data is stored in the computer-readable storage medium, and when the program data is executed by a processor, the program data is used to execute part or all of the steps of any one of the vehicle diagnostic methods recorded in the above method embodiments.

[0115] The present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps of any vehicle diagnostic method described in the above method embodiment. The computer program product may be a software installation package.

[0116] It should be noted that, for the sake of simplicity, the method embodiments of any of the above-mentioned vehicle diagnostic methods are all described as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the present application.

[0117] Although the present application is described herein in conjunction with various embodiments, in the process of implementing the claimed application, those skilled in the art may understand and implement other variations of the disclosed embodiments by viewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "one" does not exclude multiple situations. Certain measures are recorded in different dependent claims, but this does not mean that these measures cannot be combined to produce good results.

[0118] A person skilled in the art can understand that all or part of the steps in the various methods of the method embodiments of any of the above-mentioned vehicle diagnostic methods can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, and the memory can include: a flash drive, a read-only memory (English: Read-Only Memory, abbreviated as: ROM), a random access memory (English: Random Access Memory, abbreviated as: RAM), a disk or an optical disk, etc.

[0119] The embodiments of the present application are introduced in detail above. Specific examples are used herein to illustrate the principle and implementation method of a vehicle diagnostic method and device of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for a person skilled in the art, according to the idea of ​​a vehicle diagnostic method and device of the present application, there may be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

[0120] The present application is described with reference to the flowcharts and / or block diagrams of the methods, hardware products, and computer program products of the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0121] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0122] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0123] It can be understood that any product that is controlled or configured to execute the processing method of the flowchart described in a method embodiment of a vehicle diagnostic method of the present application, such as the terminal and computer program product in the above flowchart, falls within the scope of the related products described in the present application.

[0124] Obviously, those skilled in the art can make various changes and modifications to the vehicle diagnostic method and device provided by the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A vehicle diagnostic method, characterized in that: The method is applied to a device connector, the device connector is connected to a diagnostic instrument by a K-line, the device connector is connected to a vehicle connector by a remote communication, and the vehicle connector is connected to a vehicle by a K-line, and the method includes: Receiving first initialization data sent by the diagnostic instrument, and performing data analysis on the first initialization data to obtain second initialization data, wherein the first initialization data is used to implement a diagnostic communication connection between the diagnostic instrument and the vehicle, and the second initialization data includes serial port data; The second initialization data is data-encapsulated and then sent to the vehicle connector, so that the vehicle connector sends the second initialization data to the vehicle.

2. The method according to claim 1, characterized in that The receiving the first initialization data sent by the diagnostic instrument and performing data analysis on the first initialization data to obtain the second initialization data includes: When receiving the first initialization data sent by the diagnostic instrument, performing level signal acquisition to obtain a first level signal and a second level signal, wherein the first level signal is acquired before the second level signal; Performing baud rate calculation based on the duration of the level signal in the second level signal to obtain a first baud rate corresponding to the first initialization data; Parsing the second level signal according to the first baud rate to obtain first serial port data; If the first serial port data satisfies a preset data format, performing serial port data acquisition on the remaining data in the first initialization data according to the first baud rate to obtain the at least one second serial port data and a character interval between a plurality of serial port data, wherein the plurality of serial port data includes the first serial port data and the at least one second serial port data; The second initialization data is obtained, where the second initialization data includes the first level signal, the plurality of serial port data, the first baud rate, and a character interval between the plurality of serial port data.

3. The method according to claim 2, characterized in that When it is determined that the duration of the collected single-segment level signal is less than the first preset duration, it is determined that the collected level signal is the second level signal.

4. The method according to claim 2 or 3, characterized in that: The performing baud rate calculation based on the duration of the level signal in the second level signal to obtain the first baud rate corresponding to the first initialization data includes: Determine a target minimum value in the duration of at least one level signal in the second level signal, and determine a second baud rate based on a ratio between a unit time and the target minimum value; If it is determined that the relative deviation between a first preset baud rate in at least one preset baud rate and the second baud rate is not greater than the preset deviation, the first preset baud rate is determined to be the first baud rate, and the first preset baud rate is the baud rate closest to the second baud rate in the at least one preset baud rate.

5. The method according to claim 4, characterized in that After determining the second baud rate, the method further comprises: If it is determined that the relative deviation between the first preset baud rate and the second baud rate is greater than the preset deviation, the second baud rate is continuously increased by a single factor until the relative deviation between the second preset baud rate and the third baud rate after at least one increase is no greater than the preset deviation, and the second preset baud rate is determined to be the first baud rate, and the second preset baud rate is the baud rate closest to the third baud rate among the at least one preset baud rate.

6. The method according to any one of claims 2 to 5, characterized in that: After obtaining the first serial port data, the method further includes: If it is determined that the first serial port data is composed of first data and preset stop bit data, then it is determined that the first serial port data meets the preset data format, and the first data includes start bit data and complete data bit data determined by parsing the second level signal according to the first baud rate; or If it is determined that the first serial port data is composed of the second data, the first data bit data and the preset stop bit data, and there is a rising edge in the level signal to be collected after the second level signal is collected, then it is determined that the first serial port data meets the preset data format, and the second data includes the start bit data and part of the data bit data determined by parsing the second level signal according to the first baud rate, the part of the data bit data differs from the complete data bit data by one data bit data, and the first data bit data corresponds to a high level signal.

7. The method according to any one of claims 2 to 6, characterized in that: Before receiving the first initialization data sent by the diagnostic instrument, the method further includes: Carry out serial port data collection; When receiving the first initialization data sent by the diagnostic instrument, if the collected level signal does not meet the serial port data format, switching to level signal collection is performed.

8. A vehicle diagnostic device, characterized in that: The device is applied to a device connector, the device connector is connected to a diagnostic instrument by a K-line, the device connector is connected to a vehicle connector by a remote communication, and the vehicle connector is connected to a vehicle by a K-line. The device includes: a receiving unit, configured to receive first initialization data sent by the diagnostic instrument, and perform data parsing on the first initialization data through a processing unit to obtain second initialization data, wherein the first initialization data is used to implement a diagnostic communication connection between the diagnostic instrument and the vehicle, and the second initialization data includes serial port data; A sending unit is used to encapsulate the second initialization data and then send the data to the vehicle connector, so that the vehicle connector sends the second initialization data to the vehicle.

9. An electronic device, characterized in that: The device comprises: A processor, a memory, and a communication interface, wherein the processor, the memory, and the communication interface are connected to each other and perform communication work between them; The memory stores executable program code, and the communication interface is used for wireless communication; The processor is used to call the executable program code stored in the memory to execute the method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that: A computer program for electronic data exchange is stored, wherein the computer program enables a computer to execute the method according to any one of claims 1 to 7.