Automobile machine ethernet diagnosis method and device, electronic equipment and storage medium

By using software methods to obtain and process the diagnostic transmission data of the in-vehicle Ethernet, establish a transmission socket to interact with the vehicle computer server, and record diagnostic logs for diagnosis, the problems of the existing in-vehicle Ethernet diagnostic tools being high in cost and difficult to carry around are solved, and efficient and low-cost in-vehicle Ethernet diagnosis is achieved.

CN119182805BActive Publication Date: 2025-10-10CHONGQING SELIS PHOENIX INTELLIGENT INNOVATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411243712.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-05
Publication Date
2025-10-10
Estimated Expiration
2044-09-05

AI Technical Summary

Technical Problem

Existing in-vehicle Ethernet diagnostic tools are expensive and not portable, and cannot meet the testing needs in complex scenarios. The hardware connection method is not effective under certain conditions.

Method used

Implement Ethernet diagnosis through software, obtain diagnostic transmission data, generate request messages and establish transmission sockets, interact with the vehicle computer server based on the socket, record the sent and received message information for diagnosis, use the socket identification field to filter the diagnostic socket, and generate a diagnostic log for diagnosis.

Benefits of technology

It realizes Ethernet diagnosis without the need for additional hardware equipment, reduces costs, improves work efficiency, and meets the needs of efficient and low-cost diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119182805B_ABST
    Figure CN119182805B_ABST
Patent Text Reader

Abstract

The application provides a car machine Ethernet diagnosis method and device, electronic equipment and storage medium. The method comprises the following steps: obtaining diagnosis transmission data, and establishing a transmission socket based on a sending address, a receiving address and a corresponding request message in the diagnosis transmission data. The header information of the transmission socket contains an identification field. The request message is sent to a car machine service end based on the transmission socket. If the car machine service end successfully receives and processes the request message, a positive response message is returned based on the transmission socket. If the car machine service end fails to successfully receive and process the request message, a negative response message is returned based on the transmission socket. Based on the identification field, a plurality of transmission sockets are screened. The transmission socket containing a target identification field is taken as a diagnosis socket. The transmission and reception message information of the diagnosis socket is recorded in a diagnosis log. The car machine Ethernet is diagnosed based on the diagnosis log. Through the method, the technical problem that the Ethernet diagnosis cost is high and not easy to carry is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of in-vehicle Ethernet, and in particular to a vehicle Ethernet diagnostic method, device, electronic device and storage medium. Background Art

[0002] With the development of intelligent vehicles, in-vehicle Ethernet technology is becoming increasingly widely used. It can provide higher bandwidth and lower latency to meet the growing demand for data transmission within vehicles. However, with the application of Ethernet in automobiles, network security issues are becoming increasingly prominent. To ensure vehicle network security, effective diagnosis and monitoring of in-vehicle Ethernet is necessary.

[0003] Several Ethernet diagnostic tools already exist. These tools typically utilize dedicated hardware devices that physically connect to the vehicle's Ethernet network and then perform data exchange and diagnostics via specific communication protocols. However, existing Ethernet diagnostic tools are expensive, placing a significant cost burden on automakers. Furthermore, existing hardware devices are often bulky and difficult to carry, making them incapable of meeting the demands of Ethernet diagnostic testing in complex scenarios. Furthermore, the hardware connection method can be ineffective in some challenging conditions. Summary of the Invention

[0004] In view of the shortcomings of the above-mentioned related technologies, the present application provides a vehicle Ethernet diagnostic method, device, electronic device and storage medium to solve the technical problems of high cost and low portability caused by existing Ethernet diagnosis through hardware equipment.

[0005] The present application provides a vehicle Ethernet diagnostic method, which includes: obtaining multiple diagnostic transmission data, the diagnostic transmission data including a sending address, a receiving address and data content, generating a request message based on the data content, and establishing a transmission socket based on each of the sending address, the receiving address and the corresponding request message, the header information of each transmission socket including an identification field; sending the request message to the vehicle server based on the transmission socket, if the vehicle server successfully receives and processes the request message, the vehicle server returns a positive response message based on the transmission socket; if the vehicle server fails to successfully receive and process the request message, the vehicle server returns a negative response message based on the transmission socket, and the negative response message includes a comment field; filtering multiple transmission sockets based on the identification field, using the transmission socket including the target identification field as the diagnostic socket, and recording the sending and receiving message information in the diagnostic socket in a diagnostic log, so as to diagnose the vehicle Ethernet based on the diagnostic log.

