CN116684449A - Automobile diagnosis method, cloud platform and storage medium - Google Patents

Automobile diagnosis method, cloud platform and storage medium Download PDF

Info

Publication number
CN116684449A
CN116684449A CN202310772835.8A CN202310772835A CN116684449A CN 116684449 A CN116684449 A CN 116684449A CN 202310772835 A CN202310772835 A CN 202310772835A CN 116684449 A CN116684449 A CN 116684449A
Authority
CN
China
Prior art keywords
automobile
signal
initialization
sampling
preset threshold
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310772835.8A
Other languages
Chinese (zh)
Inventor
请求不公布姓名
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Xhorse Electronics Co Ltd
Original Assignee
Shenzhen Xhorse Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Xhorse Electronics Co Ltd filed Critical Shenzhen Xhorse Electronics Co Ltd
Priority to CN202310772835.8A priority Critical patent/CN116684449A/en
Publication of CN116684449A publication Critical patent/CN116684449A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B23/00Testing or monitoring of control systems or parts thereof
    • G05B23/02Electric testing or monitoring
    • G05B23/0205Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults
    • G05B23/0208Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults characterized by the configuration of the monitoring system
    • G05B23/0213Modular or universal configuration of the monitoring system, e.g. monitoring system having modules that may be combined to build monitoring program; monitoring system that can be applied to legacy systems; adaptable monitoring system; using different communication protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Small-Scale Networks (AREA)

Abstract

The application provides an automobile diagnosis method, a cloud platform and a storage medium, wherein the method comprises the following steps: receiving a signal sent by a diagnostic instrument; when a signal has a falling edge and the low level width after the falling edge reaches a first preset threshold value, sampling the signal according to a preset sampling period; determining an initialization type adopted by the signal; if the initialization type adopted by the signal is determined to be rapid initialization, stopping sampling the signal, sending wake-up data to the automobile, and further establishing communication between the diagnostic instrument and the automobile; if the initialization type adopted by the signal is determined to be slow initialization, continuing to sample the signal until the address data is sampled, transmitting a low level with the width being a first preset threshold value to the automobile, transmitting a sampling result of each time to the automobile according to a sampling period until the address data is transmitted, and further establishing communication between the diagnostic instrument and the automobile. From this, the application can realize the remote diagnosis of the automobile which uses the K line protocol for communication.

Description

