Vehicle diagnostic method, diagnostic device, diagnostic equipment and medium and vehicle

By setting up processing queues and session management in the vehicle, the problem of access conflict on the forwarding server in the vehicle diagnostic system is solved, and stable and efficient diagnostic data transmission is achieved.

CN115494819BActive Publication Date: 2025-09-09BEIJING CHJ AUTOMOTIVE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210976109.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-15
Publication Date
2025-09-09
Estimated Expiration
2042-08-15

AI Technical Summary

Technical Problem

In existing vehicle diagnostic systems, due to the limited number of embedded forwarding servers, when multiple diagnostic requests are accessed simultaneously, access conflicts are likely to occur, resulting in an unstable diagnostic process.

Method used

By setting up a processing queue in the vehicle, diagnostic requests are received and sorted, and sent to the forwarding server in sequence, session management and logical address matching are used to avoid sending multiple requests at the same time, thereby improving the utilization rate of the forwarding server.

Benefits of technology

It effectively avoids access conflicts, improves the stability and efficiency of the vehicle diagnosis process, and ensures timely feedback of diagnostic data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115494819B_ABST
    Figure CN115494819B_ABST
Patent Text Reader

Abstract

The present application discloses a vehicle diagnostic method, diagnostic apparatus, diagnostic equipment, medium, and vehicle. The method is applied to a vehicle, and the vehicle includes a communicably connected processor, a forwarding server, and multiple electronic controllers. The method includes: receiving at least one diagnostic request sent by an electronic device; writing the diagnostic request into a processing queue in response to the diagnostic request; sending the diagnostic requests in the processing queue to the forwarding server in sequence, so that the forwarding server sends the diagnostic request to the electronic controller; receiving diagnostic data sent by the forwarding server, and feeding the diagnostic data back to the electronic device. The diagnostic data is generated by the electronic controller based on the received diagnostic request and sent to the forwarding server. The data processor feeds the diagnostic data back to the electronic device. The vehicle diagnostic method can simultaneously receive access to multiple diagnostic requests, thereby improving the stability of the vehicle diagnostic process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of communication technology, and specifically relates to a vehicle diagnostic method, diagnostic device, diagnostic equipment, medium and vehicle. Background Art

[0002] With the increasing intelligence of existing vehicles, more and more diagnostic requests need to access electronic controllers through forwarding servers at the same time or at different times. However, due to the limited number of embedded forwarding servers, when the diagnostic requests received by the vehicle at the same time reach the processing limit of the forwarding server, it often causes access conflicts of diagnostic requests to the forwarding server, thereby affecting the progress of vehicle diagnosis, making some diagnostic requests unable to obtain corresponding diagnostic data in a timely manner, resulting in low stability of the vehicle diagnosis process. Summary of the Invention

[0003] The purpose of the embodiments of the present application is to provide a vehicle diagnostic method, diagnostic device, diagnostic equipment and medium and vehicle, which can receive access to multiple diagnostic requests and improve the stability of the vehicle diagnostic process.

[0004] In a first aspect, an embodiment of the present application provides a vehicle diagnostic method, which is applied to a vehicle, wherein the vehicle includes a communicably connected processor, a forwarding server, and multiple electronic controllers, and is characterized in that the method includes:

[0005] receiving at least one diagnostic request sent by an electronic device;

[0006] In response to the diagnosis request, writing the diagnosis request into a processing queue;

[0007] The diagnostic requests in the processing queue are sequentially sent to the forwarding server, so that the forwarding server sends the diagnostic requests to the electronic controller;

[0008] Receive diagnostic data sent by the forwarding server and feed the diagnostic data back to the electronic device. The diagnostic data is data generated by the electronic controller according to the received diagnostic request and sent to the forwarding server.

[0009] According to an implementation of the first aspect of the present application, in response to a diagnostic request, writing the diagnostic request into a processing queue includes:

[0010] In response to a diagnostic request, the diagnostic request is written into a processing queue according to a receiving logical address and a forwarding logical address, and the diagnostic requests in the same processing queue have the same receiving logical address and forwarding logical address, wherein the diagnostic request includes a receiving logical address corresponding to the electronic controller and a forwarding logical address corresponding to the forwarding server.

[0011] According to an implementation of the first aspect of the present application, writing the diagnostic request into the processing queue according to the receiving logical address and the forwarding logical address includes:

[0012] If there is a session corresponding to the forwarding logical address carried by the diagnostic request, write the diagnostic request into the session corresponding to the same forwarding logical address, and write the diagnostic request into the processing queue corresponding to the same receiving logical address;

[0013] If there is no session corresponding to the forwarding logical address carried by the diagnostic request, a new session is established, the diagnostic request is written into the new session, and a processing queue corresponding to the receiving logical address carried by the diagnostic request is established.

[0014] According to an embodiment of the first aspect of the present application, the diagnostic requests in the processing queue are sequentially sent to the forwarding server, so that the forwarding server sends the diagnostic requests to the electronic controller, including:

[0015] According to the forwarding logical address carried by the diagnostic request in the first session and the order of writing time of each diagnostic request in the first session, one diagnostic request in each processing queue in the first session is sent to the first forwarding server based on the same communication connection, so that the first forwarding server sends the diagnostic request to the electronic controller according to the receiving logical address carried by each diagnostic request.

[0016] The session includes a first session, the first session includes multiple processing queues, and the forwarding server includes a first forwarding server.

[0017] According to an implementation of the first aspect of the present application, based on the forwarding logical address carried by the diagnostic request in the first session and the order of writing time of each diagnostic request in the first session, after sending a diagnostic request in each processing queue in the first session to the first forwarding server based on the same communication connection, the method includes:

[0018] When diagnostic data regarding a first diagnostic request is received, or when processing of the first diagnostic request times out, the first diagnostic request is deleted from a first processing queue, and a second diagnostic request written in the first processing queue after the first diagnostic request is sent to a forwarding service end. The processing queue includes a first processing queue, and the first diagnostic request and the second diagnostic request are stored in the first processing queue.

[0019] According to an implementation of the first aspect of the present application, before the diagnostic requests in the processing queue are sequentially sent to the forwarding server, the method further includes:

[0020] When the reference count of the second session is 0, the communication connection between the second session and the forwarding server is disconnected, and the session includes the second session; when the reference count of the second session is 1, the communication connection between the second session and the forwarding server is established.

[0021] According to an implementation of the first aspect of the present application, in response to a diagnostic request, writing the diagnostic request into a processing queue includes:

[0022] In response to the diagnostic request, allocating a service port for the diagnostic request and setting the service port to a blocked state;

[0023] Write the diagnostic request to the processing queue;

[0024] After receiving the diagnostic data sent by the electronic controller and feeding the diagnostic data back to the electronic device, the method further includes:

[0025] The communication connection between the service port and the electronic device is disconnected to release the blocked state of the service port.

[0026] According to an embodiment of the first aspect of the present application, the diagnostic requests in the processing queue are sequentially sent to the forwarding server, so that the forwarding server sends the diagnostic requests to the electronic controller, including:

[0027] The diagnostic requests in the processing queue are sequentially sent to the forwarding server based on the DoIP protocol, so that the forwarding server sends the diagnostic requests to the electronic controller based on the DoCAN protocol.

[0028] In a second aspect, an embodiment of the present application provides a vehicle diagnostic device, comprising:

[0029] a communication module, configured to receive at least one diagnostic request sent by an electronic device;

[0030] a writing module, configured to write the diagnosis request into the processing queue in response to the diagnosis request;

[0031] a communication module for sequentially sending the diagnostic requests in the processing queue to the electronic controller via the forwarding server;

[0032] The communication module is also used to receive diagnostic data sent by the forwarding server and feed the diagnostic data back to the electronic device. The diagnostic data is data generated by the electronic controller according to the received diagnostic request and sent to the forwarding server.

[0033] In a third aspect, an embodiment of the present application provides a diagnostic device comprising a processor, a memory, and a program or instruction stored in the memory and executable on the processor. When the program or instruction is executed by the processor, the steps of the vehicle diagnostic method provided in the second aspect are implemented.

[0034] In a fourth aspect, an embodiment of the present application provides a readable storage medium, characterized in that a program or instruction is stored on the readable storage medium, and when the program or instruction is executed by a processor, the steps of the vehicle diagnostic method provided in the second aspect are implemented.

[0035] In a fifth aspect, an embodiment of the present application provides a vehicle, comprising: a diagnostic device as provided in the second aspect, or a diagnostic equipment as provided in the third aspect.