[0006] In one embodiment of the present application, before sending the request message to the vehicle computer server based on the transmission socket, it also includes: sending a connection request message to the vehicle computer server, the serial number of the connection request message is the first request serial number, and the connection request message has a synchronization flag, and the client connection state is set to waiting; if a connection response message is received from the vehicle computer server within a preset waiting time, the serial number of the connection response message is the first response serial number, and the connection response message has a first confirmation flag and the synchronization flag, the client connection state is set to ready to connect, and a connection confirmation message is sent to the vehicle computer server, the serial number of the connection confirmation message is the second request serial number, and the connection confirmation message has a second confirmation flag, and the client connection state is set to success; if the connection response message sent from the vehicle computer server is not received within the preset waiting time, the client connection state is set to timeout.

[0007] In one embodiment of the present application, forming a transmission socket based on each of the sending address, the receiving address and the corresponding request message includes: forming the sending address, the receiving address and the corresponding request message into the transmission socket according to a preset socket format, the preset socket format includes header information and data information, the header information includes the address family and the socket type, and the data information includes the sending address, the receiving address and the request message; selecting an information segment in the header information as an identification field of the transmission socket.

[0008] In one embodiment of the present application, before sending the request message to the vehicle server based on the transmission socket, it also includes: grading the security level of the request message based on the data content, if the security level of the request message is higher than the preset security level, requesting a security algorithm seed from the vehicle server based on the transmission socket; calculating the security algorithm seed as an unlocking key based on the decryption algorithm in the local preset security library; sending the unlocking key to the vehicle server, so that the vehicle server compares the unlocking key with the preset key, and if the comparison is successful, unlocking the request message permission with a security level higher than the preset security level; sending the request message with a security level higher than the preset security level to the vehicle server based on the transmission socket.

[0009] In one embodiment of the present application, calculating the security algorithm seed as an unlocking key based on the decryption algorithm in the local preset security library includes: reading the decryption function in the local preset security library and setting the parameter type and return type of the decryption function; inputting the security algorithm seed as a parameter into the decryption function, calling the decryption function to perform the unlocking calculation operation to obtain the unlocking key as the return of the decryption function.

[0010] In one embodiment of the present application, diagnosing the vehicle Ethernet based on the diagnostic log includes: recording the transceiver message information in the diagnostic socket in the diagnostic log, the transceiver message information including the request message and the sending time of the request message, the positive response message and the receiving time of the positive response message, or the negative response message and the receiving time of the negative response message; if the transceiver message information includes the negative response message and the receiving time of the negative response message, extracting the annotation field in the negative response message, and obtaining the annotation meaning of the annotation field based on a preset annotation dictionary; outputting the annotation meaning as failure feedback, so that the user can diagnose the vehicle Ethernet based on the failure feedback.

[0011] In one embodiment of the present application, the vehicle Ethernet diagnostic method further includes: generating a vehicle Ethernet diagnostic window for display according to a preset graphical interface framework, so as to obtain the multiple diagnostic transmission data based on the vehicle Ethernet diagnostic window, and the vehicle Ethernet diagnostic window also displays the client connection status, and the client connection status includes waiting, ready to connect, success and timeout.

[0012] The embodiment of the present application also provides a vehicle Ethernet diagnostic device, the vehicle Ethernet diagnostic device comprising: a socket building module for obtaining a plurality of diagnostic transmission data, the diagnostic transmission data including a sending address, a receiving address and data content, generating a request message based on the data content, building a transmission socket based on each sending address, the receiving address and the corresponding request message, the header information of each transmission socket including an identification field; an affirmative response module for sending the request message based on the transmission socket to the vehicle server, and if the vehicle server successfully receives and processes the request message, request message, the vehicle computer server returns a positive response message based on the transmission socket; a negative response module is used to return a negative response message based on the transmission socket if the vehicle computer server fails to successfully receive and process the request message, and the negative response message contains a comment field; a diagnostic recording module is used to filter multiple transmission sockets based on the identification field, use the transmission socket containing the target identification field as a diagnostic socket, and record the sending and receiving message information in the diagnostic socket in the diagnostic log, so as to diagnose the vehicle computer Ethernet based on the diagnostic log.

[0013] An embodiment of the present application also provides an electronic device, which includes: one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the electronic device implements the vehicle Ethernet diagnostic method as described in any of the above embodiments.

[0014] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor of a computer, the computer is caused to execute the vehicle Ethernet diagnostic method as described in any of the above embodiments.

