Read-write method and read-write device of diagnosis identification data, server and storage medium

By receiving virtual USB Ethernet port information when the on-board ECU is started, establishing communication connections and processing diagnostic data instructions, the problem of traditional ECU identification data dependent bus tools is solved, and a more flexible and convenient data configuration process is achieved. .

CN119248688APending Publication Date: 2025-01-03GUANGZHOU AUTOMOBILE GROUP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411155725.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-21
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

The reading and writing of traditional vehicle ECU identification data relies on domain control CAN network or vehicle Ethernet, and requires external bus tools and equipment, which leads to cumbersome and expensive operations, which brings inconvenience to R&D, testing and joint debugging scenarios.

Method used

By receiving virtual USB Ethernet port information sent by the client when the vehicle ECU is started, establishing a communication connection, analyzing and processing diagnostic data instructions, sending it to the ECU node to perform to obtain diagnostic results, and realizing the reading and writing of identification data, avoiding the use of identification data. Rely on specific bus tools and devices.

Benefits of technology

Improves flexibility and convenience of identification data configuration, reduces dependence on expensive bus tools and equipment, and simplifies operational processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119248688A_ABST
    Figure CN119248688A_ABST
Patent Text Reader

Abstract

The invention discloses a diagnosis identification data read-write method and read-write device, a server and a storage medium, the method comprises the following steps: when a vehicle-mounted ECU is started, diagnosis identification data port information sent by a client is received, and the diagnosis identification data port information is determined by virtual USB Ethernet port information; under the condition that the communication connection is successfully established according to the diagnosis identification data port information, receiving a diagnosis data instruction sent by the client; and analyzing and processing the diagnosis data instruction to obtain a target diagnosis instruction, and sending the target diagnosis instruction to the ECU node, so that the ECU node executes the target diagnosis instruction to obtain a diagnosis result. According to the read-write method provided by the invention, a user can more conveniently identify the data configuration request and realize reading and writing without depending on a specific bus tool and equipment, so that the flexibility and the convenience are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data diagnosis, and in particular to a method for reading and writing diagnostic identification data, a device for reading and writing diagnostic identification data, an ECU diagnostic identification data server, a client, and a computer-readable storage medium. Background Art

[0002] As more and more vehicle intelligent scenarios are being implemented, the reading and writing of vehicle identification data is becoming more frequent. R&D, testing, and joint debugging scenarios all rely on the traditional domain control network CAN (Controller Area Network) or vehicle Ethernet to read and write the identification data configuration of the vehicle ECU (Electronic Control Unit), and these operations all require additional reliance on external bus tools and equipment. These tools and equipment all rely on the UDS (Unified Diagnostic Services) protocol for data configuration. The data format is not intuitive, the environment configuration process is cumbersome, and there are many field bus interfaces. At the same time, these tools and equipment are relatively expensive, which brings inconvenience to R&D, testing, and joint debugging scenarios. Summary of the invention

[0003] The present invention aims to solve one of the technical problems in the related art to at least a certain extent. To this end, the first purpose of the present invention is to propose a method for reading and writing diagnostic identification data, when the vehicle-mounted ECU is started, the diagnostic identification data port information sent by the client is received, wherein the diagnostic identification data port information is determined by the virtual USB Ethernet port information, and when a communication connection is successfully established according to the diagnostic identification data port information, the diagnostic data instruction sent by the client is received, the diagnostic data instruction is parsed and processed, the target diagnostic instruction is obtained, and the target diagnostic instruction is sent to the ECU node, so that the ECU node executes the target diagnostic instruction to obtain a diagnostic result, thereby enabling users to more conveniently perform identification data configuration requests and realize reading and writing, no longer needing to rely on specific bus tools and equipment, and improving flexibility and convenience.

[0004] The second object of the present invention is to provide a method for reading and writing diagnostic identification data.

[0005] The third object of the present invention is to provide a diagnostic identification data reading and writing device.

[0006] A fourth object of the present invention is to provide a diagnostic identification data reading and writing device.

[0007] A fifth object of the present invention is to provide an ECU diagnostic identification data server.

[0008] A sixth objective of the present invention is to provide a client.

[0009] A seventh object of the present invention is to provide a computer-readable storage medium.

[0010] To achieve the above-mentioned purpose, the first aspect of the present invention proposes a method for reading and writing diagnostic identification data, the method comprising: when the on-board ECU is started, receiving diagnostic identification data port information sent by the client, wherein the diagnostic identification data port information is determined by the virtual USB Ethernet port information; when a communication connection is successfully established according to the diagnostic identification data port information, receiving the diagnostic data instruction sent by the client; parsing and processing the diagnostic data instruction to obtain a target diagnostic instruction, and sending the target diagnostic instruction to the ECU node so that the ECU node executes the target diagnostic instruction to obtain a diagnostic result.

[0011] According to the method for reading and writing diagnostic identification data of an embodiment of the present invention, when the vehicle-mounted ECU is started, the diagnostic identification data port information sent by the client is received, wherein the diagnostic identification data port information is determined by the virtual USB Ethernet port information, and when a communication connection is successfully established according to the diagnostic identification data port information, the diagnostic data instruction sent by the client is received, the diagnostic data instruction is parsed and processed, the target diagnostic instruction is obtained, and the target diagnostic instruction is sent to the ECU node so that the ECU node executes the target diagnostic instruction to obtain a diagnostic result. As a result, the method enables users to more conveniently make identification data configuration requests and realize reading and writing, and no longer needs to rely on specific bus tools and equipment, thereby improving flexibility and convenience.