[0036] In the vehicle diagnostic method provided in this embodiment, by writing the received diagnostic requests into the processing queue, the forwarding server can temporarily receive multiple diagnostic requests at the same time, and there is sufficient time to send the multiple diagnostic requests in the processing queue to the electronic controller through the forwarding server in sequence, thereby avoiding to a certain extent the access conflict caused by multiple diagnostic requests being sent to one forwarding server at the same time, and improving the stability of the vehicle diagnostic process. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 is a structural diagram of a vehicle diagnostic device provided by an embodiment of the present application;

[0038] Figure 2 This is a flow chart of a vehicle diagnostic method provided by one embodiment of the present application;

[0039] Figure 3 is a structural diagram of a vehicle diagnostic device provided by an embodiment of the present application;

[0040] Figure 4 This is a partial flow chart of a vehicle diagnostic method provided by one embodiment of the present application;

[0041] Figure 5 This is a flow chart of a vehicle diagnostic method provided by one embodiment of the present application;

[0042] Figure 6 It is a structural diagram of a vehicle diagnostic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0043] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features therein can be combined with each other in the absence of conflict.

[0044] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0045] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprises" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article or device. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device that includes the element.

[0046] The vehicle diagnostic method provided in the embodiment of the present application is described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.

[0047] like Figure 1 and Figure 2 As shown, an embodiment of the present application provides a vehicle diagnostic method, which is applied to a vehicle, wherein the vehicle includes a communicatively connected processor, a forwarding server, and multiple electronic controllers.

[0048] The electronic device can be connected to the processor in a wireless or wired manner. The electronic device can be any suitable terminal device that runs an intelligent operating system and has vehicle diagnostic functions, such as a mobile phone, a tablet computer, a tester, an on-board diagnostic terminal, etc. The electronic device can be set independently of the vehicle, such as a mobile phone, a tester. The electronic device can also be set in the vehicle, such as a vehicle starting system, a vehicle self-test system, etc. The user (for example, the owner of the car, etc.) can interact with the electronic device through any suitable, one or more user interaction devices (such as a touch screen, a mouse, a keyboard, a remote control, a somatosensory camera, and an audio acquisition device, etc.), input instructions or control the electronic device to perform one or more operations. Any type of client software can be installed on the electronic device, such as a vehicle diagnostic APP, which communicates with the processor through the client software, so that instructions can be sent to the processor or data can be obtained.

[0049] A processor, a forwarding server, and multiple electronic controllers are all located in a vehicle, which can be a car, tram, train, truck, or the like. The processor can connect to an electronic control unit (ECU) via a forwarding server to retrieve diagnostic data from the ECU or transmit instructions to the ECU. The forwarding server is used to forward received diagnostic requests to the corresponding ECU. The forwarding server can also be used to convert between different communication protocols; that is, the communication protocols used between the processor and the forwarding server, and between the forwarding server and the ECU, can be different. The ECU is used to control the vehicle's driving state and perform its various functions. It primarily utilizes data collection and exchange from various sensors and buses to determine vehicle status and user intent, and to control the vehicle through actuators. For example, common ECUs include a BMS (Battery Management System) and an ESP (Electronic Stability Program). The diagnostic data corresponding to the BMS may include operating voltage, charging current, and battery level.

[0050] The vehicle diagnostic method provided by this application may include:

[0051] S101, receiving at least one diagnostic request sent by an electronic device;

[0052] A diagnostic request is a user's request to obtain vehicle data. The diagnostic request may carry a diagnostic identifier, for example, to obtain diagnostic data of the corresponding electronic control unit through the diagnostic identifier. The electronic device is capable of receiving or transmitting diagnostic requests, for example, the electronic device receives a diagnostic request from a user, or transmits a diagnostic request sent by another terminal. In actual applications, when a vehicle needs to be diagnosed, the electronic device can first be communicatively connected to the processor. Then, the user inputs a diagnostic request related to the vehicle through the electronic device, and the user instructs the electronic device to send the diagnostic request to the processor for vehicle diagnosis.

[0053] The processor may include a communication unit, in which multiple service ports may be provided, so that the processor can simultaneously communicate with multiple electronic devices and simultaneously receive multiple diagnostic requests from one electronic device or multiple electronic devices. The vehicle diagnostic method provided in this application may be executed by the processor.

[0054] S102, in response to the diagnosis request, writing the diagnosis request into a processing queue;

