Data transmission method, device, equipment, medium and product

By analyzing the vehicle diagnostic function and dynamically selecting TCP or UDP mode for data transmission, the problem of low vehicle diagnostic data transmission efficiency in the prior art is solved, and more efficient data transmission is achieved.

CN119690037APending Publication Date: 2025-03-25LAUNCH TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411764143.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-03
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

When using Ethernet for vehicle diagnosis, the prior art mainly relies on the TCP mode, resulting in the confirmation mechanism and retransmission mechanism affect the diagnostic efficiency in scenarios where diagnostic data is not high, resulting in low data transmission efficiency.

Method used

By analyzing the diagnostic functions selected by the user, it is dynamically decided to use TCP or UDP mode for data transmission. TCP mode is used for diagnostic functions with high data transmission reliability, and UDP mode is used for functions with low reliability to improve data transmission efficiency.

Benefits of technology

The data transmission mode is dynamically selected according to the actual diagnostic function, which improves the data transmission efficiency in vehicle diagnosis, and solves the problem of low data transmission efficiency in the prior art.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119690037A_ABST
    Figure CN119690037A_ABST
Patent Text Reader

Abstract

The invention discloses a data transmission method and device, equipment, a medium and a product, and relates to the technical field of data transmission, and the method comprises the steps: obtaining a data transmission mode through analyzing a diagnosis function selected by a user; and sending a data acquisition request to a vehicle controller based on the data transmission mode, performing data acquisition by the vehicle controller based on the data acquisition request to obtain an acquisition result, and sending the acquisition result to the diagnosis equipment through the data transmission mode. Therefore, the adopted data transmission mode is obtained by analyzing the diagnosis function required by the user, and the data acquisition request is sent to the vehicle controller based on the obtained data transmission mode, so that the vehicle controller performs corresponding data acquisition to obtain an acquisition result and then returns the acquisition result through the data transmission mode; the problem that efficient data transmission cannot be carried out according to the actual diagnosis function when the vehicle is diagnosed is solved, and the data transmission efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data transmission, and in particular to a data transmission method, apparatus, device, medium and product. Background Art

[0002] At present, in order to increase the speed of vehicle data transmission in vehicle diagnosis, the vehicle bus is switched to Ethernet with a transmission speed of 100M and 1000M. The commonly used communication methods based on Ethernet are Transmission Control Protocol (TCP) and User Datagram Protocol (UDP). Among them, TCP and UDP are transport layer protocols above the network layer, which are used to transmit data between different hosts in the network. However, they have significant differences in many aspects. These differences are mainly reflected in their design goals, data transmission reliability, connection methods and application scenarios.

[0003] The existing technology basically only uses the TCP mode when using Ethernet to diagnose vehicles. Although TCP provides reliable data transmission, its confirmation mechanism and retransmission mechanism will affect the diagnostic efficiency in some scenarios where the diagnostic data requirements are not high. UDP is a connectionless protocol that does not guarantee the reliability of data. If the data packet is lost or damaged during transmission, UDP will not perform any retransmission or error correction operations. Therefore, UDP's transmission speed is usually faster than TCP, but its reliability is lower.

[0004] Therefore, it can be known that the prior art has the problem of low efficiency when using Ethernet for data transmission.

[0005] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention

[0006] The main purpose of the present application is to provide a data transmission method, device, equipment, medium and product, aiming to solve the technical problem that efficient data transmission cannot be performed according to the actual diagnostic function when diagnosing a vehicle.

[0007] To achieve the above object, the present application proposes a data transmission method, which is applied to a diagnostic device and includes:

[0008] Analyze the diagnostic function selected by the user to obtain a data transmission mode;

[0009] A data collection request is sent to the vehicle controller based on the data transmission mode, and the vehicle controller performs data collection based on the data collection request to obtain a collection result, and sends the collection result to the diagnostic device through the data transmission mode.

[0010] In one embodiment, the data transmission mode includes a transmission control protocol TCP data transmission mode and a user datagram protocol UDP data transmission mode. Before the step of analyzing the diagnostic function selected by the user to obtain the data transmission mode, the method further includes:

[0011] A TCP data transmission channel is constructed based on the device serial number and TCP port number of the diagnostic device;

[0012] Sending the UDP port number of the diagnostic device to the vehicle controller, the vehicle controller recording the UDP port number, obtaining a recording result, and sending the recording result to the diagnostic device;

[0013] Obtaining a TCP data transmission mode according to the TCP data transmission channel, and obtaining a UDP data transmission mode according to the recording result;

[0014] The transmission mode of several diagnostic functions in the diagnostic device is set based on the TCP data transmission mode and the UDP data transmission mode.

[0015] In one embodiment, the step of constructing a TCP data transmission channel based on the device serial number and the TCP port number of the diagnostic device includes:

[0016] A synchronization packet is constructed based on the device serial number and TCP port number of the diagnostic device;

[0017] Sending the synchronization packet to the vehicle controller, the vehicle controller authenticates the synchronization packet to obtain a synchronization confirmation packet, and sending the synchronization confirmation packet to the diagnostic device;