[0015] Beneficial effects of the present application: The embodiments of the present application provide a vehicle Ethernet diagnostic method, device, electronic device and storage medium. The method obtains diagnostic transmission data and establishes a transmission socket based on the sending address, receiving address and corresponding request message in the diagnostic transmission data. The header information of the transmission socket includes an identification field. The request message is sent to the vehicle server based on the transmission socket. If the vehicle server successfully receives and processes the request message, it returns a positive response message based on the transmission socket. If the vehicle server fails to successfully receive and process the request message, the vehicle server returns a negative response message based on the transmission socket. Multiple transmission sockets are filtered based on the identification field, and the transmission socket containing the target identification field is used as the diagnostic socket, and the sending and receiving message information of the diagnostic socket is recorded in the diagnostic log. The vehicle Ethernet is diagnosed based on the diagnostic log. The method realizes the sending and receiving of messages between Ethernets by establishing a socket, and realizes the diagnostic function of Ethernet according to the sending and receiving message information record, thereby realizing Ethernet diagnostic interaction of software, without the need for additional hardware equipment, and reducing the cost of equipment. Furthermore, implementing diagnostic interaction functions at the software level can improve work efficiency and reduce labor costs, thereby meeting the demand for efficient and low-cost Ethernet diagnostic tools.

[0016] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 1 is a schematic diagram of an implementation environment of a vehicle Ethernet diagnostic method according to an exemplary embodiment of the present application;

[0018] Figure 2 This is a flow chart of a vehicle Ethernet diagnostic method shown in an exemplary embodiment of the present application;

[0019] Figure 3 is an Ethernet connection flow chart shown in an exemplary embodiment of the present application;

[0020] Figure 4 1 is a schematic diagram of a vehicle Ethernet diagnostic window shown in an exemplary embodiment of the present application;

[0021] Figure 5 is a schematic diagram of a decryption process shown in an exemplary embodiment of the present application;

[0022] Figure 6 is a schematic diagram of diagnostic socket screening shown in an exemplary embodiment of the present application;

[0023] Figure 7 is a block diagram of a vehicle Ethernet diagnostic device shown in an exemplary embodiment of the present application;

[0024] Figure 8 It is a structural diagram of an electronic device shown in an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0025] The following describes the embodiments of the present application through specific examples. Those skilled in the art can easily understand the other advantages and effects of the present application from the content disclosed in this specification. The present application can also be implemented or applied through other different specific embodiments. The details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other unless they conflict.

[0026] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application. Therefore, the illustrations only show components related to the present application and are not drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component can be changed at will, and the component layout type may also be more complicated.

[0027] It should be noted that in this application, "first," "second," and the like are merely used to distinguish similar objects, and do not limit the order or precedence of similar objects. The variations of "including," "having," and the like indicate that the scope of the subject of the term is not exclusive, in addition to the examples shown in the term.

[0028] It should be understood that the various numbers, step numbers, and other reference numerals in this application are provided for ease of description and are not intended to limit the scope of this application. The order of reference numerals in this application does not necessarily imply a specific order of execution; the order of execution of each process is determined by its function and inherent logic.

[0029] In the following description, a large number of details are discussed to provide a more thorough explanation of the embodiments of the present application. However, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present application difficult to understand.

[0030] First, it's important to note that a graphical user interface (GUI) refers to a computer user interface that uses a graphical display. A GUI is an interface display format for communication between humans and computers, allowing users to use input devices such as a mouse to manipulate on-screen icons or menu options to select commands, call files, launch programs, and perform other daily tasks. Compared to character-based interfaces, which rely on keyboard input for routine tasks, GUIs offer many advantages. GUIs, consisting of windows, drop-down menus, dialog boxes, and their corresponding control mechanisms, are standardized across modern applications, meaning the same operations are always performed in the same way. In a GUI, users see and manipulate graphical objects, employing computer graphics techniques. The Tkinter library is the standard graphical user interface toolkit for Python. A DLL file is a dynamic link library containing functions and resources that can be called simultaneously by multiple programs. The Socket library is the standard library for network communication in Python. NRC stands for Negative Response Code, used as a comment field in negative response messages.

[0031] The embodiments of the present application respectively provide a vehicle Ethernet diagnostic method, a vehicle Ethernet diagnostic device, an electronic device, a computer-readable storage medium, and a computer program product, which will be described in detail below.

[0032] See also Figure 1 , Figure 1 It is a schematic diagram of an implementation environment of a vehicle Ethernet diagnostic method shown in an exemplary embodiment of the present application.