[0055] Writing a diagnostic request into a processing queue can be understood as creating a new task for the diagnostic request and adding the task to the processing queue. All diagnostic requests can be written into the same processing queue, and then the diagnostic requests in the processing queue can be forwarded sequentially to the corresponding forwarding server through the processor. It is also possible to classify each diagnostic request according to its characteristic information, and then write it into multiple processing queues according to the classification results. The characteristic information can specifically include the address information of the forwarding server to which the diagnostic request is to be sent, the address information of the electronic controller to which the diagnostic request is to be sent, the diagnostic identifier carried by the diagnostic request, the sending time of the diagnostic request, the receiving time of the processor receiving the diagnostic request, etc. For example, multiple diagnostic requests corresponding to the same forwarding server can be written into the same processing queue. Each processing queue can process the sending of diagnostic requests, the receiving of diagnostic data, etc. in a single thread in sequence.

[0056] S103, sending the diagnostic requests in the processing queue to the forwarding server in sequence, so that the forwarding server sends the diagnostic requests to the electronic controller;

[0057] S104, receiving diagnostic data sent by the forwarding server, and feeding back the diagnostic data to the electronic device, wherein the diagnostic data is data generated by the electronic controller according to the received diagnostic request and sent to the forwarding server.

[0058] The processor sequentially reads diagnostic requests from the processing queue and sends them to the forwarding server. The forwarding server can directly forward the diagnostic requests to the corresponding electronic controller, or convert the diagnostic requests into a format before forwarding them to the electronic controller, allowing the electronic controller to provide corresponding diagnostic data. The forwarding server can send diagnostic requests corresponding to different electronic controllers to different electronic controllers, thereby improving the efficiency of diagnostic request processing.

[0059] For example, diagnostic requests and diagnostic data are transmitted between the processor and the forwarding server based on the DoIP (Diagnostic communication over Internet Protocol) protocol, that is, the processor can send the diagnostic requests in the processing queue to the forwarding server in sequence based on the DoIP protocol, and similarly, the forwarding server can send the diagnostic data corresponding to the diagnostic request to the processor based on the DoIP protocol. Diagnostic requests and diagnostic data are transmitted between the forwarding server and the electronic controller based on the DoCAN protocol, that is, the forwarding server can send the diagnostic request to the electronic controller based on the DoCAN protocol, and similarly, the processor can send the diagnostic data corresponding to the diagnostic request to the forwarding server based on the DoCAN protocol. The forwarding server can convert the diagnostic request based on the DoIP protocol into a diagnostic request based on the CAN protocol, and can also convert the diagnostic data based on the CAN protocol into diagnostic data based on the DoIP protocol. This can realize the conversion of diagnostic requests and diagnostic data from Ethernet to CAN bus and from CAN bus to Ethernet.

[0060] In the vehicle diagnostic method provided in this embodiment, by writing received diagnostic requests into a processing queue, the forwarding server can temporarily receive multiple diagnostic requests simultaneously, allowing ample time to sequentially send multiple diagnostic requests in the processing queue to the electronic controller via the forwarding server. This, to a certain extent, avoids access conflicts caused by multiple diagnostic requests being sent simultaneously to a single forwarding server, thereby improving the stability of the vehicle diagnostic process. By sequentially sending diagnostic requests in the processing queue to the corresponding electronic controllers via the forwarding server, a single forwarding server can send diagnostic requests corresponding to different electronic controllers to each of them, thereby improving the efficiency of diagnostic request processing.

[0061] In some embodiments, the diagnostic request includes a receiving logical address corresponding to the electronic controller and a forwarding logical address corresponding to the forwarding server.

[0062] The receiving logical address in the diagnostic request can be used to determine the electronic controller to which the diagnostic request is to be sent; the forwarding logical address in the diagnostic request can be used to determine the forwarding server to which the diagnostic request is to be sent. Of course, the diagnostic request can also include a sending logical address corresponding to the electronic device, so that after receiving the diagnostic data, the processor can determine the electronic device to which the feedback is to be sent based on the sending logical address.

[0063] In some embodiments, S102 includes:

[0064] S301, in response to a diagnostic request, write the diagnostic request into a processing queue according to a receiving logical address and a forwarding logical address, wherein the diagnostic requests in the same processing queue have the same receiving logical address and forwarding logical address, wherein the diagnostic request includes a receiving logical address corresponding to the electronic controller and a forwarding logical address corresponding to the forwarding server.