[0018] Receive a synchronization confirmation packet sent by the vehicle controller, send a connection completion packet to the vehicle controller based on the synchronization confirmation packet, and construct a TCP data transmission channel according to the connection completion packet.

[0019] In one embodiment, the step of setting the transmission mode of several diagnostic functions in the diagnostic device based on the TCP data transmission mode and the UDP data transmission mode includes:

[0020] Analyze the plurality of diagnostic functions to obtain data reliability requirements, data transmission speed requirements, and data transmission volumes of the plurality of diagnostic functions;

[0021] Classifying the plurality of diagnostic functions according to the data reliability requirement, the data transmission speed requirement, and the data transmission volume to obtain a first diagnostic function set and a second diagnostic function set;

[0022] The transmission mode of the first diagnostic function set is set to the TCP data transmission mode, and the transmission mode of the second diagnostic function set is set to the UDP data transmission mode.

[0023] In addition, to achieve the above purpose, the present application also proposes a data transmission method, which is applied to a vehicle controller and includes:

[0024] Receiving a data collection request sent by a diagnostic device, wherein the data collection request is sent based on a preset data transmission mode, wherein the data transmission mode is obtained by the diagnostic device analyzing a diagnostic function selected by a user;

[0025] Data is collected based on the data collection request to obtain a collection result, and the collection result is sent to the diagnostic device through the data transmission mode.

[0026] In one embodiment, the data transmission mode includes a transmission control protocol TCP data transmission mode and a user datagram protocol UDP data transmission mode, and the step of performing data collection based on the data collection request, obtaining a collection result, and sending the collection result to the diagnostic device through the data transmission mode includes:

[0027] Parsing the data collection request to obtain a collection data source and a collection indicator;

[0028] Based on the collection index, the collection data source is collected in real time to obtain a collection result;

[0029] If the data transmission mode is the TCP data transmission mode, the collection result is sent to the diagnostic device through a pre-built TCP data transmission channel;

[0030] If the data transmission mode is the UDP data transmission mode, the collection result is sent to the diagnostic device based on the UDP port number of the diagnostic device.

[0031] In addition, to achieve the above-mentioned purpose, the present application also proposes a data transmission device, which is applied to a diagnostic device, and the device includes:

[0032] An analysis module, used for analyzing the diagnostic function selected by the user to obtain a data transmission mode;

[0033] The acquisition module is used to send a data acquisition request to the vehicle controller based on the data transmission mode, and the vehicle controller performs data acquisition based on the data acquisition request to obtain the acquisition result, and sends the acquisition result to the diagnostic device through the data transmission mode.

[0034] In addition, to achieve the above objectives, the present application also proposes a data transmission device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the data transmission method described above.

[0035] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the data transmission method described above are implemented.

[0036] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the data transmission method described above are implemented.

[0037] One or more technical solutions proposed in this application have at least the following technical effects:

[0038] The embodiment of the present application proposes a data transmission method, device, equipment, storage medium and computer program product, which obtains a data transmission mode by analyzing the diagnostic function selected by the user; sends a data collection request to the vehicle controller based on the data collection request, and the vehicle controller performs data collection based on the data collection request to obtain the collection result, and sends the collection result to the diagnostic device through the data transmission mode. Thus, the adopted data transmission mode is obtained by analyzing the diagnostic function required by the user, and a data collection request is sent to the vehicle controller based on the obtained data transmission mode, so that the vehicle controller performs the corresponding data collection and obtains the collection result, and then returns the collection result through the data transmission mode, which solves the problem that efficient data transmission cannot be performed according to the actual diagnostic function when diagnosing the vehicle, and improves the efficiency of data transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0040] 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, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0041] Figure 1 A flowchart of the first embodiment of the data transmission method of the present application is provided;

[0042] Figure 2 A flowchart of the second embodiment of the data transmission method of the present application is provided;

[0043] Figure 3 A brief flowchart of the data transmission method provided in Example 2 of the present application;

[0044] Figure 4 This is a schematic diagram of the module structure of the data transmission device according to an embodiment of the present application;

[0045] Figure 5 Schematic diagram of the device structure of the hardware operating environment involved in the data transmission method in the embodiment of the present application.