Automobile diagnosis method, cloud platform and storage medium
Technical Field
The application relates to the technical field of automobile diagnosis, in particular to an automobile diagnosis method, a cloud platform and a storage medium.
Background
Automobile diagnostics refers to determining the technical condition of an automobile without disassembly (or with only individual parts removed), for example diagnosing the technical condition of an automobile chassis, steering wheel, dashboard, engine, etc.
As shown in fig. 1, in the prior art, the diagnostic apparatus may be connected to the automobile through a cable to perform diagnosis, for example, the diagnostic apparatus may be connected to an OBD (On-Board Diagnostics, on-board self-diagnostic system) interface led out from the automobile. However, there are limitations in this way, for example, there are few diagnostic apparatuses available on the market that can support new cars, in which case the use of the factory diagnostic apparatus is generally required, but the users who own the factory diagnostic apparatus are limited, and thus there are limitations.
For this reason, a remote diagnosis technique has emerged in the related art to solve the limitations described above. The inventors found that: remote diagnosis technology is generally directed to automobiles that use CAN protocols for communication because the baud rate of the CAN protocols is relatively high, for example, above 33.3K, and therefore, when performing remote diagnosis at this relatively high baud rate, the data delay is not too large, and the protocol specifications CAN be basically satisfied. However, some automobiles still use the K-wire protocol for communication, and some of the current remote diagnostic techniques do not support automobiles that use the K-wire protocol for communication.
Disclosure of Invention
Based on the method, the cloud platform and the storage medium, the application provides an automobile diagnosis method, the cloud platform and the storage medium, and remote diagnosis of an automobile using a K line protocol for communication is realized.
In a first aspect, the application provides an automobile diagnosis method, which is applied to a cloud platform, wherein the cloud platform is respectively connected with a diagnosis instrument and an automobile; the method comprises the following steps:
receiving signals sent by the diagnostic instrument;
sampling the signal according to a preset sampling period when the signal has a falling edge and the low level width after the falling edge reaches a first preset threshold value;
determining an initialization type adopted by the signal;
if the initialization type adopted by the signal is determined to be rapid initialization, stopping sampling the signal, and sending preset wake-up data to the automobile, so as to establish communication between the diagnostic instrument and the automobile;
if the initialization type adopted by the signal is determined to be slow initialization, continuing to sample the signal until the address data in the signal is completely sampled; and transmitting the low level with the width being the first preset threshold value to the automobile, and transmitting the sampling result of each time to the automobile according to the sampling period until the address data are transmitted, so as to establish the communication between the diagnostic instrument and the automobile.
In a second aspect, the present application provides a cloud platform, including: a memory storing a computer program; a processor, which when executing the computer program implements the method according to the first aspect.
In a third aspect, the present application provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method as described in the first aspect.
Based on the technical scheme, the application can realize the establishment of communication between the diagnostic instrument and the automobile based on the K-wire protocol under the remote diagnosis scene, and then diagnosis is carried out. That is, remote diagnosis of an automobile communicating using a K-wire protocol is achieved.
Drawings
FIG. 1 is a prior art application scenario for automotive diagnostics;
FIG. 2 is an exemplary application scenario diagram of an embodiment of the present application;
FIG. 3 is an exemplary flow chart for K-wire protocol with fast initialization;
FIG. 4 is an exemplary flow chart for a K-wire protocol employing slow initialization;
FIG. 5 is a schematic flow chart of an automobile diagnosis method according to an embodiment of the present application;
FIG. 6 is an exemplary timing diagram for sampling a signal in an embodiment of the present application;
FIG. 7 is an exemplary timing diagram of the present application for affecting data accuracy when data latency is high;
FIG. 8 is an exemplary timing diagram for providing buffered data to ensure data accuracy in an embodiment of the present application;
fig. 9 is a schematic structural diagram of a cloud platform according to an embodiment of the present application.
Description of the embodiments
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all embodiments of the application, and it is to be understood that the specific embodiments described herein are for illustration only and are not intended to limit the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without any inventive effort, are intended to be within the scope of the application.
The automobile diagnosis method provided by the embodiment of the application can be applied to a scene shown in fig. 2 in an exemplary manner. In this scenario, the cloud platform is connected to the diagnostic instrument, the car, respectively, i.e. a cross-domain connection between the diagnostic instrument and the car may be achieved by the cloud platform, which may be a server, a repeater, etc. Based on the method, the cloud platform can realize remote diagnosis of the automobile communicating by using the K line protocol by executing the method provided by the embodiment of the application. It should be noted that, an automobile that uses a K-wire protocol for communication refers to that some modules in the automobile use the K-wire protocol for communication, such as a steering wheel module, an instrument panel module, and so on. It will be appreciated that the diagnostic device, when diagnosing such a module, establishes communication with such a module via the K-wire protocol, and then performs the diagnosis. Of course, modules using other communication protocols may also be present in the car, such as engines using the CAN protocol, etc.
The K-wire protocol will be described by way of example. If the host and the slave use the K line protocol to establish communication, the communication needs to be initialized to establish the communication. There are generally two types of initialization for the K-wire protocol: fast initialization and slow initialization.
As shown in fig. 3, if the fast initialization is adopted, first, the master transmits a low level of 25 milliseconds (ms) and a high level of 25ms to the slave in sequence, after which the data transmission between the master and the slave is based on a certain fixed baud rate, for example, 10400bps baud rate (bps). It should be noted that the 25ms low level and the 25ms high level are only examples, and the width of the low level and the width of the high level may be other reasonable values in practical applications; it should be further noted that the embodiment of the present application refers to the data having a low level of 25ms and a high level of 25ms in sequence as wake-up data. The master then sends communication initiation request data (5 bytes, which may also be referred to as system entry data) to the slave. Finally, the slave returns communication initiation response data (7 bytes) to the master. Thus, the communication between the host and the slave is established, so that data transmission can be carried out between the host and the slave.
Slow initialization typically includes 5 baud rate initialization and 200 baud rate initialization, illustrated by way of example with 5 baud rate initialization. As shown in fig. 4, first, the master transmits an address byte of 5bps, which consists of a start bit, 8 address bits, and a stop bit, to the slave. Wherein, the initial bit is 1bit and is low level; 8 address bits are 8 bits; the stop bit is 1bit and is high. And each bit in the 5bps address byte has a duration of 200ms. Then, the slave returns 0x55 and KW1 and KW2 carrying the baud rate information, and the baud rate at this stage is the baud rate carried by 0x55 (usually 9600bps or 10400 bps). Then, the master determines the baud rate from 0×55, and transmits the inverted KW2 (denoted as "KW 2") to the slave at the baud rate. Finally, the slave sends the inverted ADDR (denoted as ADDR) to the host. Thus, the communication between the host and the slave is established, so that data transmission can be carried out between the host and the slave.
The automobile diagnosis method according to the embodiment of the present application, as shown in fig. 5, may include steps S10 to S50.
S10, receiving signals sent by a diagnostic instrument.
And S20, when the signal has a falling edge and the low level width after the falling edge reaches a first preset threshold value, sampling the signal according to a preset sampling period.
It should be noted that the idle level in the K-wire protocol is high, so it can be known from the foregoing description of two kinds of initialization, and in the process of receiving the signal sent by the diagnostic apparatus, when the signal has a falling edge, it indicates that the diagnostic apparatus may send data related to the initialization. Illustratively, the cloud platform may detect a level change on the K bus, and perform subsequent steps when a level is detected from high to low.
Therefore, when a falling edge occurs in the signal, it is also necessary to confirm whether or not the signal is associated with the initialization, and therefore, it is also necessary to determine whether or not the low level width after the occurrence of the falling edge can reach the first preset threshold, that is, whether or not the duration of the low level can reach the first preset threshold after the occurrence of the falling. Specifically, if the diagnostic apparatus and some modules in the automobile complete initialization to establish communication, the baud rate (bps) which is usually adopted in the subsequent data transmission is 9600, 10400, etc., so that the value of the first preset threshold may be reasonably set according to the situation, so that the situation may be eliminated when the low level width after the falling edge reaches the value.
That is, when the low level width after the occurrence of the falling edge reaches the first preset threshold, it may be determined that the signal is related to the initialization, and the signal may be sampled according to a predetermined sampling period.
S30, determining an initialization type adopted by the signal.
That is, it is determined whether the type of initialization employed by the signal is fast initialization or slow initialization.
And S40, if the initialization type adopted by the signal is determined to be rapid initialization, stopping sampling the signal, and sending preset wake-up data to the automobile so as to establish communication between the diagnostic instrument and the automobile.
The definition of the wake-up data is as described above, and in the embodiment of the present application, the specific setting of the wake-up data may be determined by the automobile itself. For example, when the wake-up data is set according to the configuration data of the automobile, for example, assuming that the low level width and the low level width in the wake-up data are both 25ms in the configuration data, when the initialization type adopted by the determination signal is fast initialization, the cloud platform may directly send the low level of 25ms to the automobile line, and then send the high level of 25ms. And when the cloud platform determines that the initialization type adopted by the signal is quick initialization, the cloud platform can also stop sampling the signal, so that the resources occupied by the sampling can be released, and the energy consumption is reduced. 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 that the present communication between the diagnostic apparatus and the automobile (the module for communicating by using the K-wire protocol) is established, and the purpose of remote diagnosis is realized.
In the related art, if the diagnostic apparatus and the automobile establish the communication like the CAN protocol, the cloud platform generally receives the wake-up data sent by the diagnostic apparatus and then sends the wake-up data to the automobile. Taking the wake-up data as a low level of 25ms and a high level of 25ms as an example, the data delay in this case would reach 50ms, and the total data delay would be greater than 50ms considering the problem of network delay. However, in the embodiment of the application, as long as the cloud platform determines that the adopted initialization type is quick initialization, the cloud platform directly initializes according to the preset configuration to directly send wake-up data to the automobile, so that high-level sampling waiting time can be saved, and the delay of the data is greatly reduced.
Therefore, the embodiment of the application can realize the rapid initialization establishment of communication between the diagnostic instrument and the automobile based on the K-wire protocol under the remote diagnosis scene, and then diagnosis is carried out.
S50, if the initialization type adopted by the signal is determined to be slow initialization, continuing to sample the signal until the address data in the signal is completely sampled; and transmitting the low level with the width of the first preset threshold value to the automobile, and transmitting the sampling result of each time to the automobile according to the sampling period until the address data are transmitted, so as to establish the communication between the diagnostic instrument and the automobile.
As described above, if the signal is initialized at a slow speed, the diagnostic apparatus sends address data at this time, and the address of each module in the vehicle is different, so when it is determined that the signal is initialized at a slow speed, the signal still needs to be sampled until the address data is sampled. As described above, after the diagnostic apparatus has sent the address data, it is necessary to wait for the vehicle to return the relevant data, so that the sampling of the signal can be stopped at this time, so as to release the resources occupied by the sampling and reduce the energy consumption. After each sampling, the low level of the first preset threshold value and the sampling result of each time may be analyzed to determine whether complete address information can be obtained, if so, it is determined that the address data is sampled, otherwise, the sampling is continued.
And when the slow initialization is determined, the cloud platform can send the low level with the width of the first preset threshold value before starting sampling to the automobile, and send each sampling result after starting sampling to the automobile according to the sampling period. It can be understood that the complete address data can be sent to the automobile, and then the cloud platform can forward 0x55, KW1, KW2 and the inverted KW2 and ADDR, so that the present communication between the diagnostic apparatus and the automobile (the module for communicating by using the K line protocol) is established, and the purpose of remote diagnosis is realized.
In the related art, if the diagnostic apparatus and the automobile establish the communication like the CAN protocol, the cloud platform generally receives the address data sent by the diagnostic apparatus and then sends the address data to the automobile. For the illustration of the initialization with 5 baud rate, the address data has 10 bits in total, each bit is 200ms, so the cloud platform needs 2s after receiving the address data, and the delay specified by the K line protocol is completely not satisfied (the delay between the protocol specified address data and 0x55 needs to be ensured to be within 20-300 ms). However, in the embodiment of the application, the cloud platform can send the low level before starting sampling and the sampling result after starting sampling to the automobile until the address data is sent as long as the adopted initialization type is determined to be slow initialization.
Therefore, the embodiment of the application can realize the establishment of communication between the diagnostic instrument and the automobile based on the slow initialization of the K-wire protocol under the remote diagnosis scene, and then diagnosis is carried out.
Therefore, based on the technical scheme, the embodiment of the application can realize that communication between the diagnostic instrument and the automobile based on the K-wire protocol under the remote diagnosis scene is established, and then diagnosis is carried out. That is, remote diagnosis of an automobile communicating using a K-wire protocol is achieved.
In an embodiment, step S30 may include sub-step S310 and sub-step S320.
S310, determining whether a rising edge occurs when the low level width of the signal after the falling edge reaches a second preset threshold value. Wherein the second preset threshold is greater than the first preset threshold.
S320, if the rising edge occurs, determining that the initialization type adopted by the signal is fast initialization, otherwise determining that the initialization type adopted by the signal is slow initialization.
The specific setting of the second preset threshold may be determined by the vehicle itself. By way of example, the wake-up data is set according to the configuration data of the automobile, and for example, assuming that the low level width in the wake-up data is specified to be 25ms in the configuration data, the second preset threshold may be set to be 25ms.
As described above, if the signal is rapidly initialized, when the low level width of the signal after the falling edge reaches the second preset threshold, the diagnostic apparatus will send a high level, and then a rising edge will occur at this time. If the signal is initialized at a low speed, the diagnostic instrument continues to send a low level when the low level width of the signal after the falling edge reaches a second preset threshold value. Thus, the type of initialization can be determined therefrom.
In one embodiment, establishing communication of the diagnostic instrument with the vehicle in step S40 may include sub-step S410 and sub-step S420.
S410, receiving communication start request data sent by the diagnostic instrument and sending the communication start request data to the automobile.
S420, receiving communication response request data sent by the automobile in response to the communication start request data, and sending the communication response request data to the diagnostic instrument so as to establish communication between the diagnostic instrument and the automobile.
As can be seen from the foregoing discussion, the diagnostic apparatus transmits the communication start data after transmitting the wake-up data, so that the cloud platform can forward the wake-up data to the vehicle after receiving the wake-up data. The vehicle will then return communication response request data, and likewise, the cloud platform may be forwarded to the diagnostic apparatus after receipt. Thus, the communication between the diagnostic instrument and the automobile can be established.
In one embodiment, establishing communication between the diagnostic device and the vehicle in step S50 may include sub-steps S510 through S530.
S510, receiving 0x55, KW1 and KW2 sent by the automobile, and sending the 0x55, KW1 and KW2 to a diagnostic instrument.
S520, receiving the inverted KW2 sent by the diagnostic apparatus in response to 0x55, KW1 and KW2, and sending the inverted KW2 to the automobile.
S530, receiving the inverted ADDR sent by the automobile in response to the inverted KW2 and sending the inverted ADDR to the diagnostic apparatus to establish communication between the diagnostic apparatus and the automobile.
As can be seen from the foregoing discussion, the diagnostic apparatus returns 0x55, KW1 and KW2 after the address data is transmitted, so the cloud platform can forward the address data to the diagnostic apparatus after it is received. The diagnostic device then transmits the inverted KW2 after receipt, so that the cloud platform can be forwarded to the vehicle after receipt. Finally, the vehicle returns the inverted ADDR after receiving, so the cloud platform can forward the ADDR to the diagnostic apparatus after receiving, wherein the ADDR is obtained by the vehicle according to the address data. Thus, the communication between the diagnostic instrument and the automobile can be established.
In one embodiment, the magnitude of the sampling period is set according to the baud rate used for the address data, such that each sampling result contains only one logic level. Meanwhile, the first preset threshold value is larger than the sampling period and the first preset threshold value and the sampling period are in a multiple relation. Specifically, in order to realize accurate sampling of signals, the embodiment of the application sets the sampling period according to slow initialization, namely, sets the sampling period according to the baud rate used by the address data. Meanwhile, the first preset threshold is larger than the sampling period and the first preset threshold and the sampling period are in a multiple relationship, for example, the first preset threshold is four times of the sampling period. Based on this, the set sampling period may enable each sampling result to contain only one logic level, for example, only a high level or only a low level, and compared with a case where one sampling may have both a high level and a low level, the embodiment of the present application can realize accurate sampling. In an embodiment, the sampling period may be 5 milliseconds and/or the first preset threshold may be 20 milliseconds; of course, in other embodiments, the sampling period and the first preset threshold may be other values, so long as each sampling result only contains one logic level.
For example, the baud rate used by the address data may be known from the configuration data of the automobile, and assuming that the baud rate used by the address data is 5 (the duration of each bit in the address data is 200 ms) according to the configuration data, the sampling period may be set to be 5ms, and the first preset threshold may be set to be 20ms. Based on this, as shown in fig. 6, the signal has a falling edge and the low level width after the falling edge can reach 20ms, sampling starts at 20ms, and sampling is performed every 5ms. Then, if it is determined that the type of initialization employed by the signal is slow initialization, that is, address data is transmitted by the diagnostic apparatus at this time, sampling is continued. As can be appreciated from the foregoing, the start bit in the address data is currently sampled low for 200ms, assuming that the first address bit following the start bit is high. Then, as the sampling proceeds, the last sampling of the start bit is just the time when the sampling reaches 200ms, and the logic level of this sampling is low; the next sample is the first address bit, and the logic level of this sample is high (the subsequent samples are similar and do not show the complete sampling process). It can be seen that the setting of the sampling period and the first preset threshold in this example does not involve the case of including both a high level and a low level in one sampling, so that the purpose of accurate acquisition can be achieved.
In an embodiment, the step S50 of sending the low level with the width of the first preset threshold to the automobile and sending the sampling result of each time to the automobile according to the sampling period may include: and buffering the signal until the low level width of the signal reaches a third preset threshold value after the falling edge occurs, transmitting the low level with the width being the first preset threshold value to the automobile, and transmitting the sampling result of each time to the automobile according to the sampling period. Wherein the buffering of the signal is updated as the sampling proceeds.
When the cloud platform determines that the initialization type adopted by the signal is slow initialization, on one hand, sampling needs to be continued, and on the other hand, address data needs to be forwarded. However, when a relatively large delay occurs in the network, the data sent by the receiving diagnostic apparatus is delayed, and the sampling of the data is affected at this time, so that the sampling is delayed. In this case, the cloud platform may send data to the automobile according to the sampling period, that is, whether there is a network delay or not, according to the sampling period, the sent data may not be real data due to the sampling delay, which affects accuracy. As illustrated in fig. 7, assuming that sampling is started at 20ms and it is determined that the adopted initialization type is slow initialization at 25ms, the cloud platform transmits a low level of 20ms to the automobile at 25ms and then transmits a sampling result of each time to the automobile according to a sampling period. Assuming that a larger network delay (for example, more than 20 ms) occurs at 120ms, the sampling is affected at this time, when the cloud platform sends each sampling result to 140ms, the cloud platform can send unreal data to the automobile because of no corresponding sampling result at this time, and the accuracy of the data is further affected.
Therefore, the embodiment of the application sets the data cache, thereby ensuring that the accuracy of the data is not influenced by network delay. Specifically, when the initialization type adopted by the signal is determined to be slow initialization, buffering is first performed until the low level width of the signal after the falling edge occurs reaches a third preset threshold, and in an embodiment, the third preset threshold may be 100ms, that is, a data buffer of 100ms is set. It should be noted that the signal buffer is updated as the sampling proceeds. In this way, when the moment corresponding to the third preset threshold value, the cloud platform sends the low level with the width being the first preset threshold value to the automobile, and sends the sampling result of each time to the automobile according to the sampling period. In the above example, as shown in fig. 8, the cloud platform caches 100ms of data, and after transmitting a low level of 20ms to the car at 100ms, the sampling result of each time is transmitted to the car according to the sampling period. Thus, even if a large network delay occurs at 120ms, the cloud platform sends real data to the automobile after 140ms due to the existence of 100ms data cache, so that the data accuracy is ensured. It will be appreciated that as network latency improves, the cache will update as the sampling proceeds.
In addition, the signal is buffered until the low level width of the signal reaches a third preset threshold after the falling edge occurs, and the signal can be further used for determining that the initialization type adopted by the signal is slow initialization, so that the reliability is improved. For example, the third preset threshold may be 100ms, and since the start bit of the slow initialization is at a low level and the duration is greater than 100ms, the type of initialization used may be further determined to be slow initialization at 100ms according to whether the caches are all at a low level.
In summary, it is assumed that the module communicating using the K-wire protocol is known from the configuration data of the automobile, the wake-up data is a low level of 25ms and a high level of 25ms, and the address data is a 5-baud rate. The cloud platform may perform the exemplary methods described below when diagnosing these modules. In the present example method, the sampling period may be set to 5ms, the first preset threshold may be set to 20ms, the second preset threshold may be set to 25ms, and the third preset threshold may be set to 100ms. Based on the detection, the cloud platform receives the signal sent by the diagnostic instrument, and when the signal has a falling edge and the low level width after the falling edge reaches 20ms, the signal starts to be sampled according to a sampling period of 5ms. Then, determining whether a rising edge occurs when the low level width of the signal after the falling edge reaches 25ms, if the rising edge occurs, determining that the initialization type adopted by the signal is quick initialization, otherwise, determining that the initialization type adopted by the signal is slow initialization. If the initialization type adopted by the signal is determined to be rapid initialization, stopping sampling, sending a low level of 25ms and a high level of 25ms to the automobile, then forwarding communication starting request data by the cloud platform, and forwarding communication response request data to establish the current communication between the diagnostic instrument and the module in the automobile, so as to perform diagnosis. If the initialization type adopted by the signal is determined to be slow initialization, on one hand, continuing to sample the signal until the address data is sampled; on the other hand, when the low level width of the signal reaches 100ms after the falling edge occurs, the signal is buffered, after the low level with the width of 20ms is sent to the automobile, the sampling result is sent to the automobile according to the sampling period every time until the address data is sent, wherein the buffer memory of the signal is updated along with the sampling. Then, the cloud platform forwards 0x55, KW1 and KW2, forwards the inverted KW2, and finally forwards the inverted ADDR to establish the current communication between the diagnostic instrument and the module in the automobile, so that diagnosis is carried out. From this, the present example can enable remote diagnostics of automobiles that communicate using the K-wire protocol.
In addition, the embodiment of the present application further provides a cloud platform 300, as shown in fig. 9, which may include a processor 301 and a memory 302. The processor 301 and the memory 302 may be connected by a bus 303, such as an I2C (Inter-integrated Circuit) bus, for example.
In particular, the processor 301 is configured to provide computing and control capabilities, the processor 301 may be a central processing unit (Central Processing Unit, CPU), the processor 301 may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. Wherein the general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Specifically, the Memory 302 may be a Flash chip, a Read-Only Memory (ROM), a magnetic disk, an optical disk, a U-disk, a removable hard disk, or the like.
It will be appreciated by those skilled in the art that the structure shown in fig. 9 is merely a block diagram of a portion of the structure related to the embodiment of the present application, and does not constitute a limitation of the terminal device to which the embodiment of the present application is applied, and in particular, the terminal device may include more or less components than those shown in the drawings, or may combine some components, or have a different arrangement of components.
Wherein the processor 301 is arranged to run a computer program stored in the memory 302 and to implement the method as described in the above embodiments when the computer program is executed.
In addition, the embodiment of the present application further provides a storage medium, which is used for computer readable storage, and one or more computer programs are stored on the storage medium, and the one or more computer programs can be executed by one or more processors, so as to implement the steps of the method provided by the embodiment of the present application.
Those skilled in the art will appreciate that implementing all or part of the above described methods in accordance with the embodiments may be accomplished by way of a computer program stored in a non-transitory computer readable storage medium, which when executed may comprise the steps of the above described embodiments of the methods. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, or the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like.
It should be appreciated that the description as relating to "first", "second", etc. in embodiments of the present application is for descriptive purposes only and is not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In addition, the technical solutions of the embodiments may be combined with each other, but it is necessary to base that the technical solutions can be realized by those skilled in the art, and when the technical solutions are contradictory or cannot be realized, the combination of the technical solutions should be considered to be absent and not within the scope of protection claimed in the present application.
The foregoing description is only of the preferred embodiments of the present application and is not intended to limit the scope of the application, and all equivalent structures or equivalent processes using the descriptions and drawings of the present application or directly or indirectly applied to other related technical fields are included in the scope of the application.