[0065] In order to avoid arranging too many diagnostic requests in one processing queue, each diagnostic request can be written into multiple processing queues according to the receiving logical address and the forwarding logical address, so that each processing queue corresponds to the same forwarding server and the same electronic controller. Multiple processing queues can communicate with multiple electronic controllers through one or more forwarding servers respectively, thereby improving the processing efficiency of multiple diagnostic requests.

[0066] See also Figure 3 and Figure 4 In some embodiments, S301 includes:

[0067] S401, if there is a session corresponding to the forwarding logical address carried by the diagnostic request, write the diagnostic request to the session corresponding to the same forwarding logical address, and write the diagnostic request to the processing queue corresponding to the same receiving logical address;

[0068] S402 : If there is no session corresponding to the forwarding logical address carried by the diagnosis request, a new session is established, the diagnosis request is written into the new session, and a processing queue corresponding to the receiving logical address carried by the diagnosis request is established.

[0069] The processor can be configured with a session management unit to manage session creation and closure. One or more sessions can be created within the session management unit, with each session corresponding to a forwarding server. Within a session, one or more processing queues can be configured, with each processing queue corresponding to an electronic controller. Creating sessions facilitates the management of various diagnostic requests.

[0070] If a session corresponding to forwarding logical address A1 has already been established in the processor, then upon receiving a diagnostic request carrying forwarding logical address A1, the diagnostic request is directly written into the session. Of course, if a processing queue B1 corresponding to receiving logical address B1 already exists in the session, the diagnostic request is directly written into the processing queue B1 of the session; otherwise, a new processing queue B1 is established in the session.

[0071] When no session corresponding to the forwarding logical address A1 is created in the processor, when a diagnostic request carrying the forwarding logical address A1 is received, a new session A1 is constructed to correspond to the forwarding logical address A1, and a new processing queue B1 is constructed in the session to correspond to the receiving logical address B1 of the diagnostic request.

[0072] In the related art, a forwarding server and an electronic controller based on the DoCAN protocol communicate in a question-and-answer manner. That is, after the forwarding server sends a diagnostic request to an electronic controller, if it does not receive diagnostic data fed back by the electronic controller, the forwarding server will not send a new diagnostic request to the electronic controller. Therefore, in order to improve the utilization rate of each forwarding server, in some embodiments, S102 includes:

[0073] S112, according to the forwarding logical address carried by the diagnostic request in the first session and the order of the writing time of each diagnostic request in the first session, send one diagnostic request in each processing queue in the first session to the first forwarding server based on the same communication connection, so that the first forwarding server sends the diagnostic request to the electronic controller according to the receiving logical address carried by each diagnostic request, wherein the session includes the first session, the first session includes multiple processing queues, and the forwarding server includes the first forwarding service;.

[0074] In the aforementioned embodiment, multiple electronic controllers are assigned to a single forwarding server, and diagnostic requests for the same forwarding server are arranged in the same session. This allows diagnostic requests within the same session to be sent to the forwarding server via a single communication connection. In this case, diagnostic requests in multiple processing queues can be sent to the forwarding server via the same TCP connection in a time-sharing manner, thereby reducing the number of forwarding server configurations.

[0075] It will be understood by those skilled in the art that after a new session component is completed, a communication connection needs to be established between the new session and the corresponding forwarding server. Therefore, in some embodiments, before S103, the method further includes:

[0076] S106, when the reference count of the second session is 0, disconnect the communication connection between the second session and the forwarding server, where the session includes the second session;

[0077] S107: When the reference count of the second session is 1, a communication connection between the second session and the forwarding server is established.

[0078] The second session can be any one of multiple sessions, and the reference count of the second session represents the number of times the session is referenced, specifically the number of times the service port in the processor that receives each diagnostic request applies the session. Whenever a service port receives a new diagnostic request, the processor writes the diagnostic request into the processing queue, and the reference count of the session increases by 1 value. Each time a diagnostic request is completed, the diagnostic request is deleted from the processing queue, a service port disconnects from the electronic device that sent the diagnostic request, and the reference count of the session decreases by 1 value. Optionally, when the reference count is 0, deinitialization is performed, and the session automatically calls the Close interface to disconnect the connection between the second session and the forwarding server to clean up resources; when the reference count is 1, initialization is performed to establish a connection between the second session and the forwarding server. When the count is a positive integer other than 1, the connection between the session and the forwarding server remains unchanged.

[0079] In some embodiments, S112 includes:

[0080] When diagnostic data regarding a first diagnostic request is received, or when processing of the first diagnostic request times out, the first diagnostic request is deleted from a first processing queue, and a second diagnostic request written in the first processing queue after the first diagnostic request is sent to a forwarding service end. The processing queue includes a first processing queue, and the first diagnostic request and the second diagnostic request are stored in the first processing queue.

[0081] Those skilled in the art will appreciate that when the processor receives diagnostic data corresponding to a diagnostic request, it indicates that the diagnostic data has been fed back to the corresponding electronic device, i.e., the diagnostic request has been completed, at which point the diagnostic request can be deleted from the processing queue. A preset time can also be set. After a diagnostic request is sent to a forwarding server, if no diagnostic data is received from the forwarding server within the preset time, the processing of the diagnostic request is considered to have timed out. At this point, a processing timeout feedback message can be generated to the electronic device, indicating that the diagnostic request has been completed, and the diagnostic request can be deleted from the processing queue. At this point, a new task can also be created based on the diagnostic request, and the new task can be written to the processing queue, deleting the task corresponding to the original diagnostic request.

[0082] See also Figure 5 In some embodiments, S102 includes:

[0083] S501, in response to a diagnostic request, allocating a service port for the diagnostic request and setting the service port to a blocked state;

[0084] S502, writing the diagnosis request into the processing queue;

[0085] After S104, the method further includes:

[0086] S503: disconnect the communication connection between the service port and the electronic device, and release the blocking state of the service port.

[0087] By setting the service port to a blocking state through the processor, the service port can be blocked during the process of each diagnostic request being sent to the corresponding electronic controller through the service port. That is, after a service port receives a diagnostic request, it only serves the diagnostic request before feeding back the diagnostic data corresponding to the diagnostic request, thereby improving the stability of the vehicle diagnostic process.

[0088] A second embodiment of the present invention provides a vehicle diagnostic device, such as Figure 6 As shown, the vehicle diagnostic device may include:

[0089] The communication module 61 is configured to receive at least one diagnostic request sent by an electronic device;

[0090] a writing module 62 for writing the diagnostic request into the processing queue in response to the diagnostic request;

[0091] The communication module 61 is used to sequentially send the diagnostic requests in the processing queue to the forwarding server, so that the forwarding server sends the diagnostic requests to the electronic controller;

[0092] The communication module 61 is also used to receive diagnostic data sent by the forwarding server and feed the diagnostic data back to the electronic device. The diagnostic data is data generated by the electronic controller according to the received diagnostic request and sent to the forwarding server.

[0093] In an optional embodiment, the writing module 62 is also used to respond to the diagnostic request and write the diagnostic request into the processing queue according to the receiving logical address and the forwarding logical address. The diagnostic requests in the same processing queue have the same receiving logical address and the forwarding logical address, wherein the diagnostic request includes the receiving logical address corresponding to the electronic controller and the forwarding logical address corresponding to the forwarding server.

[0094] In an optional embodiment, the writing module 62 is further configured to, if a session corresponding to the forwarding logical address carried by the diagnostic request exists, write the diagnostic request into the session corresponding to the same forwarding logical address, and write the diagnostic request into the processing queue corresponding to the same receiving logical address;

[0095] The writing module 62 is also used to, when there is no session corresponding to the forwarding logical address carried by the diagnostic request, cause the processor to build a new session, write the diagnostic request into the new session, and build a processing queue corresponding to the receiving logical address carried by the diagnostic request.

[0096] In an optional embodiment, the communication module 61 is also used to send a diagnostic request in each processing queue in the first session to the first forwarding server based on the same communication connection according to the forwarding logical address carried by the diagnostic request in the first session and the order of the writing time of each diagnostic request in the first session. The first forwarding server is also used to send the diagnostic request to the electronic controller according to the receiving logical address carried by each diagnostic request, wherein the session includes the first session, the first session includes multiple processing queues, and the forwarding server includes the first forwarding server.

[0097] In an optional embodiment, the writing module 62 is also used to delete the first diagnostic request from the first processing queue when diagnostic data about the first diagnostic request is received or when processing of the first diagnostic request times out, and send the second diagnostic request in the first processing queue whose writing time is after the first diagnostic request to the forwarding service end, and the first processing queue stores the first diagnostic request and the second diagnostic request.

[0098] In an optional embodiment, when the reference count of the second session is 0, the communication module 61 is further configured to disconnect the communication connection between the second session and the forwarding server, the session including the second session;