[0046] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0047] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0048] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0049] The main solution of the embodiment of the present application is: construct a TCP data transmission channel based on the device serial number and TCP port number of the diagnostic device; send the UDP port number of the diagnostic device to the vehicle controller, the vehicle controller records the UDP port number, obtains the record result, and sends the record result to the diagnostic device; obtains the TCP data transmission mode according to the TCP data transmission channel, and obtains the UDP data transmission mode according to the record result; sets the transmission mode of several diagnostic functions in the diagnostic device based on the TCP data transmission mode and the UDP data transmission mode. Construct a synchronization package based on the device serial number and TCP port number of the diagnostic device; send the synchronization package to the vehicle controller, the vehicle controller authenticates the synchronization package, obtains a synchronization confirmation package, and sends the synchronization confirmation package to the diagnostic device; receive the synchronization confirmation package sent by the vehicle controller, send a connection completion package to the vehicle controller based on the synchronization confirmation package, and construct a TCP data transmission channel based on the connection completion package. Analyze the several diagnostic functions to obtain the data reliability requirements, data transmission speed requirements and data transmission volume of the several diagnostic functions; classify the several diagnostic functions according to the data reliability requirements, data transmission speed requirements and data transmission volume to obtain a first diagnostic function set and a second diagnostic function set; set the transmission mode of the first diagnostic function set to the TCP data transmission mode, and set the transmission mode of the second diagnostic function set to the UDP data transmission mode. Receive a data acquisition request sent by a diagnostic device, the data acquisition request is sent based on a preset data transmission mode, and the data transmission mode is obtained by the diagnostic device analyzing the diagnostic function selected by the user; perform data acquisition based on the data acquisition request to obtain an acquisition result, and send the acquisition result to the diagnostic device through the data transmission mode. Parse the data acquisition request to obtain an acquisition data source and an acquisition index; perform real-time acquisition of the acquisition data source based on the acquisition index to obtain an acquisition result; if the data transmission mode is the TCP data transmission mode, send the acquisition result to the diagnostic device through a pre-constructed TCP data transmission channel; if the data transmission mode is the UDP data transmission mode, send the acquisition result to the diagnostic device based on the UDP port number of the diagnostic device. This solves the problem of not being able to perform efficient data transmission according to actual diagnostic functions when diagnosing a vehicle, realizes data transmission, and improves data transmission efficiency.Based on the solution of the present invention, a data transmission method is designed based on the fact that in reality, Ethernet basically only uses TCP mode for vehicle diagnosis. Although TCP provides reliable data transmission, its confirmation mechanism and retransmission mechanism will affect the diagnostic efficiency in some scenarios where the requirements for diagnostic data are not high, resulting in low data transmission efficiency. The effectiveness of the data transmission method of the present invention is verified when transmitting data. Finally, the efficiency of data transmission is significantly improved through the method of the present invention.

[0050] In this embodiment, for the convenience of description, the following description is made with the data transmission device as the execution subject.

[0051] In the prior art, TCP needs to establish a connection and use a confirmation retransmission mechanism to provide a feasible data transmission service, so TCP has a lower transmission efficiency. Especially when the network is congested, TCP's congestion control mechanism will limit the sending rate. Therefore, it is not efficient to use TCP for all diagnostic interactions. The UDP transmission method does not require a connection to be established. It directly sends data packets to the target address without any form of handshake or connection establishment process. This makes UDP communication more efficient, but it may also cause data packet loss or disorder, so the accuracy rate will also decrease.

[0052] The present application provides a solution. When using diagnostic equipment to collect vehicle data, based on the respective advantages and disadvantages of TCP and UDP methods and in accordance with different diagnostic function communication interaction requirements, a dynamic decision is made as to whether to use TCP or UDP mode. For diagnostic services with high data transmission reliability, such as special function flashing, the TCP mode can be used to ensure the normal sending and receiving of requests and replies. For diagnostic services with low data transmission reliability, such as cyclic signal value acquisition, the UDP mode can be used. UDP does not require establishment of a connection and has a low overhead and fast data transmission. In this way, different transmission modes can be used according to different requirements during the vehicle diagnosis process, thereby improving the overall vehicle diagnosis efficiency and providing users with better services.

[0053] It can be seen from the above embodiments that the present application obtains a data transmission mode by analyzing the diagnostic function selected by the user; based on the data transmission mode, a data collection request is sent to the vehicle controller, and the vehicle controller performs data collection based on the data collection request to obtain a collection result, and sends the collection result to the diagnostic device through the data transmission mode. Thus, the adopted data transmission mode is obtained by analyzing the diagnostic function required by the user, and a data collection request is sent to the vehicle controller based on the obtained data transmission mode, so that the vehicle controller performs the corresponding data collection and obtains the collection result, and then returns the collection result through the data transmission mode, which solves the problem that efficient data transmission cannot be performed according to the actual diagnostic function when diagnosing the vehicle, and improves the efficiency of data transmission.

[0054] It should be noted that the execution subject of this embodiment may be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a data transmission device, etc. The following takes a data transmission device as an example to illustrate this embodiment and the following embodiments.

[0055] Based on this, the embodiment of the present application provides a data transmission method, referring to Figure 1 , Figure 1 This is a flowchart of the first embodiment of the data transmission method of the present application.

[0056] In this embodiment, the data transmission method is applied to a diagnostic device, and includes steps S05 to S06:

[0057] Step S05, analyzing the diagnostic function selected by the user to obtain a data transmission mode;

[0058] Before the scheme of this embodiment is described, it should be clear that the scenario targeted by the scheme of this embodiment is the actual situation of the diagnostic equipment in the fault diagnosis and routine diagnosis of the vehicle status. In the prior art, in order to increase the speed of vehicle data transmission, the vehicle bus will be switched to Ethernet (Ethernet) is a widely used local area network (LAN) technology. It is a frame-based data transmission protocol that supports multiple physical media, such as twisted pair, optical fiber and wireless transmission. The commonly used communication methods in Ethernet are Transmission Control Protocol (TCP, Transmission Control Protocol) and User Datagram Protocol (UDP, User Datagram Protocol);