[0033] like Figure 1As shown, the implementation environment may include a device client 101 and a vehicle-mounted server 102. The device client may be at least one of a microcomputer, an embedded computer, a neural network computer, etc. First, the device client 101 receives multiple diagnostic transmission data input through a user graphical interface. The diagnostic transmission data includes a sending address, a receiving address, and data content. The device client 101 then generates a corresponding request message based on the received data content. A transmission socket is then established based on each sending address, receiving address, and corresponding request message. Part of the header information of each transmission socket is selected as an identification field. The device client 101 then sends the request message to the vehicle-mounted server 102 based on the transmission socket. If the vehicle-mounted server 102 successfully receives and processes the request message, the vehicle-mounted server 102 returns a positive response message based on the transmission socket corresponding to the request message. If the vehicle-mounted server 102 fails to receive and process the request message, the vehicle-mounted server 102 returns a negative response message based on the transmission socket corresponding to the request message. The negative response message includes a comment field. After the device client 101 completes the transmission and reception of multiple messages, it filters the multiple transmission sockets based on the identification field, selects the transmission socket containing the target identification field as the current diagnostic socket, and records the message transmission and reception information in the diagnostic socket in the diagnostic log, thereby diagnosing the vehicle Ethernet based on the diagnostic log. In this embodiment, the target identification field can be preset based on the message type to be diagnosed. Different target identification fields can be set based on the diagnosis of different messages to complete the diagnosis of different types of vehicle Ethernet messages.

[0034] See also Figure 2 , Figure 2 This is a flow chart of a vehicle Ethernet diagnostic method shown in an exemplary embodiment of the present application. This method can be applied to Figure 1 The implementation environment shown is as follows. The method may also be applicable to other exemplary implementation environments and be specifically executed by devices in other implementation environments. This embodiment does not limit the implementation environment to which the method is applicable.

[0035] like Figure 2 As shown, in an exemplary embodiment, the vehicle Ethernet diagnostic method includes at least steps S210 to S240, which are described in detail as follows:

[0036] Step S210, obtain multiple diagnostic transmission data, the diagnostic transmission data includes a sending address, a receiving address and data content, generate a request message based on the data content, and establish a transmission socket based on each sending address, receiving address and corresponding request message, and the information of each transmission socket includes an identification field.

[0037] In one embodiment of the present application, the forming the transmission socket based on each sending address, receiving address and corresponding request message comprises: forming the transmission socket according to a preset socket format based on the sending address, the receiving address and the corresponding request message, the preset socket format comprising header information and data information, the header information comprising address family and socket type, and the data information comprising the sending address, the receiving address and the request message; and selecting an information segment in the header information as an identification field of the transmission socket.

[0038] In one embodiment of the present application, the preset socket format is shown in Table 1.

[0039] Table 1

[0040]

[0041] As shown in Table 1, the preset socket format comprises header information and data information, the header information comprising address family and socket type, and the data information comprising the sending address, the receiving address and the request message generated based on data content.

[0042] In one embodiment of the present application, an exemplary transmission socket is shown in Table 2.

[0043] Table 2

[0044]

[0045] As shown in Table 2, the sending address of the exemplary transmission socket is 0e80, the receiving address is 0300, and the request message generated based on data content is 10 03.

[0046] In one embodiment of the present application, selecting an information segment in the header information as an identification field of the transmission socket is shown in Table 3.

[0047] Table 3

[0048]

[0049] As shown in Table 3, part of the fields in the header information of the transmission socket is selected as the identification field, for example, 8001 is selected as the identification field in Table 3.

[0050] In one embodiment of the present application, before sending the request message to the vehicle computer server based on the transmission socket, it also includes: sending a connection request message to the vehicle computer server, the serial number of the connection request message is the first request sequence number, and the connection request message has a synchronization flag, and the client connection status is set to waiting; if a connection response message is received from the vehicle computer server within the preset waiting time, the serial number of the connection response message is the first response sequence number, and the connection response message has a first confirmation flag and a synchronization flag, the client connection status is set to ready to connect, and a connection confirmation message is sent to the vehicle computer server, the serial number of the connection confirmation message is the second request sequence number, and the connection confirmation message has a second confirmation flag, and the client connection status is set to success; if a connection response message is not received from the vehicle computer server within the preset waiting time, the client connection status is set to timeout.