[0099] When the reference count of the second session is 1, the communication module 61 is further configured to establish a communication connection between the second session and the forwarding server.

[0100] In an optional embodiment, the communication module 61 is further configured to, in response to the diagnostic request, allocate a service port for the diagnostic request and set the service port to a blocked state;

[0101] The writing module 62 is further used to write the diagnostic request into the processing queue;

[0102] The communication module 61 is further used to disconnect the communication connection between the service port and the electronic device, thereby releasing the blocking state of the service port.

[0103] In an optional embodiment, the diagnostic requests in the processing queue are sequentially sent to the forwarding server based on the DoIP protocol, so that the forwarding server is also used to send the diagnostic requests to the electronic controller based on the DoCAN protocol.

[0104] A third aspect of the present invention provides a diagnostic device comprising a processor, a memory, and a program or instruction stored in the memory and executable by the processor. When executed by the processor and / or an electronic controller, the program or instruction implements the steps of the vehicle diagnostic method provided in the first aspect. This diagnostic device achieves the same technical effects and, to avoid repetition, is not described here in detail.

[0105] A fourth aspect of the present invention provides a storage medium having a computer program stored thereon. When executed by a processor, the program implements the steps of the vehicle diagnostic method provided in the first aspect. This storage medium can achieve the same technical effects and, to avoid repetition, will not be described here.

[0106] A fifth aspect of the present invention further provides a vehicle comprising the diagnostic apparatus provided in the second aspect or the diagnostic device provided in the third aspect. The vehicle can achieve the same technical effects and will not be described in detail here to avoid repetition.

[0107] It should be understood that the above-described specific embodiments of the present invention are merely illustrative or illustrative of the principles of the present invention and do not constitute limitations of the present invention. Therefore, any modifications, equivalent substitutions, improvements, etc. made without departing from the spirit and scope of the present invention should be included within the scope of protection of the present invention. In addition, the appended claims are intended to cover all variations and modifications that fall within the scope and metes and bounds of the appended claims, or equivalents thereof.

[0108] It should also be noted that the exemplary embodiments described herein describe methods or systems based on a series of steps or devices. However, the present invention is not limited to the order of the steps described above. In other words, the steps may be performed in the order described in the embodiments, or in a different order, or several steps may be performed simultaneously.

[0109] Aspects of the present disclosure have been described above with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor or a field programmable logic circuit. It is also understood that each box in the block diagram and / or flowchart and the combination of the boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.

[0110] The above description is only a specific embodiment of the present invention. Those skilled in the art will clearly understand that for the convenience and brevity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present invention is not limited to this. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention.

Claims

1. A vehicle diagnostic method, the method being applied to a vehicle comprising a communicably connected processor, a plurality of forwarding service terminals, and a plurality of electronic controllers, characterized in that: The method comprises: receiving at least one diagnostic request sent by an electronic device, the diagnostic request including a receiving logical address corresponding to the electronic controller and a forwarding logical address corresponding to the forwarding server; In response to the diagnostic request, writing the diagnostic request into a processing queue; sending the diagnostic requests in the processing queue to the forwarding server in sequence, so that the forwarding server sends the diagnostic requests to the electronic controller; receiving diagnostic data sent by the forwarding server and feeding the diagnostic data back to the electronic device, wherein the diagnostic data is data generated by the electronic controller according to the received diagnostic request and sent to the forwarding server; The step of writing the diagnostic request into a processing queue in response to the diagnostic request comprises: In response to the diagnostic request, write the diagnostic request into a processing queue of a session according to the receiving logical address and the forwarding logical address, wherein the diagnostic requests in the same processing queue have the same receiving logical address and the forwarding logical address, and the diagnostic requests in the same session have the same forwarding logical address; The sending the diagnostic requests in the processing queue to the forwarding server in sequence includes: According to the forwarding logical address carried by the diagnostic request, the diagnostic requests in each processing queue in the same session are sent to the forwarding server, so that the forwarding server sends the diagnostic request to the electronic controller according to the receiving logical address carried by each diagnostic request.

2. The vehicle diagnostic method according to claim 1, wherein: Writing the diagnostic request into a processing queue of a session according to the receiving logical address and the forwarding logical address includes: If there is a session corresponding to the forwarding logical address carried by the diagnostic request, write the diagnostic request into the session corresponding to the same forwarding logical address, and write the diagnostic request into the processing queue corresponding to the same receiving logical address; In the case that there is no session corresponding to the forwarding logical address carried by the diagnostic request, a new session is constructed, the diagnostic request is written into the new session, and the processing queue corresponding to the receiving logical address carried by the diagnostic request is constructed.