[0059] Among them, TCP is a major network communication protocol, widely used in Internet data transmission. It provides reliable, connection-oriented, byte stream services for applications, ensuring the integrity and order of data during transmission, while UDP is a core transport layer protocol on the Internet. Compared with TCP (Transmission Control Protocol), UDP provides a simple and efficient way to transmit data. UDP is mainly used in application scenarios with high requirements for speed and efficiency, but does not guarantee the reliability and order of data.

[0060] The above two communication protocols each have their own advantages and disadvantages. In actual use, TCP is usually used for data transmission for the reliability of data. Although TCP provides reliable data transmission, its confirmation mechanism and retransmission mechanism will affect the diagnostic efficiency in some scenarios where the requirements for diagnostic data are not high. UDP is a connectionless protocol that does not guarantee data reliability. If the data packet is lost or damaged during transmission, UDP will not perform any retransmission or error correction operations. Therefore, UDP's transmission speed is usually faster than TCP, but its reliability is lower.

[0061] Therefore, this embodiment proposes a solution, that is, after the diagnostic device receives the diagnostic function selected by the user, it analyzes it to obtain the corresponding data transmission mode, wherein the diagnostic functions mentioned here include: engine operation diagnosis, door sensor diagnosis and vehicle system operation diagnosis, etc. Since different diagnostic functions require different data reliability and data size, this embodiment adopts a method of analyzing the diagnostic function to obtain the data transmission mode to be used, which can avoid the use of a single data transmission mode to the greatest extent, which cannot guarantee the high reliability of the data while also improving the transmission efficiency.

[0062] Step S06, sending a data collection request to the vehicle controller based on the data transmission mode, the vehicle controller performs data collection based on the data collection request, obtains collection results, and sends the collection results to the diagnostic device through the data transmission mode.

[0063] After obtaining the data transmission mode suitable for the current diagnostic function, a data collection request is sent to the vehicle controller based on the data transmission mode. The vehicle controller performs corresponding data collection, obtains the collection results, and transmits the data back through the data transmission mode obtained above, that is, sends the collection results to the diagnostic device for the diagnostic device to perform the corresponding diagnosis.

[0064] Specifically, the data transmission mode in this embodiment includes a TCP data transmission mode and a UDP data transmission mode. Before using a specific mode for data transmission, it is necessary to construct the transmission mode. Therefore, before the above step S05, analyzing the diagnostic function selected by the user to obtain the data transmission mode, the method further includes:

[0065] Step S01, constructing a TCP data transmission channel based on the device serial number and TCP port number of the diagnostic device;

[0066] Step S02, sending the UDP port number of the diagnostic device to the vehicle controller, the vehicle controller records the UDP port number, obtains a record result, and sends the record result to the diagnostic device;

[0067] Step S03, obtaining a TCP data transmission mode according to the TCP data transmission channel, and obtaining a UDP data transmission mode according to the recording result;

[0068] Step S04: setting the transmission mode of several diagnostic functions in the diagnostic device based on the TCP data transmission mode and the UDP data transmission mode.

[0069] Before selecting a mode, the corresponding data transmission mode needs to be pre-built. Therefore, in this embodiment, a data transmission channel construction request is sent to the vehicle controller based on the serial number and TCP port number of the diagnostic device to obtain the TCP data transmission channel used in the TCP data transmission mode.

[0070] In addition to the construction of the TCP data transmission channel, the present embodiment also includes a UDP data transmission mode. However, considering that the UDP data transmission mode does not require prior connection construction, in the present embodiment, the UDP port number of the diagnostic device is sent to the vehicle controller, and the vehicle controller records the UDP port number (that is, when the vehicle controller receives the request, it can be known which diagnostic device issued the request and what the content of the request is), obtains the recording result, and then sends the recording result to the diagnostic device, so that the diagnostic device can know that the current vehicle controller can perform corresponding data transmission through the UDP data transmission mode.

[0071] After obtaining the TCO data transmission channel and recording results, it means that the data channels or transmission identifiers required by the current two data transmission modes have been constructed and recorded in the vehicle controller. Therefore, the TCP data transmission mode can be obtained according to the TCP data transmission channel, and the UDP data transmission mode can be obtained according to the recording results. After completing the construction of the two data transmission modes, it is also necessary to determine the transmission mode of the diagnostic function in the diagnostic equipment, that is, to determine the corresponding transmission mode according to the transmission requirements of the diagnostic function, so that users can obtain more efficient data transmission when using the diagnostic equipment.

[0072] More specifically, the step S01 of constructing a TCP data transmission channel based on the device serial number and the TCP port number of the diagnostic device includes:

[0073] Step S011, constructing a synchronization packet based on the device serial number and TCP port number of the diagnostic device;

[0074] Step S012, sending the synchronization packet to the vehicle controller, the vehicle controller authenticates the synchronization packet, obtains a synchronization confirmation packet, and sends the synchronization confirmation packet to the diagnostic device;

[0075] Step S013, receiving a synchronization confirmation packet sent by the vehicle controller, sending a connection completion packet to the vehicle controller based on the synchronization confirmation packet, and constructing a TCP data transmission channel according to the connection completion packet.

[0076] This embodiment also provides a process for constructing a TCP data transmission channel, and the steps are as follows:

[0077] First, the preparations needed:

[0078] (1) Confirm the network environment and ensure that the diagnostic equipment and vehicle controller are on the same network or can communicate with each other through the network;

[0079] (2) Configure parameters, such as TCP port number, IP address, and communication protocol (such as UDS or KWP2000);

[0080] Then, a TCP connection is established. The establishment of a TCP connection follows the "three-way handshake" process. The specific steps are as follows:

[0081] (1) Send SYN: The diagnostic device (client) sends a SYN (synchronization) packet to the vehicle controller (server) to request to establish a connection. This packet contains the client's initial sequence number.

[0082] (2) Receiving SYN-ACK. After receiving the SYN packet, if the vehicle controller agrees to establish a connection, it will reply with a SYN-ACK packet, which contains the initial serial number of the ECU and confirmation of the client serial number;

[0083] (3) Send ACK. After receiving the SYN-ACK packet, the diagnostic device sends an ACK (acknowledgement) packet to confirm the establishment of the connection. At this time, both parties can start data transmission.

[0084] Finally, the above steps can complete the construction of the TCP data transmission channel. In the specific use process, it can be specifically as follows:

[0085] (1) Sending diagnostic requests: After the connection and protocol negotiation are completed, the diagnostic device can start sending specific diagnostic requests, such as reading fault codes, clearing fault codes, or reading sensor data.

[0086] (2) Receiving response: After processing the diagnostic request, the vehicle controller sends the response data back to the diagnostic device through the TCP connection;

[0087] (3) Disconnection: After completing all diagnostic operations, the diagnostic device can send a FIN packet to request disconnection. After receiving it, the ECU will send an ACK confirmation and finally close the TCP connection.

[0088] Furthermore, the above step S04, the step of setting the transmission mode of several diagnostic functions in the diagnostic device based on the TCP data transmission mode and the UDP data transmission mode, includes:

[0089] Step S041, analyzing the plurality of diagnostic functions to obtain data reliability requirements, data transmission speed requirements, and data transmission volumes of the plurality of diagnostic functions;

[0090] Step S042, classifying the plurality of diagnostic functions according to the data reliability requirement, the data transmission speed requirement, and the data transmission volume to obtain a first diagnostic function set and a second diagnostic function set;

[0091] Step S043: setting the transmission mode of the first diagnostic function set to the TCP data transmission mode, and setting the transmission mode of the second diagnostic function set to the UDP data transmission mode.

[0092] After completing the construction of the two data transmission modes, it is necessary to determine the transmission mode for different diagnostic functions. In this embodiment, all diagnostic functions in the diagnostic device are analyzed to obtain the data reliability requirements, data transmission speed requirements and data transmission volume requirements for each diagnostic function.

[0093] Then, each diagnostic function is classified according to the obtained data reliability requirements, data transmission speed requirements and data transmission volume to obtain a first diagnostic function set and a second diagnostic function set. In order to adapt to actual business needs, the data reliability requirements, data transmission requirements and data transmission volume in this embodiment can be set with certain weight values. For example, the repair shop currently using the diagnostic equipment mainly targets luxury car business and routine maintenance projects, and a higher weight can be set for the data reliability requirement, such as a reliability requirement setting of 0.8, a data transmission speed requirement of 0.1 and a data transmission volume of 0.1. For businesses that are needed immediately (such as vehicle failures and the need for emergency repairs), a higher weight is set for the data transmission speed. The specific setting should be based on actual business needs.

[0094] In summary, after classifying several diagnostic functions, the first diagnostic function set can be set to TCP data transmission mode, and the second diagnostic function set can be set to UDP data transmission mode. In this way, the transmission mode setting of each diagnostic function is completed, and more efficient data transmission can be obtained during actual use.

[0095] This embodiment uses the above scheme to obtain a data transmission mode by analyzing the diagnostic function selected by the user; based on the data transmission mode, a data collection request is sent to the vehicle controller, and the vehicle controller performs data collection based on the data collection request to obtain a collection result, and sends the collection result to the diagnostic device through the data transmission mode. Thus, the adopted data transmission mode is obtained by analyzing the diagnostic function required by the user, and a data collection request is sent to the vehicle controller based on the obtained data transmission mode, so that the vehicle controller performs corresponding data collection and obtains the collection result, and then returns the collection result through the data transmission mode, which solves the problem that efficient data transmission cannot be performed according to the actual diagnostic function when diagnosing the vehicle, and improves the efficiency of data transmission.

[0096] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 2 , the data transmission method is applied to a vehicle controller, comprising steps S10 to S11:

[0097] Step S10, receiving a data collection request sent by a diagnostic device, wherein the data collection request is sent based on a preset data transmission mode, and the data transmission mode is obtained by the diagnostic device analyzing a diagnostic function selected by a user;

[0098] Step S11, performing data collection based on the data collection request, obtaining a collection result, and sending the collection result to the diagnostic device through the data transmission mode.

[0099] The execution operation of the diagnostic device has been described in the above embodiment. In this embodiment, the data collection request sent by the diagnostic device is received by the vehicle controller, wherein the data collection request is sent based on the data transmission mode pre-obtained by the diagnostic device, and the data transmission mode is obtained by the diagnostic device analyzing the diagnostic function selected by the user;