[0012] In addition, the method for reading and writing diagnostic identification data according to the above embodiment of the present invention may also have the following additional technical features:

[0013] According to one embodiment of the present invention, successfully establishing a communication connection based on the diagnostic identification data port information includes: receiving a connection request from the client, the connection request carrying the identity information of the client; when it is determined that the identity is valid based on the identity information, determining that the communication connection is successfully established; when it is determined that the identity is invalid based on the identity information, disconnecting the communication connection with the client.

[0014] According to an embodiment of the present invention, the method further includes: receiving the diagnosis result fed back by the ECU node, and disconnecting the communication connection of the client.

[0015] According to one embodiment of the present invention, the diagnostic data instruction carries the ECU node ID, instruction execution interval, identification data ID, identification data and instruction ID.

[0016] According to one embodiment of the present invention, the diagnostic data instruction carries a checksum field, and the method further includes: checking the diagnostic data instruction according to the checksum field; and sending a re-upload instruction to the client when a mismatch is determined according to the checksum field.

[0017] To achieve the above-mentioned purpose, the second aspect of the embodiment of the present invention proposes a method for reading and writing diagnostic identification data, the method comprising: sending diagnostic identification data port information to an ECU diagnostic identification data server, wherein the diagnostic identification data port information is determined by virtual USB Ethernet port information; upon successfully establishing a communication connection according to the diagnostic identification data port information, parsing configuration script information, and serializing the configuration script information into diagnostic data instructions, and sending the diagnostic data instructions to the ECU diagnostic identification data server; upon receiving the diagnostic result sent by the ECU diagnostic identification data server, disconnecting the communication connection with the ECU diagnostic identification data server.

[0018] According to the method for reading and writing diagnostic identification data of an embodiment of the present invention, diagnostic identification data port information is sent to the ECU diagnostic identification data server, wherein the diagnostic identification data port information is determined by the virtual USB Ethernet port information, and when a communication connection is successfully established according to the diagnostic identification data port information, the configuration script information is parsed, and the configuration script information is serialized into diagnostic data instructions, and the diagnostic data instructions are sent to the ECU diagnostic identification data server, and when the diagnostic result sent by the ECU diagnostic identification data server is received, the communication connection with the ECU diagnostic identification data server is disconnected. Thus, the method enables users to more conveniently make identification data configuration requests and realize reading and writing, and no longer needs to rely on specific bus tools and equipment, thereby improving flexibility and convenience.

[0019] In addition, the method for reading and writing diagnostic identification data according to the above embodiment of the present invention may also have the following additional technical features:

[0020] According to one embodiment of the present invention, the diagnostic data instruction carries a checksum field, and the method further includes: upon receiving a re-upload instruction sent by the ECU diagnostic identification data server, sending the diagnostic data instruction again, wherein the ECU diagnostic identification data server sends a re-upload instruction when determining a mismatch based on the checksum field.

[0021] According to one embodiment of the present invention, the configuration script information is configured using a JSON format file, and the diagnostic data instruction carries an ECU node ID, an instruction execution interval, an identification data ID, identification data and an instruction ID.

[0022] To achieve the above-mentioned purpose, the third aspect of the present invention proposes a diagnostic identification data reading and writing device, which includes: a first receiving module, used to receive the diagnostic identification data port information sent by the client when the vehicle-mounted ECU is started, wherein the diagnostic identification data port information is determined by the virtual USB Ethernet port information; the first receiving module is also used to receive the diagnostic data instruction sent by the client when a communication connection is successfully established according to the diagnostic identification data port information; a processing module is used to parse and process the diagnostic data instruction to obtain a target diagnostic instruction, and send the target diagnostic instruction to the ECU node so that the ECU node executes the target diagnostic instruction to obtain a diagnostic result.

[0023] According to the diagnostic identification data reading and writing device of the embodiment of the present invention, the first receiving module is used to receive the diagnostic identification data port information sent by the client when the vehicle-mounted ECU is started, wherein the diagnostic identification data port information is determined by the virtual USB Ethernet port information, and the first receiving module is also used to receive the diagnostic data instruction sent by the client when the communication connection is successfully established according to the diagnostic identification data port information, and the processing module is used to parse and process the diagnostic data instruction to obtain the target diagnostic instruction, and send the target diagnostic instruction to the ECU node so that the ECU node executes the target diagnostic instruction to obtain the diagnostic result. As a result, the device enables users to more conveniently make identification data configuration requests and realize reading and writing, and no longer need to rely on specific bus tools and equipment, thereby improving flexibility and convenience.

[0024] To achieve the above-mentioned purpose, the fourth aspect of the present invention proposes a diagnostic identification data reading and writing device, which includes: a sending module, used to send diagnostic identification data port information to an ECU diagnostic identification data server, wherein the diagnostic identification data port information is determined by the virtual USB Ethernet port information; the sending module is also used to parse the configuration script information when a communication connection is successfully established according to the diagnostic identification data port information, and serialize the configuration script information into diagnostic data instructions, and send the diagnostic data instructions to the ECU diagnostic identification data server; a second receiving module, used to receive the diagnostic result sent by the ECU diagnostic identification data server; and a disconnecting module, used to disconnect the communication connection with the ECU diagnostic identification data server.

[0025] According to the diagnostic identification data reading and writing device of the embodiment of the present invention, the sending module is used to send the diagnostic identification data port information to the ECU diagnostic identification data server, wherein the diagnostic identification data port information is determined by the virtual USB Ethernet port information, and the sending module is also used to parse the configuration script information and serialize the configuration script information into diagnostic data instructions when the communication connection is successfully established according to the diagnostic identification data port information, and send the diagnostic data instructions to the ECU diagnostic identification data server, the second receiving module is used to receive the diagnostic result sent by the ECU diagnostic identification data server, and the disconnection module is used to disconnect the communication connection with the ECU diagnostic identification data server. As a result, the device enables users to more conveniently make identification data configuration requests and realize reading and writing, and no longer need to rely on specific bus tools and equipment, thereby improving flexibility and convenience.