[0051] See Figure 3 , Figure 3 is an Ethernet connection flow chart shown in an exemplary embodiment of the present application. Figure 3The vehicle server address in the above embodiment is the receiving address. In one embodiment of the present application, the client first sends a TCP segment with a synchronization flag (SYN) as a connection request message to the vehicle server based on the input vehicle server address (i.e., the receiving address), and uses the first request sequence number as the sequence number of the connection request message. In this embodiment, the first request sequence number can be set to 0. The connection request message is used to notify the vehicle server of the client's request to establish a connection, and at the same time, the client connection state is set to waiting, and the timeout period is set to 3s. If the vehicle server does not respond after 3 seconds, the sending fails and the connection establishment fails. If within 3 seconds, the vehicle computer server agrees to establish a connection after receiving the connection request message, the vehicle computer server will respond with a TCP segment with a first confirmation flag (ACK) and a synchronization flag (SYN) as a connection response message. The sequence number of the connection response message is the first response sequence number. In this embodiment, the first response sequence number can be set to 0, and the ACK in the connection response message is set to 1 (0+1). The connection response message indicates that the vehicle computer server has received the connection request message with a request sequence number of 0, and is expecting the next message with a sequence number of 1 (0+1). If the client does not reply to the message within the preset waiting time, it is determined to be a timeout and the reception failed. The connection status of the client that receives the connection response message is set to ready to connect. After the client receives the connection response message, it sends a TCP segment with only the second acknowledgment flag (ACK) as a connection confirmation message. The sequence number of this connection confirmation message is the second request sequence number, which is 1 (0+1) in this embodiment. The ACK is set to 1 (0+1) and the connection confirmation message is sent to the vehicle server. This completes the connection between the client and the vehicle server and sets the client connection status to successful. At this point, the TCP connection between the client and the vehicle server is officially established, and data transmission can be carried out between the client and the vehicle server.

[0052] In one embodiment of the present application, before sending the request message to the vehicle computer server based on the transmission socket, it also includes: grading the security level of the request message based on the data content, if the security level of the request message is higher than the preset security level, requesting a security algorithm seed from the vehicle computer server based on the transmission socket; calculating the security algorithm seed as an unlocking key based on the decryption algorithm in the local preset security library; sending the unlocking key to the vehicle computer server, so that the vehicle computer server compares the unlocking key with the preset key, if the comparison is successful, unlocking the request message permission with a security level higher than the preset security level; sending the request message with a security level higher than the preset security level to the vehicle computer server based on the transmission socket.

[0053] In one embodiment of the present application, calculating the security algorithm seed as an unlocking key based on the decryption algorithm in the local preset security library includes: reading the decryption function in the local preset security library, and setting the parameter type and return type of the decryption function; inputting the security algorithm seed as a parameter into the decryption function, calling the decryption function to perform the unlocking calculation operation, and obtaining the unlocking key as the return of the decryption function.

[0054] See Figure 5 , Figure 5 This is a schematic diagram of the decryption process shown in an exemplary embodiment of the present application. Figure 5 As shown, the decryption process involves the client requesting a security algorithm seed for the security level of the request message from the on-board server (host). Upon receiving the request, the on-board server sends the security algorithm seed to the client and waits for the client to return the unlocking key. After receiving the security algorithm seed, the client calculates the unlocking key based on the security algorithm seed and returns the unlocking key to the on-board server, which then compares the unlocking key with a preset key. If the comparison is successful, a positive response is returned (i.e., authorization to unlock the request message), allowing the request message to be sent to the on-board server based on the transmission socket.

[0055] In one embodiment of the present application, after the client receives the security algorithm seed, the unlocking key is calculated based on the security algorithm seed, including: the client loads the DLL file into the memory to access the functions and data in the DLL file, and sets the parameter type and return type of the DLL function for calling, inputs the incoming 16-byte security algorithm seed as the parameter of the DLL function, and calls the corresponding decryption function in the DLL to perform the unlocking calculation operation, thereby obtaining the unlocking key. After the client calculates the key, when the DLL file is no longer needed, the memory space occupied by the DLL file is released. In this embodiment, the DLL file is a dynamic link library that contains functions and resources that can be called by multiple programs at the same time.

[0056] In step S220 , the request message is sent to the vehicle computer server based on the transmission socket. If the vehicle computer server successfully receives and processes the request message, the vehicle computer server returns a positive response message based on the transmission socket.

[0057] In one embodiment of the present application, when the client's request message is successfully received and processed by the vehicle computer server, the vehicle computer server will return a positive response message to confirm that the request message has been successfully processed, and record the positive response message in the diagnostic log to diagnose the vehicle computer Ethernet.