[0100] After receiving the data collection request sent by the diagnostic device, corresponding data collection is performed based on the data collection request to obtain collection results (including operating data of the diagnostic object, etc.), and then the collection results are sent to the diagnostic device through the data transmission mode used by the diagnostic device. The diagnostic device performs diagnostic analysis based on the collection results. By completing data collection and transmission through this solution, efficient diagnosis of the vehicle can be achieved.

[0101] Specifically, it has been known in the previous embodiments that the data transmission mode in this embodiment includes a TCP data transmission mode and a UDP data transmission mode, so the above step S10, the step of performing data collection based on the data collection request, obtaining the collection result, and sending the collection result to the diagnostic device through the data transmission mode includes:

[0102] Step S111, parsing the data collection request to obtain a collection data source and a collection index;

[0103] Step S112, performing real-time collection of the collection data source based on the collection index to obtain a collection result;

[0104] Step S113, if the data transmission mode is the TCP data transmission mode, sending the collection result to the diagnostic device through a pre-built TCP data transmission channel;

[0105] Step S114: if the data transmission mode is the UDP data transmission mode, the collection result is sent to the diagnostic device based on the UDP port number of the diagnostic device.

[0106] After receiving the data collection request, it is first parsed to obtain the collection data source and collection index that the diagnostic device wants to diagnose, and real-time data collection is performed on the collection data source based on the collection index to obtain the collection result;

[0107] Then, the results are sent according to the data transmission mode used by the diagnostic device. For example, when the diagnostic device is in TCP data transmission mode, the collected results are sent back to the diagnostic device through a pre-built TCP data transmission channel. This method can more effectively ensure the reliability of the data.

[0108] When the data transmission mode is the UDP data transmission mode, the collection results are sent to the diagnostic device based on the recording results obtained in the previous embodiment (including the UDP port number of the diagnostic device). This method can achieve faster data transmission.

[0109] It should be noted that the data sources collected in this embodiment include:

[0110] (1) Vehicle internal data:

[0111] ① CAN bus (Controller Area Network): The various control modules of the vehicle (such as the engine control unit, brake system, steering system, etc.) communicate through the CAN bus and can obtain the vehicle's operating status data in real time, such as vehicle speed, engine speed, throttle position, etc.;

[0112] ②OBD-II interface (On-Board Diagnostics): OBD-II is a standard interface that can be used to read vehicle fault codes, sensor data, and other performance information. It is usually collected using a scan tool or adapter (such as a Bluetooth OBD-II adapter);

[0113] ③Vehicle Electronic Control Unit (ECU): Modern vehicles are equipped with multiple ECUs, which are responsible for managing different functions and collecting and transmitting relevant data (such as power system, air conditioning, body stability, etc.);

[0114] (2) Sensor data:

[0115] ①GPS sensor: provides data on vehicle location, speed and direction of travel, commonly used for navigation and real-time positioning;

[0116] ② Accelerometer and gyroscope: used to measure the acceleration, deceleration and steering of the vehicle, and help analyze driving behavior and vehicle dynamics;

[0117] ③ Environmental sensors: including rain sensors, temperature sensors, light sensors, etc., used to obtain external environmental information to optimize vehicle control;

[0118] (3) Driver behavior data:

[0119] ① Driving habit monitoring: The driver’s behavior (such as fatigue, distraction, etc.) is collected through internal vehicle sensors and cameras (such as driver monitoring systems) to improve safety.

[0120] The collection indicators in this embodiment include:

[0121] (1) Vehicle performance indicators: speed (the vehicle's current speed, in km / h), engine speed (engine revolutions per minute, in RPM), throttle position (the opening of the accelerator pedal, in %), brake pressure (the pressure of the brake system, in bar or psi), acceleration (the change in the vehicle's acceleration over a period of time, in m / s2), fuel consumption (fuel consumption per unit distance, in L / 100 km or mpg), and power output (engine power and torque, in kW and Nm);

[0122] (2) Driving status indicators: mileage (total distance traveled by the vehicle, in km), driving time (total time the vehicle is driven, in hours), driving mode (such as economy mode, sport mode, etc.), tire pressure (the air pressure of each tire, in psi or bar), and vehicle stability (the stability data of the vehicle during driving, obtained by using roll angle and pitch angle);

[0123] (3) Environmental indicators: external temperature (ambient temperature outside the vehicle, in °C), humidity (ambient humidity, in %), road conditions (road conditions, such as dry, slippery, icy, etc.), GPS data (latitude and longitude, altitude, etc.);

[0124] It can be clearly seen that the collection data source and the collection index are in a corresponding relationship. After the collection index is determined, the collection data source and the collection time period that need to be collected can be known.

[0125] This embodiment adopts the above scheme, specifically by receiving a data collection request sent by a diagnostic device, the data collection request is sent based on a preset data transmission mode, and the data transmission mode is obtained by the diagnostic device analyzing the diagnostic function selected by the user; data collection is performed based on the data collection request to obtain a collection result, and the collection result is sent to the diagnostic device through the data transmission mode. Thus, the adopted data transmission mode is obtained by analyzing the diagnostic function required by the user, and a data collection request is sent to the vehicle controller based on the obtained data transmission mode, so that the vehicle controller performs corresponding data collection and obtains the collection result, and then returns the collection result through the data transmission mode, which solves the problem that efficient data transmission cannot be performed according to the actual diagnostic function when diagnosing the vehicle, and improves the efficiency of data transmission.