Claims (10)

1. The automobile diagnosis method is characterized by being applied to a cloud platform, wherein the cloud platform is respectively connected with a diagnostic instrument and an automobile; the method comprises the following steps:
receiving signals sent by the diagnostic instrument;
sampling the signal according to a preset sampling period when the signal has a falling edge and the low level width after the falling edge reaches a first preset threshold value;
determining an initialization type adopted by the signal;
if the initialization type adopted by the signal is determined to be rapid initialization, stopping sampling the signal, and sending preset wake-up data to the automobile, so as to establish communication between the diagnostic instrument and the automobile;
if the initialization type adopted by the signal is determined to be slow initialization, continuing to sample the signal until the address data in the signal is completely sampled; and transmitting the low level with the width being the first preset threshold value to the automobile, and transmitting the sampling result of each time to the automobile according to the sampling period until the address data are transmitted, so as to establish the communication between the diagnostic instrument and the automobile.
2. The method of claim 1, wherein the determining the type of initialization employed by the signal comprises:
determining whether a rising edge occurs when the low level width of the signal after the occurrence of the falling edge reaches a second preset threshold value; the second preset threshold value is larger than the first preset threshold value;
if the rising edge occurs, determining that the initialization type adopted by the signal is fast initialization, otherwise, determining that the initialization type adopted by the signal is slow initialization.
3. The method of claim 1, wherein the transmitting the low level having the width of the first preset threshold to the car and transmitting each sampling result to the car according to the sampling period comprises:
caching the signal until the low level width of the signal after the falling edge reaches a third preset threshold value, transmitting the low level with the width being the first preset threshold value to the automobile, and transmitting each sampling result to the automobile according to the sampling period; the buffering of the signal is updated as the sampling proceeds.
4. A method according to claim 3, wherein the third preset threshold is 100 milliseconds.
5. The method according to any of claims 1-4, wherein the magnitude of the sampling period is set according to the baud rate used by the address data such that each sampling result contains only one logic level; and the first preset threshold value is larger than the sampling period and the first preset threshold value and the sampling period are in a multiple relation.
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 of any one of claims 1-4, wherein said establishing communication between said diagnostic device and said vehicle when said type of initialization employed by said signal is a rapid initialization comprises:
receiving communication starting request data sent by the diagnostic instrument and sending the communication starting request data to the automobile;
and receiving communication response request data sent by the automobile in response to the communication starting request data, and sending the communication response request data to the diagnostic instrument so as to establish communication between the diagnostic instrument and the automobile.
8. The method of any one of claims 1-4, wherein said establishing communication between said diagnostic device and said vehicle when said signal employs a slow initialization type, comprises:
receiving 0x55, KW1 and KW2 sent by the automobile, and sending the 0x55, the KW1 and the KW2 to the diagnostic instrument;
receiving an inverted KW2 transmitted by the diagnostic apparatus in response to the 0x55, the KW1, and the KW2, and transmitting the inverted KW2 to the automobile;
receiving an inverted ADDR transmitted by the vehicle in response to the inverted KW2 and transmitting the inverted ADDR to the diagnostic apparatus to establish communication between the diagnostic apparatus and the vehicle; ADDR is the result of the vehicle based on the address data.
9. A cloud platform, comprising:
a memory storing a computer program;
a processor implementing the method according to any of claims 1 to 8 when executing the computer program.
10. A computer readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, implements the method according to any one of claims 1 to 8.
CN202310772835.8A 2023-06-27 2023-06-27 Automobile diagnosis method, cloud platform and storage medium Pending CN116684449A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310772835.8A CN116684449A (en) 2023-06-27 2023-06-27 Automobile diagnosis method, cloud platform and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310772835.8A CN116684449A (en) 2023-06-27 2023-06-27 Automobile diagnosis method, cloud platform and storage medium