[0058] In step S230 , if the vehicle computer server fails to successfully receive and process the request message, the vehicle computer server returns a negative response message based on the transmission socket, and the negative response message includes a comment field.

[0059] In one embodiment of the present application, if the first byte of the data returned by the vehicle computer server is 7F, it means that this message is a negative response message, and the annotation field in the negative response message can be extracted for diagnostic analysis.

[0060] In one embodiment of the present application, the annotation field may be NRC, where NRC is a negative response code. Table 4 shows some exemplary NRCs and their corresponding meanings:

[0061] Table 4

[0062]

[0063]

[0064] Table 4 shows some NRC codes and their corresponding meanings. That is, the NRC code is used as the annotation field and its corresponding meaning is used as the annotation meaning. The annotation meaning of the annotation field in the negative response message can be extracted as failure output feedback for diagnosing the cause of signal processing failure.

[0065] In step S240 , multiple transmission sockets are screened based on the identification field, the transmission socket containing the target identification field is used as the diagnostic socket, and the transceiver message information in the diagnostic socket is recorded in the diagnostic log to diagnose the vehicle Ethernet based on the diagnostic log.

[0066] In one embodiment of the present application, diagnosing the vehicle Ethernet based on the diagnostic log includes: recording the transceiver message information in the diagnostic socket in the diagnostic log, the transceiver message information including the request message and the sending time of the request message, the positive response message and the receiving time of the positive response message, or the negative response message and the receiving time of the negative response message; if the transceiver message information contains the negative response message and the receiving time of the negative response message, extracting the annotation field in the negative response message, and obtaining the annotation meaning of the annotation field based on a preset annotation dictionary; outputting the annotation meaning as failure feedback, so that the user can diagnose the vehicle Ethernet based on the failure feedback.

[0067] See Figure 6 , Figure 6 FIG. 1 is a schematic diagram of a diagnostic socket screening diagram shown in an exemplary embodiment of the present application. Figure 6 As shown, the client uses the signal with the 8001 field in the transmission header information as a diagnostic signal. When filtering the transmission socket, the transmission socket containing the 8001 field in the transmission socket is used as the diagnostic socket, thereby realizing the filtering of the socket, and then filtering the data based on the identification field when recording the sent and received message information in the diagnostic log to ensure that the information recorded in the diagnostic log is the required diagnostic information.

[0068] In one embodiment of the present application, the vehicle Ethernet diagnostic method also includes: generating a vehicle Ethernet diagnostic window for display based on a preset graphical interface framework, so as to obtain multiple diagnostic transmission data based on the vehicle Ethernet diagnostic window, and the vehicle Ethernet diagnostic window also displays the client connection status, and the client connection status includes waiting, ready to connect, success and timeout.

[0069] See Figure 4 , Figure 4 This is a schematic diagram of a vehicle Ethernet diagnostic window shown in an exemplary embodiment of the present application. Figure 4 As shown, the user can enter the receiving address, sending address, and data content in the vehicle Ethernet diagnostic window, configure DLL files, and view diagnostic logs. The current client connection status is also displayed in the vehicle Ethernet diagnostic window. In this embodiment, Python is used to build a GUI interface framework, generating corresponding window programs for direct user access. The window is created by calling the Tkinter library, and the page design partitions related functions, filtering out unnecessary information from the package assembly and unpacking process, so that only the information required by the user is displayed on the interface. The Tkinter library is a standard graphical user interface toolkit for Python.

[0070] See also Figure 7 , Figure 7 This is a block diagram of a vehicle Ethernet diagnostic device shown in an exemplary embodiment of the present application. The device can be applied to Figure 1 The implementation environment shown is as follows. The apparatus may also be applicable to other exemplary implementation environments and specifically configured in other devices. This embodiment does not limit the implementation environment to which the apparatus is applicable.

[0071] like Figure 7 As shown, the exemplary vehicle Ethernet diagnostic device includes:

[0072] The socket building module 701 is used to obtain multiple diagnostic transmission data, the diagnostic transmission data including a sending address, a receiving address and data content, generate a request message based on the data content, and build a transmission socket based on each sending address, receiving address and corresponding request message, wherein the header information of each transmission socket includes an identification field;

[0073] A positive response module 702 is used to send the request message to the vehicle computer server based on the transmission socket. If the vehicle computer server successfully receives and processes the request message, the vehicle computer server returns a positive response message based on the transmission socket;