[0026] To achieve the above-mentioned purpose, the fifth aspect of the present invention proposes an ECU diagnostic identification data server, which includes a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, the above-mentioned diagnostic identification data reading and writing method is implemented.

[0027] According to the ECU diagnostic identification data server of an embodiment of the present invention, by executing the above-mentioned diagnostic identification data reading and writing method, it is possible for users to more conveniently make identification data configuration requests and realize reading and writing, without relying on specific bus tools and devices, thereby improving flexibility and convenience.

[0028] To achieve the above-mentioned purpose, a sixth aspect of the present invention proposes a client, including a memory, a processor, and a program stored in the memory and executable on the processor, and when the processor executes the program, the above-mentioned diagnostic identification data reading and writing method is implemented.

[0029] According to the client of the embodiment of the present invention, by executing the above-mentioned diagnostic identification data reading and writing method, it is possible for the user to more conveniently make identification data configuration requests and implement reading and writing, without relying on specific bus tools and devices, thereby improving flexibility and convenience.

[0030] To achieve the above-mentioned purpose, a seventh aspect of the present invention provides a computer-readable storage medium having a program stored thereon, which implements the above-mentioned diagnostic identification data reading and writing method when executed by a processor.

[0031] According to the computer-readable storage medium of an embodiment of the present invention, by implementing the above-mentioned diagnostic identification data reading and writing method during execution, it can enable users to more conveniently make identification data configuration requests and implement reading and writing, without relying on specific bus tools and devices, thereby improving flexibility and convenience.

[0032] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 is a flow chart of a method for reading and writing diagnostic identification data according to an embodiment of the present invention;

[0034] Figure 2 A flowchart of a method for reading and writing diagnostic identification data according to a specific example of the present invention;

[0035] Figure 3 is a flow chart of a method for reading and writing diagnostic identification data according to an embodiment of the present invention;

[0036] Figure 4 A schematic diagram of interaction between an ECU diagnostic identification data server and a client according to a specific example of the present invention;

[0037] Figure 5 It is a block diagram of a diagnostic identification data reading and writing device according to an embodiment of the present invention;

[0038] Figure 6 It is a block diagram of a diagnostic identification data reading and writing device according to an embodiment of the present invention;

[0039] Figure 7 A block diagram of an ECU diagnostic identification data server according to an embodiment of the present invention;

[0040] Figure 8 FIG. 4 is a block diagram of a client according to an embodiment of the present invention. DETAILED DESCRIPTION

[0041] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.

[0042] The following describes the diagnostic identification data reading and writing method, diagnostic identification data reading and writing device, ECU diagnostic identification data server, client and computer-readable storage medium proposed in the embodiments of the present invention with reference to the accompanying drawings.

[0043] Figure 1 Flow chart of a method for reading and writing diagnostic identification data according to an embodiment of the present invention.

[0044] like Figure 1 As shown, the method for reading and writing diagnostic identification data in the embodiment of the present invention may include the following steps:

[0045] S1, when the vehicle-mounted ECU is started, receiving the diagnostic identification data port information sent by the client, wherein the diagnostic identification data port information is determined by the virtual USB Ethernet port information.

[0046] S2, receiving a diagnostic data instruction sent by the client when a communication connection is successfully established according to the diagnostic identification data port information.

[0047] S3, parsing and processing the diagnostic data instruction to obtain a target diagnostic instruction, and sending the target diagnostic instruction to the ECU node so that the ECU node executes the target diagnostic instruction to obtain a diagnostic result.

[0048] Specifically, when the vehicle-mounted ECU is started, the diagnostic identification data port information sent by the client can be received, wherein the diagnostic identification data port information is determined by the virtual USB Ethernet port information. The vehicle-mounted ECU (Electronic Control Unit) is a computer system inside the vehicle that can be used to control different vehicle functions. When the ECU is started, it can accept external diagnostic and communication requests. When the ECU is started, the client (such as a diagnostic tool or a maintenance computer) will send a diagnostic request to the ECU through a certain communication protocol. These requests contain the port information that needs to communicate with the ECU in order to perform data exchange and diagnostic operations. In other words, the client can connect to the vehicle's ECU through a USB interface, connect to the ECU diagnostic identification data server through a USB virtual Ethernet and start service port forwarding, map the virtual USB Ethernet port to the ECU diagnostic identification data server port, and after the ECU diagnostic identification data server receives the diagnostic identification data port information sent by the client, it performs corresponding configuration and preparation according to this information to establish a communication link.