3. The vehicle diagnostic method according to claim 2, wherein: The sending the diagnostic requests in the processing queue to the forwarding server in sequence includes: According to the forwarding logical address carried by the diagnostic request in the first session and the order of writing time of each diagnostic request in the first session, respectively send one diagnostic request in each processing queue in the first session to the first forwarding server based on the same communication connection, so that the first forwarding server sends the diagnostic request to the electronic controller according to the receiving logical address carried by each diagnostic request; The session includes the first session, the first session includes a plurality of the processing queues, and the forwarding server includes the first forwarding server.

4. The vehicle diagnostic method according to claim 3, wherein: After sending, based on the forwarding logical address carried by the diagnostic request in the first session and the order of writing time of each diagnostic request in the first session, one diagnostic request in each processing queue in the first session to the first forwarding server based on the same communication connection, the method further includes: When the diagnostic data regarding the first diagnostic request is received, or when the processing of the first diagnostic request times out, the first diagnostic request is deleted from the first processing queue, and the second diagnostic request written in the first processing queue after the first diagnostic request is sent to the forwarding service end, the processing queue includes the first processing queue, and the first processing queue stores the first diagnostic request and the second diagnostic request.

5. The vehicle diagnostic method according to claim 2, wherein: Before sequentially sending the diagnostic requests in the processing queue to the forwarding server, the method further includes: When the reference count of the second session is 0, disconnect the communication connection between the second session and the forwarding server, the session including the second session; When the reference count of the second session is 1, a communication connection between the second session and the forwarding server is established.

6. The vehicle diagnostic method according to claim 1, wherein: The step of writing the diagnostic request into a processing queue in response to the diagnostic request comprises: In response to the diagnostic request, allocating a service port for the diagnostic request and setting the service port to a blocked state; Writing the diagnostic request into a processing queue; After receiving the diagnostic data sent by the electronic controller and feeding the diagnostic data back to the electronic device, the method further includes: The communication connection between the service port and the electronic device is disconnected to release the blocking state of the service port.

7. The vehicle diagnostic method according to claim 1, wherein: The sending the diagnostic requests in the processing queue to the forwarding server in sequence includes: The diagnostic requests in the processing queue are sequentially sent to the forwarding server based on the DoIP protocol, so that the forwarding server sends the diagnostic requests to the electronic controller based on the DoCAN protocol.

8. A vehicle diagnostic device, characterized in that: include: a communication module, configured to receive at least one diagnostic request sent by an electronic device, wherein the diagnostic request includes a receiving logical address corresponding to the electronic controller and a forwarding logical address corresponding to the forwarding server; a writing module, configured to write the diagnostic request into a processing queue in response to the diagnostic request; The communication module is further configured to sequentially send the diagnostic requests in the processing queue to the forwarding server, so that the forwarding server sends the diagnostic requests to the electronic controller; The communication module is further configured to receive diagnostic data sent by the forwarding server and feed the diagnostic data back to the electronic device, wherein the diagnostic data is data generated by the electronic controller according to the received diagnostic request and sent to the forwarding server; The writing module is further configured to respond to the diagnostic request and write the diagnostic request into a processing queue of the session according to the receiving logical address and the forwarding logical address, wherein the diagnostic requests in the same processing queue have the same receiving logical address and the forwarding logical address, and the diagnostic requests in the same session have the same receiving logical address; The communication module is also used to send the diagnostic requests in each processing queue in the same session to the forwarding server according to the forwarding logical address carried by the diagnostic request, so that the forwarding server sends the diagnostic request to the electronic controller according to the receiving logical address carried by each diagnostic request.

9. A diagnostic device, characterized in that The vehicle diagnostic method comprises a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the vehicle diagnostic method according to any one of claims 1 to 7.

10. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the vehicle diagnostic method according to any one of claims 1 to 7 are implemented.

11. A vehicle, characterized in that: include: The diagnostic apparatus according to claim 8, or the diagnostic device according to claim 9.

Citation Information

Patent Citations

  • Mobile communications network management system and method for diagnosing base station veneer

    CN101111044A

  • Vehicle diagnosis method, joint and system

    CN106959682A