[0074] A negative response module 703 is configured to return a negative response message based on the transmission socket if the vehicle computer server fails to successfully receive and process the request message, and the negative response message includes a comment field;

[0075] The diagnostic recording module 704 is used to filter multiple transmission sockets based on the identification field, use the transmission socket containing the target identification field as the diagnostic socket, and record the sent and received message information in the diagnostic socket in the diagnostic log to diagnose the vehicle Ethernet based on the diagnostic log.

[0076] Figure 8 The following is a schematic diagram showing the structure of a computer system suitable for implementing an electronic device according to an embodiment of the present application. Figure 8 The computer system 800 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0077] like Figure 8 As shown, the computer system 800 includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 802 or the program loaded from the storage part 808 into the random access memory (RAM) 803, such as executing the method described in the above embodiment. Various programs and data required for system operation are also stored in the RAM 803. The CPU 801, ROM 802 and RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0078] The following components are connected to the I / O interface 805: an input section 806 including a keyboard, a mouse, and the like; an output section 807 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 808 including a hard disk and the like; and a communication section 809 including a network interface card such as a LAN (Local Area Network) card or a modem. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. Removable media 811, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 810 as needed, so that computer programs read therefrom can be installed into the storage section 808 as needed.

[0079] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 809, and / or installed from a removable medium 811. When the computer program is executed by the central processing unit (CPU) 801, the various functions defined in the system of the present application are executed.

[0080] It should be noted that the computer-readable medium shown in the embodiments of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media can 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), a 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 the present application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable computer program. This propagated data signal can take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. A computer program embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, or any suitable combination thereof.

[0081] The flowcharts and block diagrams in the drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowcharts or block diagrams can represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks may be executed in the reverse order, depending on the functionality involved. It will also be noted that each block of the block diagrams or flowcharts, and combinations thereof, can be implemented by special purpose hardware-based systems that perform the specified functions or operations, or combinations of special purpose hardware and computer instructions.

[0082] The units described in the embodiments of the present application can be implemented by software, or by hardware, or by a combination of software and hardware. The units described may

[0083] Another aspect of the present application provides a computer readable storage medium, which stores a computer program. The computer program is executed by a processor of a computer, and causes the computer to perform the vehicle head unit Ethernet diagnosis method described above. The computer readable storage medium can be included in the electronic device described in the embodiments above, or can exist separately and not be assembled into the electronic device.

[0084] Another aspect of the present application provides a computer program product or a computer program, which includes computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device performs the vehicle head unit Ethernet diagnosis method provided in the embodiments above.

[0085] The above embodiments are only illustrative of the principles and effects of the present application, and are not intended to limit the present application. Any person skilled in the art can modify or change the above embodiments without departing from the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by those skilled in the art without departing from the spirit and technical ideas of the present application should be covered by the claims of the present application.

Claims

1. A vehicle Ethernet diagnostic method, characterized in that: The vehicle Ethernet diagnostic method includes: Acquire multiple diagnostic transmission data, the diagnostic transmission data including a sending address, a receiving address, and data content, generate a request message based on the data content, establish a transmission socket based on each of the sending address, the receiving address, and the corresponding request message, and select an information segment in the transmission socket as an identification field of the transmission socket; Sending the request message to the vehicle computer server based on the transmission socket, and if the vehicle computer server successfully receives and processes the request message, the vehicle computer server returns a positive response message based on the transmission socket; If the vehicle computer server fails to successfully receive and process the request message, the vehicle computer server returns a negative response message based on the transmission socket, wherein the negative response message includes a comment field, and the comment field includes a negative response code for diagnosing the cause of the signal processing failure; Based on the identification field, multiple transmission sockets are screened, the transmission socket containing the target identification field is used as a diagnostic socket, and the sending and receiving message information in the diagnostic socket is recorded in a diagnostic log, so as to diagnose the vehicle Ethernet based on the diagnostic log.

2. The vehicle Ethernet diagnostic method according to claim 1, characterized in that: Before sending the request message to the vehicle computer server based on the transmission socket, the method further includes: Sending a connection request message to the vehicle computer server, wherein the sequence number of the connection request message is the first request sequence number and the connection request message carries a synchronization flag, and setting the client connection state to waiting; If a connection response message is received from the vehicle computer server within the preset waiting time, the sequence number of the connection response message is the first response sequence number, and the connection response message carries the first confirmation flag and the synchronization flag, the client connection state is set to ready to connect, and a connection confirmation message is sent to the vehicle computer server, the sequence number of the connection confirmation message is the second request sequence number, and the connection confirmation message carries the second confirmation flag, and the client connection state is set to successful; If the connection response message sent by the vehicle computer server is not received within the preset waiting time, the client connection status is set to timeout.