[0049] Determine whether the communication connection is successfully established. If the communication connection is successfully established according to the diagnostic identification data port information, the diagnostic data instruction sent by the client can be received. After successfully receiving the diagnostic data instruction, the diagnostic data instruction can be parsed and processed to obtain the target diagnostic instruction, for example, the diagnostic data instruction is decoded into understandable commands and parameters, etc., and the legality of the diagnostic data instruction can be verified, such as checking whether the diagnostic data instruction complies with the expected format and protocol specifications, ensuring that the parameters of the instruction operation are within the allowable range, etc. After obtaining the target diagnostic instruction, the target diagnostic instruction can be sent to the ECU node so that the ECU node executes the target diagnostic instruction to obtain the diagnostic result. That is, after receiving the diagnostic instruction sent by the server, the ECU node can parse and execute according to the instruction content, including reading and modifying the diagnostic identification data. For example, the reading operation involves obtaining fault codes, sensor data, status parameters, etc., such as reading real-time data of various sensors, such as temperature sensors, pressure sensors, speed sensors, etc. Modification operations include clearing fault codes, adjusting configuration parameters, and executing specific commands, such as clearing fault codes stored in the ECU to reset the system state after repairing the fault, and modifying ECU configuration parameters, such as updating the settings of the diagnostic communication protocol, adjusting the calibration parameters of the sensor, etc. These operations together ensure that the ECU node can effectively perform self-diagnosis and configuration management, thereby ensuring the normal operation and maintenance of the vehicle.

[0050] Thus, the problem that the reading and writing of identification data of the vehicle-mounted ECU usually rely on the domain control CAN network is solved. In the embodiment of the present invention, the transmission communication mode is converted to USB interface communication by using a virtual Ethernet interface. This conversion provides greater flexibility and convenience, allowing users to more conveniently make identification data configuration requests and realize reading and writing.

[0051] According to one embodiment of the present invention, successfully establishing a communication connection based on diagnostic identification data port information includes: receiving a connection request from a client, the connection request carrying identity information of the client; when it is determined based on the identity information that the identity is valid, determining that the communication connection is successfully established; when it is determined based on the identity information that the identity is invalid, disconnecting the communication connection with the client.

[0052] Specifically, a communication connection is successfully established according to the diagnostic identification data port information, including receiving a connection request from a client, wherein the connection request carries the identity information of the client, and in order to ensure the security of the connection data, the identity information can be verified. For example, the identity information of the client can be verified by the AES-128 algorithm, that is, the AES-128 algorithm is used for encryption. After receiving the encrypted information from the client, the same AES-128 key can be used for decryption to verify the correctness of the identity information, thereby ensuring communication security and identity authentication. Among them, AES-128 (Advanced Encryption Standard -128) is a symmetric encryption algorithm. When the identity is determined to be valid according to the identity information, it can be determined that the communication connection is successfully established. When the identity is determined to be invalid according to the identity information, in order to ensure data security, the communication connection with the client can be disconnected to re-perform connection verification.

[0053] According to an embodiment of the present invention, the method for reading and writing diagnostic identification data further includes: receiving a diagnostic result fed back by the ECU node, and disconnecting the communication connection of the client.

[0054] Specifically, after sending the target diagnostic instruction to the ECU node, the ECU diagnostic identification data server can also receive the diagnostic results fed back by the ECU node, so that by receiving the diagnostic results fed back by the ECU, the vehicle status can be monitored in real time and faults can be detected quickly. In addition, after receiving the diagnostic results fed back by the ECU node, the client's communication connection can also be disconnected to release resources and improve overall performance and stability.

[0055] According to one embodiment of the present invention, the diagnostic data instruction carries the ECU node ID, instruction execution interval, identification data ID, identification data and instruction ID.

[0056] Specifically, when receiving the diagnostic data instruction sent by the client, the diagnostic data instruction may carry the ECU node ID, instruction execution interval, identification data ID, identification data and instruction ID, wherein the ECU node ID is a unique identifier of each ECU in the vehicle network, which is used to identify and distinguish different ECUs in the network. For example, in a vehicle network, the engine control unit and the transmission control unit will have different node IDs. The instruction execution interval refers to the time interval between two consecutive instructions, usually in milliseconds. It is used to control the frequency of instruction sending to avoid excessive load on the ECU. For example, if the instruction execution interval is set to 1000 milliseconds, the instruction is sent every 1000 milliseconds. The identification data ID is used to identify specific data types or parameters. These data may include sensor readings, status information or the type of control instructions. For example, the identification data ID of sensor data is different from the identification data ID of status information. The identification data is the actual data content, which is associated with the identification data ID. It can be the sensor reading, status information or control instructions that need to be sent to the ECU. For example, the identification data may be engine temperature, oil pressure, etc. The command ID is used to identify specific control commands or operations. These commands tell the ECU diagnostic identification data server what operation should be performed, such as reading data, setting parameters, or performing a certain control action. With this data, the ECU diagnostic identification data server can accurately communicate with different ECU nodes, read necessary data, send control commands, and make adjustments based on real-time feedback, which is very important for ensuring the normal operation of the vehicle and rapid fault diagnosis.

[0057] According to one embodiment of the present invention, the diagnostic data instruction carries a checksum field, and the method for reading and writing diagnostic identification data further includes: checking the diagnostic data instruction according to the checksum field; and sending a re-upload instruction to the client when a mismatch is determined according to the checksum field.

[0058] Specifically, the diagnostic data instruction carries a checksum field. The checksum is a data integrity verification method that can be used to ensure that no errors occur during data transmission. When receiving the diagnostic data instruction sent by the client, in order to ensure the integrity and availability of the data, the diagnostic data instruction can be checked according to the checksum field. For example, a predefined checksum algorithm is used to calculate the checksum of the received diagnostic data part, and the calculated checksum is compared with the received checksum field. If the two are the same, the data packet is valid; otherwise, the data packet is invalid. Therefore, if a mismatch is determined based on the checksum field, a re-upload instruction can be sent to the client. After receiving the re-upload instruction, the client sends the diagnostic data instruction again.

[0059] Combine the following Figure 2 To describe the reading and writing method of the present invention.

[0060] As a specific example, the method for reading and writing diagnostic identification data of the present invention may include the following steps:

[0061] S101, when the vehicle-mounted ECU is started, receiving the diagnostic identification data port information sent by the client, wherein the diagnostic identification data port information is determined by the virtual USB Ethernet port information.

[0062] S102, receiving a connection request from a client, where the connection request carries identity information of the client.

[0063] S103, determine whether the identity is valid according to the identity information. If yes, execute step S104; if not, execute step S110.

[0064] S104, determining that the communication connection is successfully established.

[0065] S105: Receive a diagnostic data instruction sent by the client.

[0066] S106, verifying the diagnostic data instruction according to the checksum field.

[0067] S107, judging whether there is a match according to the checksum field. If yes, executing step S108; if not, executing step S111.

[0068] S108, parsing and processing the diagnostic data instruction to obtain a target diagnostic instruction, and sending the target diagnostic instruction to the ECU node so that the ECU node executes the target diagnostic instruction to obtain a diagnostic result.

[0069] S109, receiving the diagnosis result fed back by the ECU node, and disconnecting the communication connection of the client.

[0070] S110, disconnect the communication connection with the client, and proceed to step S102.

[0071] S111, sending a re-upload instruction to the client.

[0072] In summary, according to the method for reading and writing diagnostic identification data of an embodiment of the present invention, when the vehicle-mounted ECU is started, the diagnostic identification data port information sent by the client is received, wherein the diagnostic identification data port information is determined by the virtual USB Ethernet port information, and when a communication connection is successfully established according to the diagnostic identification data port information, the diagnostic data instruction sent by the client is received, the diagnostic data instruction is parsed and processed, the target diagnostic instruction is obtained, and the target diagnostic instruction is sent to the ECU node so that the ECU node executes the target diagnostic instruction to obtain a diagnostic result. As a result, the method enables users to more conveniently make identification data configuration requests and realize reading and writing, and no longer needs to rely on specific bus tools and equipment, thereby improving flexibility and convenience.

[0073] Figure 3 Flow chart of a method for reading and writing diagnostic identification data according to an embodiment of the present invention.

[0074] like Figure 3 As shown, the method for reading and writing diagnostic identification data in the embodiment of the present invention may include the following steps:

[0075] S10, sending diagnostic identification data port information to an ECU diagnostic identification data server, wherein the diagnostic identification data port information is determined by virtual USB Ethernet port information.

[0076] S11, when a communication connection is successfully established according to the diagnostic identification data port information, the configuration script information is parsed, the configuration script information is serialized into diagnostic data instructions, and the diagnostic data instructions are sent to the ECU diagnostic identification data server.

[0077] S12, upon receiving the diagnosis result sent by the ECU diagnosis identification data server, disconnecting the communication connection with the ECU diagnosis identification data server.

[0078] Specifically, when sending a diagnostic data instruction to an ECU diagnostic identification data server, it is first necessary to establish a connection with the ECU diagnostic identification data server, and the diagnostic identification data port information can be sent to the ECU diagnostic identification data server, wherein the diagnostic identification data port information is determined by the virtual USB Ethernet port information, that is, the relevant information (such as IP address, port number) on the virtual USB Ethernet port determines the content of the diagnostic identification data port information. In the case where a communication connection is successfully established according to the diagnostic identification data port information, the configuration script information is then parsed, and the configuration script information is serialized into a diagnostic data instruction. For example, the pre-configured script information can be obtained from a preset position, and the various parameters and instruction information in the script information are converted into a format that can be recognized and processed by the ECU diagnostic identification data server, that is, the diagnostic data instruction, and the script information can support multi-field identification data configuration. After determining the diagnostic data instruction, the diagnostic data instruction can be sent to the ECU diagnostic identification data server to send the diagnostic data instruction to the ECU node so that the ECU node executes the target diagnostic instruction to obtain a diagnostic result.

[0079] When receiving the diagnosis result sent by the ECU diagnosis identification data server, the communication connection with the ECU diagnosis identification data server can be disconnected to release resources. When the diagnosis needs to be re-performed, the client and the ECU diagnosis identification data server can establish a connection again and repeat the above steps. As a result, it is possible to support multi-field identification data configuration, not just a single value, to meet the user's demand for automatic reading and writing of identification data, and to transform the transmission communication mode into USB interface communication. This transformation provides greater flexibility and convenience, allowing users to more conveniently make identification data configuration requests and implement reading and writing. Users no longer need to rely on specific bus tools and devices, but can use the existing vehicle-mounted ECU's USB interface to read and write identification data, which allows users to more freely select and control devices and improves the flexibility and scalability of applications.

[0080] According to one embodiment of the present invention, the diagnostic data instruction carries a checksum field, and the method for reading and writing diagnostic identification data also includes: when receiving a re-upload instruction sent by the ECU diagnostic identification data server, sending the diagnostic data instruction again, wherein the ECU diagnostic identification data server sends a re-upload instruction when it determines that there is a mismatch based on the checksum field.

[0081] Specifically, the diagnostic data instruction carries a checksum field. The ECU diagnostic identification data server can perform verification based on the checksum field. If it is judged that there is a mismatch, it will send a re-upload instruction. When the client receives the re-upload instruction sent by the ECU diagnostic identification data server, it can send the diagnostic data instruction again to ensure the integrity and availability of the data.

[0082] According to one embodiment of the present invention, the configuration script information is configured using a JSON format file, and the diagnostic data instruction carries the ECU node ID, instruction execution interval, identification data ID, identification data and instruction ID.

