Automobile diagnosis method, cloud platform and storage medium
By receiving the diagnostic instrument signal through the cloud platform, determining the K-line protocol initialization type, and sending wake-up or address data, the problem that the existing technology cannot support K-line protocol communication is solved, and remote diagnosis of K-line protocol vehicles is realized.
Patent Information
- Application Number
- CN202310772835.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-27
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2043-06-27
AI Technical Summary
Existing remote diagnostic technology cannot support vehicle diagnosis using the K-line protocol for communication, resulting in the inability to effectively diagnose some vehicles.
The diagnostic instrument signal is received through the cloud platform, the initialization type is determined according to the falling edge and low-level width of the signal, a fast or slow initialization method is used, wake-up data or address data is sent, and K-line protocol communication is established between the diagnostic instrument and the car.
It realizes fast or slow initialization based on the K-line protocol in remote diagnosis scenarios, reduces data delay, and ensures data accuracy and communication efficiency.
Smart Images

Figure CN116684449B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of automobile diagnostic technology, and in particular to an automobile diagnostic method, a cloud platform, and a storage medium. Background Art
[0002] Automobile diagnosis refers to determining the technical condition of a car without disassembling it (or only removing individual parts). For example, diagnosing the technical condition of the car's chassis, steering wheel, dashboard, engine, etc.
[0003] like Figure 1 As shown, in the prior art, diagnostic tools can be connected to a car via a cable for diagnostics. For example, the tool can be connected to the car's OBD (On-Board Diagnostics) port. However, this approach has limitations. For example, there are relatively few diagnostic tools available on the market that support newer cars. In such cases, the original manufacturer's diagnostic tool is usually required, but the number of users who own original manufacturer's tools is limited, resulting in certain limitations.
[0004] To address this, remote diagnostic technology has emerged in the related art to address the limitations mentioned above. However, the inventors have discovered that remote diagnostic technology is typically targeted at vehicles that communicate using the CAN protocol. This is because the CAN protocol has a relatively high baud rate, for example, above 33.3k. Therefore, when performing remote diagnostics at this high baud rate, data latency is minimal, generally meeting the protocol's requirements. However, some vehicles also use the K-line protocol for communication, and some current remote diagnostic technologies do not support these vehicles. Summary of the Invention
[0005] Based on this, the present application provides an automobile diagnostic method, a cloud platform, and a storage medium to implement remote diagnosis of automobiles that communicate using the K-line protocol.
[0006] In a first aspect, the present application provides a vehicle diagnostic method, which is applied to a cloud platform, wherein the cloud platform is connected to a diagnostic instrument and a vehicle respectively; the method comprises:
[0007] receiving a signal sent by the diagnostic instrument;
[0008] When a falling edge occurs in the signal and a low level width after the falling edge reaches a first preset threshold, sampling the signal according to a preset sampling period;
[0009] determining an initialization type employed by the signal;
[0010] If it is determined that the initialization type adopted by the signal is fast initialization, sampling of the signal is stopped, preset wake-up data is sent to the automobile, and communication between the diagnostic instrument and the automobile is established.
[0011] If it is determined that the initialization type adopted by the signal is slow initialization, sampling of the signal is continued until address data in the signal is sampled; and low level with a width of the first preset threshold is sent to the automobile, and each sampling result is sent to the automobile according to the sampling period until the address data is sent, and communication between the diagnostic instrument and the automobile is established.
[0012] In a second aspect, the present application provides a cloud platform, comprising: a memory, the memory storing a computer program; and a processor, the processor implementing the method of the first aspect when executing the computer program.
[0013] In a third aspect, the present application provides a computer readable storage medium, which stores a computer program, the computer program being executed by a processor to implement the method of the first aspect.
[0014] Based on the above technical solution, the present application can establish communication between a diagnostic instrument and an automobile based on K-line protocol in a remote diagnosis scenario, and then perform diagnosis. That is, remote diagnosis of an automobile using K-line protocol for communication is realized. BRIEF DESCRIPTION OF DRAWINGS
[0015] Figure 1 An application scenario of automobile diagnosis in the prior art;
[0016] Figure 2 An exemplary application scenario diagram of the embodiment of the present application;
[0017] Figure 3 An exemplary flowchart of fast initialization of K-line protocol;
[0018] Figure 4 An exemplary flowchart of slow initialization of K-line protocol;
[0019] Figure 5 A flowchart of the automobile diagnosis method provided by the embodiment of the present application;
[0020] Figure 6 An exemplary timing diagram of sampling of a signal in the embodiment of the present application;
[0021] Figure 7 An exemplary timing diagram of influence of large data delay on data accuracy in the embodiment of the present application;
[0022] Figure 8An exemplary timing diagram for setting cache data to ensure data accuracy in embodiments of the present application;
[0023] Figure 9 An exemplary structural diagram of a cloud platform provided in embodiments of the present application. Embodiments
[0024] The technical solutions in embodiments of the present application will be described clearly and completely below with reference to the drawings in embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, not all the embodiments of the present application, and it should be understood that the specific embodiments described herein are only used to explain the present application, not to limit the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of protection of the present application.
[0025] An exemplary automobile diagnosis method provided in embodiments of the present application can be applied to a scenario as shown in Figure 2 In this scenario, a cloud platform is connected with a diagnosis instrument and an automobile respectively, that is, cross-domain connection between the diagnosis instrument and the automobile can be realized through the cloud platform, for example, the cloud platform can be a server, a relay, etc. Based on this, the cloud platform can realize remote diagnosis of an automobile using K-line protocol for communication by executing the method provided in embodiments of the present application. It should be noted that the automobile using K-line protocol for communication means that some modules in the automobile use K-line protocol for communication, for example, a steering wheel module, an instrument panel module, etc. It can be understood that the diagnosis instrument establishes communication with such modules through K-line protocol when diagnosing such modules, and then performs diagnosis. Of course, there can also be modules using other communication protocols in the automobile, for example, an engine using CAN protocol, etc.
[0026] The K-line protocol will be described exemplarily first. If a host and a slave establish communication using K-line protocol, initialization is needed to establish this communication. There are usually two types of K-line protocol initialization: fast initialization and slow initialization.
[0027] As shown in Figure 3As shown, if fast initialization is used, first, the host sends a 25 millisecond (ms) low level and a 25ms high level to the slave in sequence. After that, the data transmission between the host and the slave is based on a fixed baud rate, such as a 10400bps baud rate (bps). It should be noted that the 25ms low level and 25ms high level described here are only examples. In actual applications, the width of the low level and the width of the high level can be other reasonable values; and it should also be noted that the embodiment of the present application refers to data with a 25ms low level and a 25ms high level in sequence as wake-up data. Then, the host sends communication start request data (5 bytes, also called system entry data) to the slave. Finally, the slave returns communication start response data (7 bytes) to the host. In this way, the communication between the host and the slave is established, allowing data transmission between the two.
[0028] Slow initialization usually includes 5 baud rate initialization and 200 baud rate initialization. 5 baud rate initialization is taken as an example for explanation. Figure 4 As shown in the figure, the master first sends a 5bps address byte to the slave. This address byte consists of a start bit, eight address bits, and a stop bit. The start bit is one bit (low level), the eight address bits are eight bits, and the stop bit is one bit (high level). Furthermore, each bit in the 5bps address byte lasts for 200ms. The slave then returns 0x55, which carries the baud rate information, along with KW1 and KW2. The baud rate at this stage is the baud rate indicated by 0x55 (usually 9600bps or 10400bps). The master then determines the baud rate based on 0x55 and sends the inverted KW2 (denoted as ~KW2) to the slave at this baud rate. Finally, the slave sends the inverted ADDR (denoted as ~ADDR) to the master. This establishes communication between the master and slave, enabling data transmission between them.
[0029] The automobile diagnostic method in the embodiment of the present application is as follows: Figure 5 As shown, the process may include steps S10 to S50.
[0030] S10. Receive the signal sent by the diagnostic instrument.
[0031] S20 . When a falling edge occurs in the signal and a low-level width after the falling edge reaches a first preset threshold, sampling the signal according to a preset sampling period.
[0032] It should be noted that the idle level in the K-line protocol is high, and therefore, according to the above description of the two initialization processes, when a falling edge of the signal is detected, it is indicated that the diagnostic instrument may send initialization-related data. Exemplarily, the cloud platform can detect the level change on the K bus, and when the level is detected to change from high to low, the subsequent steps are performed.
[0033] Therefore, when the falling edge of the signal is detected, it is also necessary to determine whether it is related to initialization, and therefore, it is also necessary to determine whether the low level width after the falling edge can reach the first preset threshold, that is, whether the duration of the low level after the falling edge can reach the first preset threshold. Specifically, if the diagnostic instrument and some modules in the vehicle complete initialization and communication, the baud rate (bps) commonly used in subsequent data transmission is 9600, 10400, etc., and therefore, the first preset threshold can be reasonably set according to this condition, so that when the low level width after the falling edge reaches this value, this condition can be excluded.
[0034] That is, when the low level width after the falling edge reaches the first preset threshold, it can be determined that it is related to initialization, and the signal can be sampled according to the pre-defined sampling period.
[0035] S30, determining the initialization type of the signal.
[0036] That is, determining whether the initialization type of the signal is fast initialization or slow initialization.
[0037] S40, if it is determined that the initialization type of the signal is fast initialization, stopping sampling the signal, and sending preset wake-up data to the vehicle, and then establishing communication between the diagnostic instrument and the vehicle.
[0038] The definition of the wake-up data is as described above, and in the embodiments of the present application, the specific setting of the wake-up data can be determined by the vehicle itself. Exemplarily, the wake-up data is set according to the configuration data of the vehicle, for example, assuming that the low level width and the low level width in the wake-up data are both 25 ms as specified in the configuration data, then when it is determined that the initialization type of the signal is fast initialization, the cloud platform can directly send a low level of 25 ms to the vehicle line, and then send a high level of 25 ms. Moreover, when it is determined that the initialization type of the signal is fast initialization, the cloud platform can also stop sampling the signal, so as to release the resources occupied by sampling and reduce energy consumption. It can be understood that after the wake-up data is sent, the cloud platform can forward the communication start request data and the communication response request data, so as to establish the communication between the diagnostic instrument and the vehicle (the module using the K-line protocol to communicate) this time, so as to achieve the purpose of remote diagnosis.
[0039] In the related art, if the diagnostic instrument and the vehicle establish the current communication by using the CAN protocol, the cloud platform usually sends the wake-up data to the vehicle after receiving the wake-up data sent by the diagnostic instrument. Taking the wake-up data as an example, the wake-up data is a low level of 25 ms and a high level of 25 ms. In this case, the data delay will reach 50 ms, and considering the network delay, the total data delay will be greater than 50 ms. However, in the embodiment of the present application, when the cloud platform determines that the initialization type used is fast initialization, the cloud platform directly initializes according to the preset configuration to directly send the wake-up data to the vehicle. In this way, the sampling waiting time of the high level can be saved, and the data delay is greatly reduced.
[0040] Therefore, the embodiment of the present application can realize the fast initialization of the diagnostic instrument and the vehicle based on the K-line protocol to establish communication between the diagnostic instrument and the vehicle in the remote diagnosis scenario.
[0041] S50, if it is determined that the initialization type of the signal is slow initialization, the sampling of the signal is continued until the address data in the signal is sampled; and a low level with a first preset threshold is sent to the vehicle, and each sampling result is sent to the vehicle according to a sampling period until the address data is sent, and the communication between the diagnostic instrument and the vehicle is established.
[0042] As described above, if the initialization type of the signal is slow initialization, the diagnostic instrument sends address data at this time, and the addresses of each module in the vehicle are different. Therefore, when it is determined that it is slow initialization, the signal still needs to be sampled until the address data is sampled. As described above, when the diagnostic instrument sends the address data, the vehicle needs to return related data, so the sampling of the signal can be stopped at this time to release the resources occupied by the sampling and reduce the energy consumption. As an example, after each sampling, the low level of the first preset threshold and the sampling result of each time can be analyzed to determine whether complete address information can be obtained. If yes, it is determined that the address data is sampled, otherwise the sampling is continued.
[0043] In addition, when it is determined that it is slow initialization, the cloud platform can send a low level with a first preset threshold to the vehicle before starting sampling, and send each sampling result to the vehicle according to a sampling period after starting sampling. It can be understood that in this way, the complete address data can be sent to the vehicle, and then the cloud platform can forward 0x55, KW1, KW2 and the inverted KW2 and ADDR, thereby establishing the current communication between the diagnostic instrument and the vehicle (the module using the K-line protocol to communicate) to achieve the purpose of remote diagnosis.
[0044] In the related art, if the diagnostic instrument and the automobile establish the current communication by using the CAN protocol, the cloud platform usually sends the address data to the automobile after receiving the address data sent by the diagnostic instrument. Taking the initialization at the rate of 5 baud as an example, the address data has a total of 10 bits, and each bit is 200 ms. Therefore, the cloud platform needs 2 s to receive the address data, which cannot completely meet the delay requirement (the delay between the address data and 0x55 needs to be ensured to be within 20-300 ms) specified in the K-line protocol. However, in the embodiment of the present application, the cloud platform can send the low level before the start of sampling and the sampling result after the start of sampling to the automobile until the address data is sent, as long as it is determined that the initialization type used is slow initialization. Therefore, the embodiment of the present application greatly reduces the delay of data and can meet the requirement of the protocol.
[0045] Therefore, the embodiment of the present application can realize the slow initialization of the K-line protocol between the diagnostic instrument and the automobile to establish the communication and then perform the diagnosis in the remote diagnosis scenario.
[0046] Therefore, the embodiment of the present application can realize the slow initialization of the K-line protocol between the diagnostic instrument and the automobile to establish the communication and then perform the diagnosis in the remote diagnosis scenario.
[0047] In an embodiment, the step S30 can include a sub-step S310 and a sub-step S320.
[0048] S310, determining whether an upward edge appears when the low level width of the signal after the appearance of a falling edge reaches a second preset threshold value. The second preset threshold value is greater than the first preset threshold value.
[0049] S320, if the upward edge appears, determining that the initialization type used by the signal is fast initialization, otherwise, determining that the initialization type used by the signal is slow initialization.
[0050] The specific setting of the second preset threshold value can be determined by the automobile itself. For example, the wake-up data is set according to the configuration data of the automobile. For example, it is assumed that the low level width in the wake-up data is specified as 25 ms in the configuration data, and the second preset threshold value can be set as 25 ms.
[0051] As described above, if it is fast initialization, the diagnostic instrument sends a high level when the low level width of the signal after the appearance of a falling edge reaches the second preset threshold value, and an upward edge appears at this time. If it is slow initialization, the diagnostic instrument still sends a low level when the low level width of the signal after the appearance of a falling edge reaches the second preset threshold value. Therefore, the type of initialization can be determined.
[0052] In an embodiment, the establishing the communication between the diagnostic instrument and the vehicle in step S40 can include sub-step S410 and sub-step S420.
[0053] S410, receiving the communication start request data sent by the diagnostic instrument, and sending the communication start request data to the vehicle.
[0054] S420, receiving the communication response request data sent by the vehicle in response to the communication start request data, and sending the communication response request data to the diagnostic instrument to establish the communication between the diagnostic instrument and the vehicle.
[0055] As can be known from the foregoing, the diagnostic instrument sends the communication start data after sending the wake-up data, so the cloud platform can forward the communication start data to the vehicle after receiving it. Then, the vehicle returns the communication response request data, and the cloud platform can forward the communication response request data to the diagnostic instrument after receiving it. In this way, the communication between the diagnostic instrument and the vehicle is established.
[0056] In an embodiment, the establishing the communication between the diagnostic instrument and the vehicle in step S50 can include sub-step S510 to sub-step S530.
[0057] S510, receiving the 0x55, KW1 and KW2 sent by the vehicle, and sending the 0x55, KW1 and KW2 to the diagnostic instrument.
[0058] S520, receiving the inverted KW2 sent by the diagnostic instrument in response to the 0x55, KW1 and KW2, and sending the inverted KW2 to the vehicle.
[0059] S530, receiving the inverted ADDR sent by the vehicle in response to the inverted KW2, and sending the inverted ADDR to the diagnostic instrument to establish the communication between the diagnostic instrument and the vehicle.
[0060] As can be known from the foregoing, the vehicle returns the 0x55, KW1 and KW2 after receiving the address data sent by the diagnostic instrument, so the cloud platform can forward the 0x55, KW1 and KW2 to the diagnostic instrument after receiving them. Then, the diagnostic instrument sends the inverted KW2 after receiving the 0x55, KW1 and KW2, so the cloud platform can forward the inverted KW2 to the vehicle after receiving it. Finally, the vehicle returns the inverted ADDR after receiving the inverted KW2, so the cloud platform can forward the inverted ADDR to the diagnostic instrument after receiving it, where the ADDR is obtained by the vehicle according to the address data. In this way, the communication between the diagnostic instrument and the vehicle is established.
[0061] In one embodiment, the sampling period is set based on the baud rate used by the address data, so that each sampling result contains only one logic level. Furthermore, the first preset threshold is greater than the sampling period, and the two are multiples of each other. Specifically, to achieve accurate signal sampling, this embodiment of the present application sets the sampling period based on slow initialization, that is, the sampling period is set based on the baud rate used by the address data. Furthermore, the first preset threshold is greater than the sampling period, and the two are multiples of each other, for example, the first preset threshold is four times the sampling period. Based on this, the set sampling period ensures that each sampling result contains only one logic level, for example, only a high level or only a low level. Compared to a single sampling result that may contain both a high level and a low level, this embodiment of the present application achieves accurate sampling. In one embodiment, the sampling period can be 5 milliseconds, and / or the first preset threshold can be 20 milliseconds. Of course, in other embodiments, the sampling period and the first preset threshold can also have other values, as long as each sampling result contains only one logic level.
[0062] For example, the baud rate used by the address data can be known from the configuration data of the car. Assuming that the baud rate used by the address data is 5 (the duration of each bit in the address data is 200ms), the sampling period can be set to 5ms and the first preset threshold value to 20ms. Based on this, if Figure 6 As shown, if the signal has a falling edge and the low-level width after the falling edge can reach 20ms, sampling will start at 20ms and be sampled every 5ms. Afterwards, assuming that the initialization type used by the signal is slow initialization, that is, the diagnostic instrument is sending address data at this time, sampling will continue. As mentioned above, it can be understood that the current sampling is the start bit in the address data, which is a low level and lasts for 200ms. Assuming that the first address bit after the start bit is a high level. As the sampling progresses, when the sampling reaches 200ms, it is the last sampling of the start bit, and the logic level of this sampling is a low level; the next sampling is the sampling of the first address bit, and the logic level of this sampling is a high level (subsequent sampling is similar, and the complete sampling process is not shown). It can be seen from this that the setting of the sampling period and the first preset threshold in this example will not result in both high and low levels in one sampling, thus achieving the purpose of accurate sampling.
[0063] In one embodiment, step S50 of sending a low level having a width of the first preset threshold to the vehicle and sending each sampling result to the vehicle according to a sampling period may include: buffering the signal until the width of the low level of the signal after a falling edge reaches a third preset threshold, sending the low level having a width of the first preset threshold to the vehicle, and sending each sampling result to the vehicle according to the sampling period. The signal buffer is updated as sampling proceeds.
[0064] When the cloud platform determines that the initialization type of the signal is slow initialization, on one hand, it needs to continue sampling, and on the other hand, it needs to forward the address data. However, when the network has a relatively large delay, the data sent by the receiving diagnostic instrument will also be delayed, at this time, the sampling of the data will be affected, and the sampling will also be delayed. In this case, the cloud platform will still send data to the vehicle according to the sampling period, that is, whether there is network delay or not, the data is sent according to the sampling period, and it is possible that the sent data is not real data due to the delay of the sampling, which affects the accuracy. For example, as shown in Figure 7 , it is assumed that the sampling starts at 20 ms, and it is determined that the initialization type of the signal is slow initialization at 25 ms, then the cloud platform sends the low level of 20 ms to the vehicle at 25 ms, and sends the sampling result of each time to the vehicle according to the sampling period. It is assumed that a relatively large network delay (for example, more than 20 ms) occurs at 120 ms, at this time, the sampling is affected, and the cloud platform sends the sampling result to 140 ms, at this time, there is no corresponding sampling result, the cloud platform sends the data to the vehicle, which is not real data, and thus the data accuracy is affected.
[0065] Therefore, the embodiment of the present application sets up data buffering to ensure that the data accuracy is not affected by the network delay. Specifically, when it is determined that the initialization type of the signal is slow initialization, buffering is performed first, until the low level width after the falling edge of the signal reaches a third preset threshold, in an embodiment, the third preset threshold can be 100 ms, that is, 100 ms of data buffering is set. It should be noted that the buffering of the signal will be updated with the sampling. At this time, the cloud platform sends the low level with a width of the first preset threshold to the vehicle, and sends the sampling result of each time to the vehicle according to the sampling period, so that even if the network delay is relatively large, the embodiment of the present application can ensure the accuracy of the data due to the setting of the data buffering. For example, as shown in Figure 8 , the cloud platform buffers 100 ms of data, and sends the low level of 20 ms to the vehicle at 100 ms, and then sends the sampling result of each time to the vehicle according to the sampling period. In this way, even if a relatively large network delay occurs at 120 ms, since there is 100 ms of data buffering, the cloud platform still sends real data to the vehicle after 140 ms, which ensures the data accuracy. It can be understood that when the network delay is improved, the buffering will be updated with the sampling.
[0066] In addition, the signal is buffered until the low level width after the falling edge of the signal reaches the third preset threshold, and the signal can also be used to further determine that the initialization type adopted by the signal is slow initialization, and the reliability is improved. Exemplarily, the third preset threshold can be 100 ms. Since the starting bit of the slow initialization is low and the duration is greater than 100 ms, at 100 ms, whether the initialization type adopted is slow initialization can be further determined according to whether the buffered low levels are all low.
[0067] In summary, assuming that it is known from the configuration data of the vehicle that the modules using K-line protocol communication have a wake-up data of 25 ms low level and 25 ms high level, and address data of 5 baud rate. When diagnosing these modules, the cloud platform can perform the exemplary method described below. In this example method, the sampling period can be set to 5 ms, the first preset threshold can be set to 20 ms, the second preset threshold can be set to 25 ms, and the third preset threshold can be set to 100 ms. Based on this, the cloud platform receives the signal sent by the diagnostic instrument. When the signal has a falling edge and the low level width after the falling edge reaches 20 ms, the signal is sampled at a sampling period of 5 ms. Then, it is determined whether the low level width after the falling edge of the signal reaches 25 ms. If the rising edge appears, it is determined that the initialization type adopted by the signal is fast initialization, otherwise it is determined that the initialization type adopted by the signal is slow initialization. If it is determined that the initialization type adopted by the signal is fast initialization, the sampling is stopped, and 25 ms low level and 25 ms high level are sent to the vehicle. Subsequently, the cloud platform forwards the communication start request data, and then forwards the communication response request data, to establish the current communication between the diagnostic instrument and the module in the vehicle, thereby performing diagnosis. If it is determined that the initialization type adopted by the signal is slow initialization, on the one hand, the sampling of the signal is continued until the address data is sampled; on the other hand, the signal is buffered until the low level width after the falling edge of the signal reaches 100 ms, and then the low level with a width of 20 ms is sent to the vehicle. The sampling result of each time is sent to the vehicle according to the sampling period until the address data is sent, wherein the buffering of the signal is updated with the sampling. Subsequently, the cloud platform forwards 0x55, KW1, KW2, then forwards the inverted KW2, and finally forwards the inverted ADDR, to establish the current communication between the diagnostic instrument and the module in the vehicle, thereby performing diagnosis. It can be seen that the example can realize remote diagnosis of the vehicle using K-line protocol communication.
[0068] In addition, the cloud platform 300 is provided in the embodiment of the present application, which is used to perform the method of the present application. Figure 9As shown, it may include a processor 301 and a memory 302. Exemplarily, the processor 301 and the memory 302 may be connected via a bus 303, such as an I2C (Inter-integrated Circuit) bus.
[0069] Specifically, the processor 301 is used to provide computing and control capabilities. The processor 301 may be a central processing unit (CPU). The processor 301 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0070] Specifically, the memory 302 may be a Flash chip, a read-only memory (ROM), a magnetic disk, an optical disk, a USB flash drive, or a mobile hard disk.
[0071] Those skilled in the art will understand that Figure 9 The structure shown in the figure is only a block diagram of a part of the structure related to the embodiment of the present application, and does not constitute a limitation on the terminal device to which the embodiment of the present application is applied. Specifically, the terminal device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0072] The processor 301 is configured to run the computer program stored in the memory 302 and implement the method described in the above embodiment when executing the computer program.
[0073] In addition, an embodiment of the present application also provides a storage medium for computer-readable storage, on which one or more computer programs are stored, and the one or more computer programs can be executed by one or more processors to implement the steps of the method provided in the embodiment of the present application.
[0074] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer readable storage medium. When the computer program is executed, it can include the processes in the above-mentioned embodiment methods. In the embodiments provided in the present application, any reference to memory, storage, database or other medium can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0075] It should be understood that the description such as "first", "second" and the like in the embodiments of the present application is only for the purpose of description and should not be understood as indicating or implying the relative importance of the technical features or implicitly indicating the number of the technical features. Therefore, the features defined as "first", "second" can explicitly or implicitly include at least one of the features. In addition, the technical solutions of various embodiments can be combined with each other, but it must be based on the realization of ordinary skilled in the art, when the combination of technical solutions appears contradictory or unachievable, it should be considered that the combination of technical solutions does not exist, nor within the scope of protection claimed in the present application.
[0076] The above is only the preferred embodiment of the present application, and does not limit the patent scope of the present application, and any equivalent structure or equivalent process transformation using the content of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. An automobile diagnosing method characterized by comprising: The method is applied to a cloud platform connected with a diagnostic instrument and a vehicle respectively, and comprises the following steps: receiving a signal sent by the diagnostic instrument; sampling the signal according to a preset sampling period when a falling edge of the signal appears and a low level width after the falling edge reaches a first preset threshold; determining an initialization type of the signal; if it is determined that the initialization type of the signal is fast initialization, stopping sampling of the signal, sending preset wake-up data to the vehicle, and establishing communication between the diagnostic instrument and the vehicle; if it is determined that the initialization type of the signal is slow initialization, continuing to sample the signal until address data in the signal is sampled, sending a low level with the first preset threshold width to the vehicle, and sending each sampling result to the vehicle according to the sampling period until the address data is sent, and then establishing communication between the diagnostic instrument and the vehicle.
2. The method of claim 1, wherein, The determination of the initialization type of the signal comprises: determining whether a rising edge appears when the low level width after the falling edge of the signal reaches a second preset threshold; the second preset threshold is greater than the first preset threshold; if the rising edge appears, it is determined that the initialization type of the signal is fast initialization, otherwise, it is determined that the initialization type of the signal is slow initialization.
3. The method of claim 1, wherein, The sending of the low level with the first preset threshold width to the vehicle and the sending of each sampling result to the vehicle according to the sampling period comprise: caching the signal until the low level width after the falling edge of the signal reaches a third preset threshold, sending a low level with the first preset threshold width to the vehicle, and sending each sampling result to the vehicle according to the sampling period; the caching of the signal is updated with sampling.
4. The method of claim 3, wherein, The third preset threshold is 100 milliseconds.
5. The method according to any one of claims 1 to 4, characterized in that, The value of the sampling period is set according to a baud rate used by the address data, so that each sampling result contains only one logic level; and the first preset threshold is greater than the sampling period and in a multiple relationship.
6. The method of claim 5, wherein, The sampling period is 5 milliseconds, and / or the first preset threshold is 20 milliseconds.
7. The method according to any one of claims 1 to 4, characterized in that, When the initialization type of the signal is fast initialization, the establishment of the communication between the diagnostic instrument and the vehicle comprises: receiving communication start request data sent by the diagnostic instrument, and sending the communication start request data to the vehicle; receiving communication response request data sent by the vehicle in response to the communication start request data, and sending the communication response request data to the diagnostic instrument to establish the communication between the diagnostic instrument and the vehicle.
8. The method according to any one of claims 1 to 4, characterized in that, When the initialization type of the signal is slow initialization, the establishment of the communication between the diagnostic instrument and the vehicle comprises: receiving 0x55, KW1 and KW2 sent by the vehicle, and sending the 0x55, the KW1 and the KW2 to the diagnostic instrument; receiving a complemented KW2 sent by the diagnostic tool in response to the 0x55, the KW1 and the KW2, and sending the complemented KW2 to the vehicle; receiving a complemented ADDR sent by the vehicle in response to the complemented KW2, and sending the complemented ADDR to the diagnostic tool to establish communication between the diagnostic tool and the vehicle; ADDR is obtained by the vehicle according to the address data.
9. A cloud platform, characterized by comprise: a memory, the memory storing a computer program; a processor, the processor implementing the method of any one of claims 1 to 8 when executing the computer program.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, the computer program, when executed by the processor, implements the method of any one of claims 1 to 8. the computer program, when executed by the processor, implements the method of any one of claims 1 to 8.
Citation Information
Patent Citations
Vehicle remote diagnosis method, equipment connector and vehicle connector
CN111552268A
Hand -held type car diagnostic equipment
CN208351322U