Publications (1)

Publication Number Publication Date
CN116684449A true CN116684449A (en) 2023-09-01

Family

ID=87779146

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310772835.8A Pending CN116684449A (en) 2023-06-27 2023-06-27 Automobile diagnosis method, cloud platform and storage medium

Country Status (1)

Country Link
CN (1) CN116684449A (en)

Similar Documents

Publication Publication Date Title
US8798843B2 (en) Vehicle diagnosing apparatus
WO2018018761A1 (en) Vehicle-mounted gateway controller based information processing method and gateway controller
US11282308B2 (en) Vehicle diagnostic communication apparatus, system including the same and method thereof
US20190361711A1 (en) Method and apparatus for selective wake-up of communication node in vehicle network
JP3307215B2 (en) Failure diagnosis device for vehicle electronic control unit
US10153825B2 (en) Vehicle-mounted control device
US20190173952A1 (en) In-vehicle relay device, information processing device, relay device, information processing method, non-transitory storage medium storing program executable by relay device, information processing system, vehicle, and external device
CN111865742A (en) Vehicle and in-vehicle message transmission method
US9715767B2 (en) Method and apparatus for processing realtime vehicle operating data
US11288054B2 (en) Vehicular communication system
WO2023025212A1 (en) Flashing method, apparatus and system for electronic control unit, and device and storage medium
CN107846419B (en) Method and system for transmitting OBD data of vehicle engine
Kenjić et al. Connectivity challenges in automotive solutions
KR20200139059A (en) Controller diagnostic device and method thereof
CN113285973A (en) Data forwarding method, device, system, vehicle and storage medium
CN113315846A (en) Data transmission method and device
CN116684449A (en) Automobile diagnosis method, cloud platform and storage medium
EP2760178B1 (en) Method, apparatus and system for obtaining object
US12003345B2 (en) In-vehicle network system
CN115994057A (en) Chip bus detection method and device, electronic equipment and storage medium
US20230105426A1 (en) In-vehicle information processing apparatus, information processing method, and client program
US20230107783A1 (en) In-vehicle information processing apparatus, information processing method, and server program
KR20220063554A (en) System for servicing emergency call of vehicle and method thereof
CN110677466A (en) Application program downloading method, device, gateway and storage medium
JP2007049297A (en) Communication system and control method thereof

Legal Events

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