[0083] Specifically, the configuration script information can be configured in a JSON format file. Users can customize the reading and writing of specified diagnostic identification data, and the diagnostic data instruction carries the ECU node ID, instruction execution interval, identification data ID, identification data and instruction ID. Among them, the ECU node ID is the unique identifier of each ECU in the vehicle network, which is used to identify and distinguish different ECUs in the network. For example, in a vehicle network, the engine control unit and the transmission control unit will have different node IDs. The instruction execution interval refers to the time interval between two consecutive instructions, usually in milliseconds. It is used to control the frequency of instruction sending to avoid excessive load on the ECU. For example, if the instruction execution interval is set to 1000 milliseconds, then the instruction is sent every 1000 milliseconds. The identification data ID is used to identify specific data types or parameters. These data may include sensor readings, status information, or the type of control instructions. For example, the identification data ID of sensor data is different from the identification data ID of status information. The identification data is the actual data content, which is associated with the identification data ID. It can be the sensor reading, status information, or control instructions that need to be sent to the ECU. For example, the identification data may be engine temperature, oil pressure, etc. The command ID is used to identify specific control commands or operations. These commands tell the ECU diagnostic identification data server what operation should be performed, such as reading data, setting parameters, or performing a certain control action. With this data, the ECU diagnostic identification data server can accurately communicate with different ECU nodes, read necessary data, send control commands, and make adjustments based on real-time feedback, which is very important for ensuring the normal operation of the vehicle and rapid fault diagnosis.

[0084] In one embodiment of the present invention, an ECU diagnostic identification data server is created when the ECU is started. The ECU diagnostic identification data server opens the underlying diagnostic protocol layer and can communicate with the traditional domain control network diagnostic protocol as well as the diagnostic identification data client of the virtual USB Ethernet, thus solving the limitation of the traditional diagnostic system relying on the domain control network and bus tools. In addition, a three-layer communication design is adopted, namely the network layer, the transport layer and the application layer. The application layer is designed based on the subscription / publishing message mechanism, and the client only needs to register the corresponding diagnostic identification ID to receive data messages from the server. The transport layer uses the TCP protocol for data transmission, which ensures the reliability, integrity and availability of the diagnostic identification data. The network layer communicates with the client through the virtual USB Ethernet to support data interaction among multiple clients, greatly improving the efficiency of reading and writing diagnostic identification data in complex scenarios. In addition, it supports importing preset custom natural description language configurations for configuration, including but not limited to keywords such as sleep, start, read, write, handler and period to perform identification, reading and writing of specific diagnostic identification data, and meet the automatic reading and writing of batch data under specific conditions.

[0085] In summary, according to the method for reading and writing diagnostic identification data of an embodiment of the present invention, diagnostic identification data port information is sent to the ECU diagnostic identification data server, wherein the diagnostic identification data port information is determined by the virtual USB Ethernet port information, and when a communication connection is successfully established according to the diagnostic identification data port information, the configuration script information is parsed, and the configuration script information is serialized into diagnostic data instructions, and the diagnostic data instructions are sent to the ECU diagnostic identification data server, and when the diagnostic result sent by the ECU diagnostic identification data server is received, the communication connection with the ECU diagnostic identification data server is disconnected. As a result, the method enables users to more conveniently make identification data configuration requests and realize reading and writing, and no longer needs to rely on specific bus tools and equipment, thereby improving flexibility and convenience.

[0086] For ease of understanding, the method for reading and writing diagnostic identification data of the present invention is described in a specific embodiment. Figure 4 As shown, the interaction between the client and the ECU diagnostic identification data server of the embodiment of the present invention may include the following steps:

[0087] S301, sending diagnostic identification data port information to an ECU diagnostic identification data server, wherein the diagnostic identification data port information is determined by virtual USB Ethernet port information.

[0088] S302, when the vehicle-mounted ECU is started, receiving the diagnostic identification data port information sent by the client, wherein the diagnostic identification data port information is determined by the virtual USB Ethernet port information.

[0089] S303: Send a connection request to the ECU diagnostic identification data server.

[0090] S304, receiving a connection request from the client, the connection request carrying the identity information of the client, and determining that the communication connection is successfully established when the identity is determined to be valid according to the identity information.

[0091] S305: Send communication connection success information to the client.

[0092] S306, when a communication connection is successfully established according to the diagnostic identification data port information, the configuration script information is parsed, the configuration script information is serialized into diagnostic data instructions, and the diagnostic data instructions are sent to the ECU diagnostic identification data server.

[0093] S307: Receive the diagnostic data instruction sent by the client.

[0094] S308, parsing and processing the diagnostic data instruction to obtain a target diagnostic instruction, and sending the target diagnostic instruction to the ECU node so that the ECU node executes the target diagnostic instruction to obtain a diagnostic result.

[0095] S309, receiving the diagnosis result fed back by the ECU node, and disconnecting the communication connection with the client.

[0096] S310, sending a diagnosis result to the client before disconnecting the communication connection with the client.

[0097] S311 , upon receiving the diagnosis result sent by the ECU diagnosis identification data server, disconnecting the communication connection with the ECU diagnosis identification data server.

[0098] Corresponding to the above-mentioned embodiment, the present invention further proposes a diagnostic identification data reading and writing device.

[0099] like Figure 5 As shown, the diagnostic identification data reading and writing device 100 according to the embodiment of the present invention includes: a first receiving module 110 and a processing module 120 .

[0100] The first receiving module 110 is used to receive the diagnostic identification data port information sent by the client when the vehicle-mounted ECU is started, wherein the diagnostic identification data port information is determined by the virtual USB Ethernet port information. The first receiving module 110 is also used to receive the diagnostic data instruction sent by the client when a communication connection is successfully established according to the diagnostic identification data port information. The processing module 120 is used to parse and process the diagnostic data instruction to obtain the target diagnostic instruction, and send the target diagnostic instruction to the ECU node so that the ECU node executes the target diagnostic instruction to obtain a diagnostic result.