[0126] For example, to help understand the implementation process of the data transmission method obtained by combining this embodiment with the above-mentioned embodiment 1, please refer to Figure 3 , Figure 3A brief flow chart of a data transmission method is provided, specifically:

[0127] exist Figure 3 Before the solution shown, you need to make some preliminary settings:

[0128] First, the diagnostic device establishes a TCP connection with the vehicle controller (gateway or ECU) according to the agreed TCP port number to transmit diagnostic data with high reliability. TCP provides reliable data transmission services. It ensures the integrity and order of data through sequence numbers, confirmation mechanisms and retransmission mechanisms. If data is lost or errors occur during transmission, TCP will automatically retransmit the lost data until the data is correctly received.

[0129] Then, the diagnostic device also agrees on the UDP port number with the gateway or ECU, but does not need to establish a connection because UDP is a connectionless protocol. The sender can send data directly to the receiver without establishing a connection first, which makes UDP less expensive and more real-time in sending data, but it cannot guarantee the reliability of data transmission;

[0130] Then, the transmission mode of each diagnostic function can be set according to the requirements of different diagnostic functions. For diagnostic functions with high data transmission reliability, TCP mode can be set, such as reading version information, reading fault codes, security authentication, key matching, firmware flashing, etc. For diagnostic functions with low data transmission reliability, UDP mode can be set, such as cyclically reading certain signal values ​​of the vehicle. Because it is read in a loop, even if the data is lost, it will not affect the transmission speed. Using UDP will be faster.

[0131] Then in actual use, you can Figure 3 As shown in the figure, after the transmission mode of each diagnostic function is set, you can select the diagnostic function to be executed on the diagnostic device. For example, if you select the function of reading fault codes, you need to use the TCP mode. The diagnostic device sends the fault code reading request command to the gateway or ECU through the TCP connection established previously. After receiving it, the gateway or ECU will reply the requested fault code information to the diagnostic device through the TCP connection.

[0132] If the signal value reading function is selected, the diagnostic device directly sends a signal value reading command to the gateway or ECU through the UDP port. The command includes the DID of the signals to be read. After the gateway or ECU receives the request through the UDP port, it determines which signal values ​​to read based on the DID in the request, and then replies the signal value data to the diagnostic device through the UDP port. The diagnostic device can receive the signal value data through the UDF port. Because the signal value reading function is a cyclic reading, even if the UDP transmission occasionally loses a few requests or replies, it will not be affected because the requests are sent cyclically for reading.

[0133] Through the above scheme, the appropriate mode can be selected according to the requirements of different diagnostic functions for data transmission, so as to improve the efficiency of vehicle diagnosis.

[0134] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the data transmission method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.

[0135] This application also provides a data transmission device, please refer to Figure 4 , the data transmission device is applied to a diagnostic device, and the device comprises:

[0136] An analysis module 10 is used to analyze the diagnostic function selected by the user to obtain a data transmission mode;

[0137] The acquisition module 20 is used to send a data acquisition request to the vehicle controller based on the data transmission mode, and the vehicle controller performs data acquisition based on the data acquisition request to obtain acquisition results, and sends the acquisition results to the diagnostic device through the data transmission mode.

[0138] The data transmission device provided by the present application adopts the data transmission method in the above embodiment, which can solve the technical problem that efficient data transmission cannot be performed according to the actual diagnostic function when diagnosing the vehicle. Compared with the prior art, the beneficial effects of the data transmission device provided by the present application are the same as the beneficial effects of the data transmission method provided by the above embodiment, and other technical features in the data transmission device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0139] The present application provides a data transmission device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the data transmission method in the above-mentioned embodiment one.

[0140] Reference below Figure 5 , which shows a schematic diagram of the structure of a data transmission device suitable for implementing the embodiment of the present application. The data transmission device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The data transmission device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0141] like Figure 5 As shown, the data transmission device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the data transmission device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the data transmission device to communicate with other devices wirelessly or by wire to exchange data. Although the data transmission device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.

[0142] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0143] The data transmission device provided by the present application adopts the data transmission method in the above embodiment, which can solve the technical problem that efficient data transmission cannot be performed according to the actual diagnostic function when diagnosing the vehicle. Compared with the prior art, the beneficial effects of the data transmission device provided by the present application are the same as the beneficial effects of the data transmission method provided by the above embodiment, and the other technical features in the data transmission device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0144] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0145] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0146] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, wherein the computer-readable program instructions are used to execute the data transmission method in the above-mentioned embodiment.

[0147] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0148] The computer-readable storage medium may be included in the data transmission device; or may exist independently without being assembled into the data transmission device.

[0149] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the data transmission device, the data transmission device: analyzes the diagnostic function selected by the user to obtain a data transmission mode; sends a data collection request to the vehicle controller based on the data transmission mode, and the vehicle controller performs data collection based on the data collection request to obtain collection results, and sends the collection results to the diagnostic device through the data transmission mode.