3. The vehicle Ethernet diagnostic method according to claim 1, characterized in that: Building a transmission socket based on each of the sending address, the receiving address, and the corresponding request message includes: Assembling the transmission socket with the sending address, the receiving address, and the corresponding request message according to a preset socket format, wherein the preset socket format includes header information and data information, the header information includes an address family and a socket type, and the data information includes the sending address, the receiving address, and the request message; An information segment is selected in the header information as an identification field of the transmission socket.

4. The vehicle Ethernet diagnostic method according to any one of claims 1 to 3, characterized in that: Before sending the request message to the vehicle computer server based on the transmission socket, the method further includes: Performing security level classification on the request message based on the data content, and if the security level of the request message is higher than a preset security level, requesting a security algorithm seed from the vehicle computer server based on the transmission socket; Calculating the security algorithm seed as an unlocking key based on a decryption algorithm in a locally preset security library; Sending the unlocking key to the vehicle computer server, so that the vehicle computer server compares the unlocking key with a preset key, and if the comparison is successful, unlocking the request message permission with a security level higher than the preset security level; The request message with a security level higher than the preset security level is sent to the vehicle computer service end based on the transmission socket.

5. The vehicle Ethernet diagnostic method according to any one of claims 1 to 3, characterized in that: Calculating the security algorithm seed as an unlocking key based on a decryption algorithm in a locally preset security library includes: Read the decryption function in the local preset security library and set the parameter type and return type of the decryption function; The security algorithm seed is input as a parameter into the decryption function, and the decryption function is called to perform an unlocking calculation operation to obtain the unlocking key as a return of the decryption function.

6. The vehicle Ethernet diagnostic method according to any one of claims 1 to 3, characterized in that: Diagnosing the vehicle Ethernet based on the diagnostic log includes: Recording the sent and received message information in the diagnostic socket in a diagnostic log, the sent and received message information including the request message and the sending time of the request message, the positive response message and the receiving time of the positive response message, or the negative response message and the receiving time of the negative response message; If the sent and received message information includes the negative response message and the reception time of the negative response message, extracting the annotation field in the negative response message, and obtaining the annotation meaning of the annotation field based on a preset annotation dictionary; The annotation meaning is output as failure feedback, so that the user can diagnose the vehicle Ethernet based on the failure feedback.

7. The vehicle Ethernet diagnostic method according to any one of claims 1 to 3, characterized in that: The vehicle Ethernet diagnostic method further includes: A vehicle Ethernet diagnostic window is generated for display according to a preset graphical interface framework to obtain the multiple diagnostic transmission data based on the vehicle Ethernet diagnostic window. The vehicle Ethernet diagnostic window also displays the client connection status, which includes waiting, ready to connect, success and timeout.

8. A vehicle Ethernet diagnostic device, characterized in that: The vehicle Ethernet diagnostic device includes: a socket building module, configured to obtain a plurality of diagnostic transmission data, the diagnostic transmission data including a sending address, a receiving address, and data content, generate a request message based on the data content, build a transmission socket based on each of the sending address, the receiving address, and the corresponding request message, and select an information segment in the transmission socket as an identification field of the transmission socket; an affirmative response module, configured to send the request message to the vehicle computer server based on the transmission socket, and if the vehicle computer server successfully receives and processes the request message, the vehicle computer server returns an affirmative response message based on the transmission socket; a negative response module, configured to return a negative response message based on the transmission socket if the vehicle-mounted server fails to successfully receive and process the request message, wherein the negative response message includes a comment field, and the comment field includes a negative response code for diagnosing the cause of the signal processing failure; A diagnostic recording module is used to filter multiple transmission sockets based on the identification field, use the transmission socket containing the target identification field as a diagnostic socket, and record the sent and received message information in the diagnostic socket in a diagnostic log, so as to diagnose the vehicle Ethernet based on the diagnostic log.

9. An electronic device, characterized in that: The electronic device comprises: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the electronic device to implement the vehicle Ethernet diagnostic method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that A computer program is stored thereon, and when the computer program is executed by a processor of a computer, the computer is caused to execute the vehicle Ethernet diagnostic method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Vehicle diagnosis method, system and device and storage medium

    CN114827183A

  • Service response methods, devices, equipment and storage media

    CN114938395A