[0101] According to one embodiment of the present invention, the first receiving module 110 successfully establishes a communication connection based on the diagnostic identification data port information, and is specifically used to: receive a connection request from a client, the connection request carrying the identity information of the client; when it is determined that the identity is valid based on the identity information, determine that the communication connection is successfully established; when it is determined that the identity is invalid based on the identity information, disconnect the communication connection with the client.

[0102] According to an embodiment of the present invention, the first receiving module 110 is further used to: receive the diagnosis result fed back by the ECU node, and disconnect the communication connection of the client.

[0103] According to one embodiment of the present invention, the diagnostic data instruction carries the ECU node ID, instruction execution interval, identification data ID, identification data and instruction ID.

[0104] According to an embodiment of the present invention, the diagnostic data instruction carries a checksum field, and the processing module 120 is further used to: check the diagnostic data instruction according to the checksum field; and send a re-upload instruction to the client when a mismatch is determined according to the checksum field.

[0105] It should be noted that for details not disclosed in the diagnostic identification data reading and writing device of the embodiment of the present invention, please refer to the details disclosed in the diagnostic identification data reading and writing method of the embodiment of the present invention, and the details will not be repeated here.

[0106] According to the diagnostic identification data reading and writing device of the embodiment of the present invention, the first receiving module is used to receive the diagnostic identification data port information sent by the client when the vehicle-mounted ECU is started, wherein the diagnostic identification data port information is determined by the virtual USB Ethernet port information, and the first receiving module is also used to receive the diagnostic data instruction sent by the client when the communication connection is successfully established according to the diagnostic identification data port information, and the processing module is used to parse and process the diagnostic data instruction to obtain the target diagnostic instruction, and send the target diagnostic instruction to the ECU node so that the ECU node executes the target diagnostic instruction to obtain the diagnostic result. As a result, the device enables users to more conveniently make identification data configuration requests and realize reading and writing, and no longer need to rely on specific bus tools and equipment, thereby improving flexibility and convenience.

[0107] Corresponding to the above-mentioned embodiment, the present invention further proposes a diagnostic identification data reading and writing device.

[0108] like Figure 6 As shown, the diagnostic identification data reading and writing device 200 according to the embodiment of the present invention includes: a sending module 210 , a second receiving module 220 and a disconnection module 230 .

[0109] Among them, the sending module 210 is used to send the diagnostic identification data port information to the ECU diagnostic identification data server, wherein the diagnostic identification data port information is determined by the virtual USB Ethernet port information. The sending module 210 is also used to parse the configuration script information when a communication connection is successfully established according to the diagnostic identification data port information, and to serialize the configuration script information into a diagnostic data instruction, and to send the diagnostic data instruction to the ECU diagnostic identification data server. The second receiving module 220 is used to receive the diagnostic result sent by the ECU diagnostic identification data server. The disconnection module 230 is used to disconnect the communication connection with the ECU diagnostic identification data server.

[0110] According to one embodiment of the present invention, the diagnostic data instruction carries a checksum field, and the sending module 210 is also used to: when receiving a re-upload instruction sent by the ECU diagnostic identification data server, send the diagnostic data instruction again, wherein the ECU diagnostic identification data server sends a re-upload instruction when it determines that there is a mismatch based on the checksum field.

[0111] According to one embodiment of the present invention, the configuration script information is configured using a JSON format file, and the diagnostic data instruction carries the ECU node ID, instruction execution interval, identification data ID, identification data and instruction ID.

[0112] It should be noted that for details not disclosed in the diagnostic identification data reading and writing device of the embodiment of the present invention, please refer to the details disclosed in the diagnostic identification data reading and writing method of the embodiment of the present invention, and the details will not be repeated here.

[0113] According to the diagnostic identification data reading and writing device of the embodiment of the present invention, the sending module is used to send the diagnostic identification data port information to the ECU diagnostic identification data server, wherein the diagnostic identification data port information is determined by the virtual USB Ethernet port information, and the sending module is also used to parse the configuration script information and serialize the configuration script information into diagnostic data instructions when the communication connection is successfully established according to the diagnostic identification data port information, and send the diagnostic data instructions to the ECU diagnostic identification data server, the second receiving module is used to receive the diagnostic result sent by the ECU diagnostic identification data server, and the disconnection module is used to disconnect the communication connection with the ECU diagnostic identification data server. As a result, the device enables users to more conveniently make identification data configuration requests and realize reading and writing, and no longer need to rely on specific bus tools and equipment, thereby improving flexibility and convenience.

[0114] Corresponding to the above embodiment, the present invention also proposes an ECU diagnostic identification data server.

[0115] like Figure 7 As shown, the ECU diagnostic identification data server 300 of the embodiment of the present invention may include: a memory 310, a processor 320, and a program stored in the memory 310 and executable on the processor 320. When the processor 320 executes the program, the above-mentioned diagnostic identification data reading and writing method is implemented.

[0116] According to the ECU diagnostic identification data server of an embodiment of the present invention, by executing the above-mentioned diagnostic identification data reading and writing method, it is possible for users to more conveniently make identification data configuration requests and realize reading and writing, without relying on specific bus tools and devices, thereby improving flexibility and convenience.

[0117] Corresponding to the above embodiment, the present invention also proposes a client.

[0118] like Figure 8 As shown, the client 400 of the embodiment of the present invention may include: a memory 410, a processor 420, and a program stored in the memory 410 and executable on the processor 420. When the processor 420 executes the program, the above-mentioned diagnostic identification data reading and writing method is implemented.