[0150] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0151] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0152] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0153] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned data transmission method, and can solve the technical problem that efficient data transmission cannot be performed according to the actual diagnostic function when diagnosing a vehicle. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the data transmission method provided by the above-mentioned embodiment, and will not be repeated here.

[0154] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned data transmission method when executed by a processor.

[0155] The computer program product provided by the present application can solve the technical problem that efficient data transmission cannot be performed according to the actual diagnostic function when diagnosing a vehicle. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the data transmission method provided by the above embodiment, which will not be repeated here.

[0156] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A data transmission method, characterized in that: The method is applied to a diagnostic device, and the method comprises: Analyze the diagnostic function selected by the user to obtain a data transmission mode; A data collection request is sent to the vehicle controller based on the data transmission mode, and the vehicle controller performs data collection based on the data collection request to obtain a collection result, and sends the collection result to the diagnostic device through the data transmission mode.

2. The method according to claim 1, characterized in that The data transmission mode includes a transmission control protocol TCP data transmission mode and a user datagram protocol UDP data transmission mode. Before the step of analyzing the diagnostic function selected by the user to obtain the data transmission mode, the method further includes: Constructing a TCP data transmission channel based on the device serial number and the TCP port number of the diagnostic device; Sending the UDP port number of the diagnostic device to the vehicle controller, the vehicle controller recording the UDP port number, obtaining a recording result, and sending the recording result to the diagnostic device; Obtaining a TCP data transmission mode according to the TCP data transmission channel, and obtaining a UDP data transmission mode according to the recording result; The transmission mode of several diagnostic functions in the diagnostic device is set based on the TCP data transmission mode and the UDP data transmission mode.

3. The method according to claim 2, characterized in that The step of constructing a TCP data transmission channel based on the device serial number and the TCP port number of the diagnostic device comprises: Constructing a synchronization packet based on the device serial number and TCP port number of the diagnostic device; Sending the synchronization packet to the vehicle controller, the vehicle controller authenticates the synchronization packet to obtain a synchronization confirmation packet, and sending the synchronization confirmation packet to the diagnostic device; Receive a synchronization confirmation packet sent by the vehicle controller, send a connection completion packet to the vehicle controller based on the synchronization confirmation packet, and construct a TCP data transmission channel according to the connection completion packet.

4. The method according to claim 2, characterized in that The step of setting the transmission mode of several diagnostic functions in the diagnostic device based on the TCP data transmission mode and the UDP data transmission mode comprises: Analyze the plurality of diagnostic functions to obtain data reliability requirements, data transmission speed requirements, and data transmission volumes of the plurality of diagnostic functions; Classifying the plurality of diagnostic functions according to the data reliability requirement, the data transmission speed requirement, and the data transmission volume to obtain a first diagnostic function set and a second diagnostic function set; The transmission mode of the first diagnostic function set is set to the TCP data transmission mode, and the transmission mode of the second diagnostic function set is set to the UDP data transmission mode.

5. A data transmission method, characterized in that: The method is applied to a vehicle controller, and the method comprises: Receiving a data collection request sent by a diagnostic device, wherein the data collection request is sent based on a preset data transmission mode, wherein the data transmission mode is obtained by the diagnostic device analyzing a diagnostic function selected by a user; Data is collected based on the data collection request to obtain a collection result, and the collection result is sent to the diagnostic device through the data transmission mode.

6. The method according to claim 5, characterized in that The data transmission mode includes a transmission control protocol TCP data transmission mode and a user datagram protocol UDP data transmission mode, and the steps of performing data collection based on the data collection request, obtaining a collection result, and sending the collection result to the diagnostic device through the data transmission mode include: Parsing the data collection request to obtain a collection data source and a collection indicator; Based on the collection index, the collection data source is collected in real time to obtain a collection result; 102 If the data transmission mode is the TCP data transmission mode, the collection result is sent to the diagnostic device through a pre-built TCP data transmission channel; If the data transmission mode is the UDP data transmission mode, the collection result is sent to the diagnostic device based on the UDP port number of the diagnostic device.

7. A data transmission device, characterized in that: The device is applied to diagnostic equipment, and comprises: An analysis module, used for analyzing the diagnostic function selected by the user to obtain a data transmission mode; The acquisition module is used to send a data acquisition request to the vehicle controller based on the data transmission mode, and the vehicle controller performs data acquisition based on the data acquisition request to obtain the acquisition result, and sends the acquisition result to the diagnostic device through the data transmission mode.

8. A data transmission device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the data transmission method according to any one of claims 1 to 6.

9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the data transmission method according to any one of claims 1 to 6 are implemented.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the data transmission method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Automobile dual-remote diagnosis method, system and device and computer equipment

    CN113448320A

  • Vehicle remote diagnosis method and device, electronic equipment and storage medium

    CN114637275A

  • Diagnostic method for vehicle and related device

    CN115542883A

  • Remote communication method, device and equipment and computer readable storage medium

    CN117376269A

  • Failure diagnosis apparatus and method for in-vehicle control unit

    US20190079842A1