[0119] According to the client of the embodiment of the present invention, by executing the above-mentioned diagnostic identification data reading and writing method, it is possible for the user to more conveniently make identification data configuration requests and implement reading and writing, without relying on specific bus tools and devices, thereby improving flexibility and convenience.

[0120] Corresponding to the above embodiment, the present invention also proposes a computer-readable storage medium.

[0121] The computer-readable storage medium of the embodiment of the present invention stores a program thereon, and when the program is executed by a processor, the above-mentioned method for reading and writing diagnostic identification data is implemented.

[0122] According to the computer-readable storage medium of an embodiment of the present invention, by executing the above-mentioned diagnostic identification data reading and writing method, it is possible for users to more conveniently make identification data configuration requests and implement reading and writing, without relying on specific bus tools and devices, thereby improving flexibility and convenience.

[0123] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection portion with one or more wirings (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.

[0124] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0125] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0126] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0127] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements, unless otherwise clearly defined. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0128] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. A method for reading and writing diagnostic identification data, characterized in that: The method comprises: When the vehicle-mounted ECU is started, receiving the diagnostic identification data port information sent by the client, wherein the diagnostic identification data port information is determined by the virtual USB Ethernet port information; When a communication connection is successfully established according to the diagnostic identification data port information, receiving a diagnostic data instruction sent by the client; The diagnostic data instruction is parsed and processed to obtain a target diagnostic instruction, and the target diagnostic instruction is sent to an ECU node so that the ECU node executes the target diagnostic instruction to obtain a diagnostic result.

2. The method for reading and writing diagnostic identification data according to claim 1, characterized in that: Successfully establishing a communication connection according to the diagnostic identification data port information includes: receiving a connection request from the client, wherein the connection request carries identity information of the client; If the identity is determined to be valid according to the identity information, determining that the communication connection is successfully established; When it is determined that the identity is invalid according to the identity information, the communication connection with the client is disconnected.

3. The method for reading and writing diagnostic identification data according to claim 1, characterized in that: The method further comprises: The diagnostic result fed back by the ECU node is received, and the communication connection with the client is disconnected.

4. The method for reading and writing diagnostic identification data according to claim 1, characterized in that: The diagnostic data instruction carries the ECU node ID, instruction execution interval, identification data ID, identification data and instruction ID.

5. The method for reading and writing diagnostic identification data according to claim 1, characterized in that: The diagnostic data instruction carries a checksum field, and the method further comprises: checking the diagnostic data instruction according to the checksum field; When it is determined according to the checksum field that there is a mismatch, a re-upload instruction is sent to the client.

6. A method for reading and writing diagnostic identification data, characterized in that: The method comprises: Sending diagnostic identification data port information to an ECU diagnostic identification data server, wherein the diagnostic identification data port information is determined by virtual USB Ethernet port information; When a communication connection is successfully established according to the diagnostic identification data port information, parsing the configuration script information, serializing the configuration script information into diagnostic data instructions, and sending the diagnostic data instructions to the ECU diagnostic identification data server; When receiving the diagnosis result sent by the ECU diagnosis identification data server, the communication connection with the ECU diagnosis identification data server is disconnected.

7. The method for reading and writing diagnostic identification data according to claim 6, characterized in that: The diagnostic data instruction carries a checksum field, and the method further comprises: Upon receiving the re-upload instruction sent by the ECU diagnostic identification data server, the diagnostic data instruction is sent again, wherein the ECU diagnostic identification data server sends the re-upload instruction when it is determined according to the checksum field that there is no match.

8. The method for reading and writing diagnostic identification data according to claim 6, characterized in that: The configuration script information is configured using a JSON format file, and the diagnostic data instruction carries the ECU node ID, instruction execution interval, identification data ID, identification data and instruction ID.

9. A diagnostic identification data reading and writing device, characterized in that: The device comprises: A first receiving module is used to receive the diagnostic identification data port information sent by the client when the vehicle-mounted ECU is started, wherein the diagnostic identification data port information is determined by the virtual USB Ethernet port information; The first receiving module is further configured to receive a diagnostic data instruction sent by the client when a communication connection is successfully established according to the diagnostic identification data port information; The processing module is used to parse and process the diagnostic data instruction to obtain a target diagnostic instruction, and send the target diagnostic instruction to the ECU node so that the ECU node executes the target diagnostic instruction to obtain a diagnostic result.

10. A diagnostic identification data reading and writing device, characterized in that: The device comprises: A sending module, used for sending the diagnostic identification data port information to the ECU diagnostic identification data server, wherein the diagnostic identification data port information is determined by the virtual USB Ethernet port information; The sending module is further used to parse the configuration script information and serialize the configuration script information into a diagnostic data instruction when a communication connection is successfully established according to the diagnostic identification data port information, and send the diagnostic data instruction to the ECU diagnostic identification data server; A second receiving module, used for receiving the diagnosis result sent by the ECU diagnosis identification data server; The disconnection module is used to disconnect the communication connection with the ECU diagnosis identification data server.

11. An ECU diagnostic identification data server, characterized in that: include: A memory, a processor, and a program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for reading and writing diagnostic identification data according to any one of claims 1 to 5 is implemented.

12. A client, characterized in that: include: A memory, a processor, and a program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for reading and writing diagnostic identification data according to any one of claims 6 to 8 is implemented.

13. A computer-readable storage medium, characterized in that: A program is stored thereon, and when the program is executed by a processor, the method for reading and writing diagnostic identification data according to any one of claims 1-8 is implemented.