Vehicle parallel diagnosis method, device, coordinator, system and medium

By detecting the status of the vehicle diagnosis server and delaying resending of the diagnosis request message, combined with the collision avoidance strategy, the problem of multi-channel parallel diagnosis conflict in the vehicle is solved, and the full-time parallel diagnosis function is improved.

CN115755862BActive Publication Date: 2024-10-11CHONGQING CHANGAN AUTOMOBILE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211511823.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-29
Publication Date
2024-10-11
Estimated Expiration
2042-11-29

AI Technical Summary

Technical Problem

Existing technology cannot realize full-time parallel diagnosis of vehicles in multiple scenarios, resulting in diagnostic conflicts and functional abnormalities, and cannot meet the needs of multi-channel parallel diagnosis.

Method used

It detects the current status of the server after receiving the diagnostic request message, delays and resends the message cyclically until the server completes processing, combines the collision avoidance strategy to avoid diagnostic collisions, and determines the target delay length based on the cumulative number of times to optimize the resend time.

Benefits of technology

It realizes full-time multi-channel parallel diagnosis of vehicles, avoids the situation where diagnostic requests are unresponsive or ignored, and meets the problem of diagnostic conflicts of vehicles in production line electrical inspection, road test, over-the-air upgrade, remote diagnosis and other scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115755862B_ABST
    Figure CN115755862B_ABST
Patent Text Reader

Abstract

The present application relates to the field of vehicle diagnosis technology, and in particular to a vehicle parallel diagnosis method, device, coordinator, system and medium, wherein the method comprises: receiving a diagnosis request message sent by any client; after receiving the diagnosis request message, detecting the current diagnosis state of the diagnosis server, wherein the current diagnosis state includes a completed state and an uncompleted state; when the current diagnosis state is a completed state, forwarding the diagnosis request message to the diagnosis server through the target routing controller, otherwise controlling any client to resend the diagnosis request message after the target delay time, until the diagnosis server is in the completed state, forwarding the diagnosis request message to the diagnosis server through the target routing controller to process the diagnosis request message. Thus, the problem of diagnosis conflicts in various scenarios where parallel diagnosis may occur, such as production line electrical inspection, road test, over-the-air upgrade, remote diagnosis, etc., is solved, so as to realize multi-channel parallel diagnosis in a true sense.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of vehicle diagnosis technology, and in particular to a vehicle parallel diagnosis method, device, coordinator, system and medium. Background Art

[0002] At present, with the increasing complexity of vehicle intelligent systems, the scenarios of multi-channel parallel diagnosis are gradually increasing, the problem of diagnostic conflicts is becoming increasingly prominent, and the demand for parallel diagnosis is constantly increasing.

[0003] In the related art, the solution to parallel diagnosis is mainly achieved by setting the priority of diagnostic messages of different sub-networks in the gateway device. For example, the gateway is set up with the following settings: the diagnostic message forwarding priority of the diagnostic CAN (Controller Area Network) network (the CAN network where the OBD (On-Board Diagnostics) port is located) is higher than the diagnostic message of the CAN network corresponding to the remote diagnosis. In this way, when local diagnosis and remote diagnosis requests arrive at the same time, the gateway will give priority to forwarding the diagnostic message input by the local OBD port, and will no longer forward the remote diagnostic message. This method can solve the confusion caused by diagnostic collisions, but the disadvantage is that it cannot meet the needs of full-time parallel diagnosis.

[0004] In this way, only the diagnostic messages of one subnetwork can be guaranteed to be valid at the same time, and the diagnostic messages of other subnetworks will not be forwarded. Once there is a periodic diagnostic request in a high-priority subnetwork (such as the 24-hour uninterrupted data collection in the power domain and cockpit domain mentioned above), the gateway can only forward the diagnostic messages of the high-priority subnetwork for a long time, which will cause the diagnostic requests of other subnetworks to eventually time out, and then the client function will be abnormal, and ultimately the parallel diagnostic function cannot be realized. Summary of the invention

[0005] The present application provides a vehicle parallel diagnosis method, device, coordinator, system and storage medium to solve the problems of diagnostic conflicts in various possible parallel diagnosis scenarios such as production line electrical inspection, road test, over-the-air upgrade, remote diagnosis, etc., so as to realize true multi-channel parallel diagnosis.

[0006] The first aspect of the present application provides a parallel diagnosis method for a vehicle, comprising the following steps: receiving a diagnostic request message sent by any client; after receiving the diagnostic request message, detecting the current diagnostic state of the diagnostic server, wherein the current diagnostic state includes a completed state and an uncompleted state; when the current diagnostic state is the completed state, forwarding the diagnostic request message to the diagnostic server through a target routing controller, otherwise controlling the any client to resend the diagnostic request message after a target delay time, until the diagnostic server is in the completed state, forwarding the diagnostic request message to the diagnostic server through the target routing controller to process the diagnostic request message.

[0007] According to the above-mentioned technical means, the embodiment of the present application can delay the diagnostic request message received during the server-side diagnosis and resend it in a loop until the server-side diagnosis is completed, so that the diagnostic collision can be avoided through the collision avoidance strategy, and the situation where the diagnostic request is unresponsive or the diagnostic request is ignored can be effectively avoided. Compared with the diagnostic conflicts in the related technology of vehicles in various possible parallel diagnostic scenarios such as production line electrical inspection, road test, over-the-air upgrade, remote diagnosis, etc., it can truly meet the full-time parallel diagnosis needs of the vehicle and realize full-time multi-channel parallel diagnosis.

[0008] Furthermore, before controlling any client to resend the diagnosis request message after the target delay time, it also includes: obtaining the cumulative number of times the diagnosis request message is resent; and determining the target delay time according to the cumulative number.

[0009] According to the above-mentioned technical means, since the target delay duration is determined based on the number of re-forwardings, the delay duration of each re-forwarding may be different, which can effectively avoid mechanical interval sending, so that the client can delay for a random time and then initiate a diagnostic request again, avoiding diagnostic collisions while reducing the number of transmissions to a certain extent and saving processing resources.

[0010] Further, determining the target delay duration according to the cumulative number of times includes: judging whether the cumulative number of times reaches a preset number of times; when the cumulative number of times is less than or equal to the preset number of times, calculating the target delay duration according to the cumulative number of times, and when the cumulative number of times is equal to the preset number of times, generating a delay queue based on the target delay duration corresponding to each delay; when the cumulative number of times is greater than the preset number of times, randomly obtaining the target delay duration from the delay queue; wherein, the calculation formula of the target delay duration is:

[0011] Target duration = 2 N *ΔT,

[0012] Wherein, N is the cumulative number of times, and ΔT is the preset interval time.

[0013] According to the above-mentioned technical means, if the target delay duration continues to increase with the cumulative number of times, it may cause the request to be ignored or even unable to be responded to. Therefore, when the cumulative number of times reaches a certain value, a delay queue can be generated. The delay duration can be randomly obtained through the delay queue to improve the reliability of delay diagnosis and avoid the situation where the diagnosis request is not responded to or the diagnosis request is ignored.

[0014] Furthermore, the detection of the current diagnostic status of the diagnostic server includes: detecting an actual detection time of the diagnostic server; when the actual detection time is greater than the preset diagnostic time, determining that the current diagnostic status is the completed status; when the actual detection time is less than or equal to the preset diagnostic time, if a response message sent by the detection diagnostic server is received, determining that the current diagnostic status is the completed status, otherwise, determining that the current diagnostic status is the unfinished status.

[0015] According to the above-mentioned technical means, the embodiment of the present application can determine whether the diagnosis of the diagnosis server is completed through the diagnosis time and the response message, and can timely determine the current diagnosis status of the diagnosis server, avoid the situation where the diagnosis service response times out and cannot be determined, and improve the reliability of parallel diagnosis.

[0016] Furthermore, forwarding the diagnostic request message to the diagnostic server also includes: when the actual number of the diagnostic request messages is multiple, obtaining the actual request time of each diagnostic request message; forwarding the diagnostic request message corresponding to the earliest actual request time to the diagnostic server, and updating the current diagnostic status to the unfinished status.

[0017] According to the above-mentioned technical means, when there are multiple diagnostic request messages, the earliest request message is responded to, and other messages are resent after a delay. The collision avoidance strategy can be used to avoid diagnostic collisions, and it can effectively avoid situations where the diagnostic request is not responded to or the diagnostic request is ignored. It can truly meet the vehicle's full-time parallel diagnosis needs and realize full-time multi-channel parallel diagnosis.

[0018] Furthermore, the forwarding of the diagnostic request message corresponding to the earliest actual request time to the diagnostic server includes: when there are multiple diagnostic request messages corresponding to the earliest actual request time, obtaining the actual diagnostic type corresponding to each diagnostic request message; matching the priority of each diagnostic request message according to the actual diagnostic type, and forwarding the diagnostic request message with the highest priority to the diagnostic server.

[0019] According to the above-mentioned technical means, since the diagnosis order cannot be determined according to the request time when multiple diagnostic requests are sent at the same time, the priority can be set according to the importance of the diagnosis, and the diagnosis order at this time can be determined by the priority to avoid the situation where the diagnosis cannot be performed when multiple diagnostic requests are requested at the same time, thereby improving the reliability of the diagnosis.

[0020] The second aspect of the present application provides a parallel diagnostic device for a vehicle, comprising: a receiving module, used to receive a diagnostic request message sent by any client; a detection module, used to detect the current diagnostic state of the diagnostic server after receiving the diagnostic request message, wherein the current diagnostic state includes a completed state and an uncompleted state; a coordination module, used to forward the diagnostic request message to the diagnostic server through a target routing controller when the current diagnostic state is the completed state, otherwise controlling the arbitrary client to resend the diagnostic request message after a target delay time, until the diagnostic server is in the completed state, and forwarding the diagnostic request message to the diagnostic server through the target routing controller to process the diagnostic request message.

[0021] Furthermore, it also includes: a calculation module, which is used to obtain the cumulative number of times the diagnosis request message is resent before controlling any client to resend the diagnosis request message after the target delay time; and determine the target delay time according to the cumulative number.

[0022] Furthermore, the calculation module is further used to: determine whether the cumulative number of times reaches a preset number of times; when the cumulative number of times is less than or equal to the preset number of times, calculate the target delay duration according to the cumulative number of times, and when the cumulative number of times is equal to the preset number of times, generate a delay queue based on the target delay duration corresponding to each delay; when the cumulative number of times is greater than the preset number of times, randomly obtain the target delay duration from the delay queue.

[0023] Furthermore, the target delay duration is calculated as follows:

[0024] Target duration = 2 N *ΔT,

[0025] Wherein, N is the cumulative number of times, and ΔT is the preset interval time.

[0026] Furthermore, the detection module is further used to: detect the actual detection time of the diagnostic server; when the actual detection time is greater than the preset diagnostic time, determine that the current diagnostic state is the completed state; when the actual detection time is less than or equal to the preset diagnostic time, if a response message sent by the detection and diagnosis server is received, determine that the current diagnostic state is the completed state, otherwise, determine that the current diagnostic state is the unfinished state.

[0027] Furthermore, the coordination module is further used to: when the actual number of the diagnostic request messages is multiple, obtain the actual request time of each diagnostic request message; forward the diagnostic request message corresponding to the earliest actual request time to the diagnostic server, and update the current diagnostic status to the unfinished status.

[0028] Furthermore, the coordination module is further used to: when there are multiple diagnostic request messages corresponding to the earliest actual request moment, obtain the actual diagnostic type corresponding to each diagnostic request message; match the priority of each diagnostic request message according to the actual diagnostic type, and forward the diagnostic request message with the highest priority to the diagnostic server.

[0029] The third aspect of the present application provides a diagnostic service coordinator, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the parallel diagnostic method for the vehicle as described in the above embodiment.

[0030] The fourth aspect of the present application provides a parallel diagnostic system for a vehicle, comprising: at least one client for sending a diagnostic request message; a diagnostic server for diagnosing the at least one client in response to the at least one diagnostic request message; and the diagnostic service coordinator described in the above embodiment.

[0031] The fifth aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, which is executed by a processor to implement the parallel diagnosis method for a vehicle as described in the above embodiment.

[0032] Therefore, this application has at least the following beneficial effects:

[0033] The embodiment of the present application can delay the diagnosis request message received during the server diagnosis and resend it in a loop until the server diagnosis is completed, so that the diagnosis collision can be avoided through the collision avoidance strategy, and the situation where the diagnosis request is unresponsive or ignored can be effectively avoided, which can truly meet the full-time parallel diagnosis needs of the vehicle and realize full-time multi-channel parallel diagnosis. In this way, the diagnosis conflicts and other problems that may occur in the vehicle in various parallel diagnosis scenarios such as production line electrical inspection, road test, over-the-air upgrade, remote diagnosis, etc. are solved, so as to realize multi-channel parallel diagnosis in the true sense.

[0034] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0036] Figure 1 A schematic diagram of a first vehicle parallel diagnosis structure provided in the related art;

[0037] Figure 2 A schematic diagram of a second vehicle parallel diagnosis structure provided in the related art;

[0038] Figure 3 A schematic diagram of a conflict of vehicle parallel diagnostic service requests provided according to an embodiment of the present application;

[0039] Figure 4 A schematic diagram of the structure of a vehicle parallel diagnosis system provided according to the first embodiment of the present application;

[0040] Figure 5 A schematic diagram of the structure of a vehicle parallel diagnosis system provided according to a second embodiment of the present application;

[0041] Figure 6 A flowchart of a parallel diagnosis method for a vehicle provided according to an embodiment of the present application;

[0042] Figure 7 A schematic diagram of state transition provided according to an embodiment of the present application;

[0043] Figure 8 A flowchart of processing a diagnostic service request message according to an embodiment of the present application;

[0044] Fig. 9 A process for implementing collision avoidance for a diagnostic service client provided according to an embodiment of the present application;

[0045] Fig.10A flowchart of the vehicle parallel diagnosis system working interaction according to an embodiment of the present application;

[0046] Fig.11 A block diagram of a parallel diagnostic device for a vehicle provided according to an embodiment of the present application;

[0047] Fig.12 It is a schematic diagram of the structure of a diagnostic service coordinator provided according to an embodiment of the present application. DETAILED DESCRIPTION

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

[0049] The current demand for parallel diagnostics is reflected in two major aspects:

[0050] First, solve the current vehicle diagnostic conflict problem. At present, in the environment where OTA (Over-the-Air Technology) is a standard vehicle function, multi-channel parallel diagnostic conflicts are inevitable. Because the whole vehicle OTA needs to implement upgrade-related functions such as ECU version acquisition, installation and flashing based on the diagnostic protocol, and when executing OTA-related functions, there may be a conflict in diagnostic service requests with the diagnostic equipment from the OBD port. For example, the OBD electrical inspection equipment on the production line conflicts with the OTA version collection function, affecting the production rhythm, and the OBD port data acquisition equipment conflicts with OTA during vehicle road tests, and so on. In addition, remote diagnosis has gradually become a standard function of vehicles, and there are also diagnostic conflicts between remote diagnostic modules and OTA and OBD port diagnostic equipment, which leads to abnormal functions of all parties in the diagnostic service request.

[0051] Figure 1 A typical parallel diagnostic structure on the current vehicle is given, including OTA nodes, modules that perform remote diagnosis, diagnostic devices connected from the OBD port, and controllers with message forwarding and routing functions. The current controllers may be domain controllers such as gateways, BDCs, and VIUs. The target controller that responds to diagnostic service requests is called the diagnostic server. The OTA node, remote diagnostic module, and OBD port diagnostic device are the initiators of diagnostic service requests and are called diagnostic clients. Among them, the diagnostic client is not limited to these three, and it may be any controller.

[0052] Figure 2 A typical parallel diagnosis structure on current vehicles is given. Figure 1 In the star network topology, Figure 2For ring network topology, both structures are typical network structures on current vehicles. Figure 1 still Figure 2 ,The logical relationship among the diagnostic client, the diagnostic ,distribution router and the diagnostic server is consistent: the client initiates the diagnostic ,service request, the distribution controller distributes the routing diagnostic ,service request, and the server executes the diagnostic service and responds to the client ,service execution results.

[0053] The diagnostic client may initiate a diagnostic service request independently, that is, the three may initiate a diagnostic service request at the same time or in a short time interval. At this time, the diagnostic distribution router will forward all three requests to the diagnostic server. At this time, the three diagnostic requests may cause a diagnostic conflict (also called a diagnostic collision) at the diagnostic server. For example, Figure 3 The diagnosis collision of the embodiment of the present application includes two scenarios:

[0054] 1. When the diagnostic server is processing a request and has not yet completed the response to the client, another diagnostic request arrives. The server will ignore the new request, causing the new request to be discarded and the client diagnostic function corresponding to the request to be abnormal;

[0055] 2. When the diagnostic server receives a diagnostic request but has not yet entered the service processing flow, a new request arrives and the server will discard the old request and execute the latest service request, causing the old request to be discarded and the corresponding client diagnostic function to be abnormal.

[0056] Second, the business need for parallel collection of multi-channel diagnostic data. Typically, in the vehicle R&D experimental stage, diagnostic data from different domains of the vehicle (body domain, driving domain, power domain, cockpit domain, etc.) may be collected and monitored in parallel through different paths, and most of these collection methods need to be implemented based on diagnostic protocols. For example, the current power domain experimental data needs to be collected by plugging professional equipment into the OBD port, and the equipment needs to remain plugged in and online during the entire road test; at this time, some data in the body domain needs to be monitored 24 hours a day through remote diagnosis; in business, the data collection of these two domains may access the same controller, so there is a high probability of diagnostic collision.

[0057] To this end, the embodiment of the present application starts from the design concept of "shared resource random system" and proposes a vehicle parallel diagnosis solution based on a collision avoidance algorithm to truly meet the full-time parallel diagnosis needs of the vehicle and realize full-time multi-path parallel diagnosis through the "collision-avoidance" method.

[0058] The following will describe the parallel diagnosis method, device, diagnostic device, system and storage medium of the vehicle of the embodiment of the present application with reference to the accompanying drawings. Among them, the executor of the method of the embodiment of the present application is the diagnostic service coordinator, and before explaining the method of the embodiment of the present application, the parallel diagnosis system of the vehicle is briefly introduced, which includes a diagnostic request client, a diagnostic message routing controller, a diagnostic service coordinator software module, and a server that responds to the diagnostic request. Among them, the diagnostic request client includes but is not limited to: OBD port diagnostic equipment, remote diagnostic module, OTA node, etc.; the diagnostic message routing controller has the ability to forward and route diagnostic messages; the diagnostic client sends a diagnostic request, the diagnostic server processes the request, and responds to the client with the processing result.

[0059] The parallel diagnosis system in the embodiment of the present application includes two configurations, namely Figure 4 and Figure 5 The difference between the two configurations lies in the location of the diagnostic service coordinator software module, which can be located in the routing controller or in the controller where the diagnostic service end is located.

[0060] like Figure 4 As shown, the diagnostic client includes an OBD port diagnostic device, a remote diagnostic module and an OTA node; a diagnostic message forwarding and diagnostic message routing controller includes a diagnostic service coordinator software module for managing diagnostic requests, and its functions are: 1. Forwarding and collision management of diagnostic requests; 2. When diagnostic requests collide, respond to the client with a diagnostic busy signal busy; the server is used to process and respond to diagnostic service requests.

[0061] exist Figure 4 In the system shown, the diagnostic request client of the embodiment of the present application independently initiates diagnostic requests, and these requests may arrive at or arrive at the diagnostic message routing controller at a very short time interval. The diagnostic service coordinator software module in the diagnostic message routing controller preferentially forwards the first received diagnostic service request message. Before the first diagnostic service request is processed and completed, other diagnostic service request messages are subsequently received, and the diagnostic service coordinator software module returns a busy signal to the corresponding client. These clients perform a backoff operation according to the backoff algorithm based on the number of times the busy signal is received, and then initiate a diagnostic request again, and so on and so forth, until the diagnostic message routing controller forwards its diagnostic request message, and the client enters the normal diagnostic processing flow.

[0062] like Figure 5As shown, the diagnostic client includes an OBD port diagnostic device, a remote diagnostic module, and an OTA node; the diagnostic message routing controller has diagnostic message forwarding and routing functions; the server includes a diagnostic service processing module, which receives diagnostic requests, executes diagnostic services and responds to diagnostic processing results, and any controller that provides diagnostic services has this processing module, wherein the diagnostic service processing module diagnostic request comes from the diagnostic service coordinator software module, and the responsive diagnostic result is also sent to the diagnostic service coordinator software module.

[0063] exist Figure 5 In the system shown, the diagnostic request client of the embodiment of the present application independently initiates diagnostic requests. These requests may arrive at the diagnostic server at very short time intervals or arrive at the same time. The diagnostic service coordinator software module in the diagnostic server preferentially forwards the first received diagnostic service request message to the diagnostic service processing module inside the ECU for processing. Before the first diagnostic service request is processed, if other diagnostic service request messages are subsequently received, the diagnostic service coordinator software module will return a busy signal to the corresponding client. In this process, the diagnostic message routing controller acts as a node for message routing and does not process the diagnostic message itself. The client performs a backoff operation according to the backoff algorithm based on the number of times the busy signal is received, and then initiates a diagnostic request again, and so on. The cycle continues until the diagnostic message routing controller forwards its diagnostic request message and the client enters the normal diagnostic processing flow.

[0064] Whether Figure 4 The structure is still Figure 5 The structure of parallel diagnosis has three logical roles: diagnosis client, diagnosis service coordinator, and diagnosis server. Figure 6 A vehicle parallel diagnosis method provided in an embodiment of the present application is described.

[0065] Specifically, if Figure 6 As shown, the parallel diagnosis method of the vehicle includes the following steps:

[0066] In step S101, a diagnosis request message sent by any client is received.

[0067] The client may include but is not limited to OBD port diagnostic equipment, remote diagnostic module, OTA node, etc., and no specific limitation is made to this.

[0068] It is understandable that the embodiment of the present application may receive one diagnosis request message at the same time, or may receive multiple diagnosis request messages at the same time.

[0069] In step S102, after receiving the diagnosis request message, the current diagnosis status of the diagnosis server is detected, wherein the current diagnosis status includes a completed status and an uncompleted status.

[0070] As a possible implementation method, the current diagnostic status of the detection diagnosis server includes: detecting the actual detection time of the detection diagnosis server; when the actual detection time is greater than the preset diagnosis time, determining that the current diagnostic status is a completed status; when the actual detection time is less than or equal to the preset diagnosis time, if a response message sent by the detection diagnosis server is received, determining that the current diagnostic status is a completed status, otherwise, determining that the current diagnostic status is an unfinished status.

[0071] The preset diagnosis time can be understood as the standard diagnosis service response time, which can be set or calibrated according to the actual situation and is not specifically limited.

[0072] It is understandable that the criteria for determining whether the current diagnostic service has been processed is as follows:

[0073] 1. After receiving a diagnostic request, the embodiment of the present application sends the request to the diagnostic service processing end. If the server responds to the client request and forwards the response message to the client, it is considered that the current diagnostic service request processing is completed;

[0074] 2. After receiving a diagnostic request, the embodiment of the present application sends the request to the diagnostic service processing end. If the server responds in timeout (exceeds a standard diagnostic service response time), it is considered that the current diagnostic service processing is completed;

[0075] 3. In other cases, the diagnostic service processing is deemed to be incomplete.

[0076] In specific applications, such as Figure 7 As shown in the figure, when no diagnostic request is received, the diagnostic processing coordinator is in the idle state Idle. In this state, the diagnostic processing coordinator will forward any request received. When the diagnostic processing coordinator receives a diagnostic request, but does not receive a response from the diagnostic processing server within a standard diagnostic service response time, the diagnostic processing coordinator is in the busy state Busy. In this state, any diagnostic request received will respond to the client with a Busy signal; when the diagnostic processing coordinator receives a diagnostic request and receives a response from the diagnostic processing server, the diagnostic processing coordinator forwards the diagnostic response to the client, and then the state immediately changes to Idle; when the diagnostic processing coordinator receives a diagnostic request, but does not receive a response from the diagnostic processing server within a standard diagnostic service response time, the diagnostic processing coordinator forwards the diagnostic response to the client, and then the state immediately changes to Idle.

[0077] In step S103, when the current diagnostic state is the completed state, the diagnostic request message is forwarded to the diagnostic server through the target routing controller, otherwise any client is controlled to resend the diagnostic request message after the target delay time, until the diagnostic server is in the completed state, the diagnostic request message is forwarded to the diagnostic server through the target routing controller to process the diagnostic request message.

[0078] It is understandable that if Figure 8 As shown, when the embodiment of the present application receives a diagnostic request message, it determines whether there is a diagnostic request that has not been processed yet. If not, the diagnostic request message is forwarded to the target server, and then the diagnostic service processing status is set to an unfinished state, and then the currently ongoing diagnostic service is waited for to be completed; if there is an unfinished diagnostic service, the response diagnostic request client busy signal is executed; if the current diagnostic service is completed, the diagnostic service processing status is a completed state, otherwise continue to wait for the currently ongoing diagnostic service to be completed.

[0079] In an embodiment of the present application, forwarding a diagnostic request message to a diagnostic server also includes: when the actual number of diagnostic request messages is multiple, obtaining the actual request time of each diagnostic request message; forwarding the diagnostic request message corresponding to the earliest actual request time to the diagnostic server, and updating the current diagnostic status to an unfinished status.

[0080] It can be understood that the embodiment of the present application can respond to the earliest request message when there are multiple diagnostic request messages, and resend other messages after a delay. It can avoid diagnostic collisions through a collision avoidance strategy, and can effectively avoid situations where the diagnostic request is not responded to or the diagnostic request is ignored. It can truly meet the vehicle's full-time parallel diagnosis needs and realize full-time multi-channel parallel diagnosis.

[0081] In an embodiment of the present application, the diagnostic request message corresponding to the earliest actual request time is forwarded to the diagnostic server, including: when there are multiple diagnostic request messages corresponding to the earliest actual request time, obtaining the actual diagnostic type corresponding to each diagnostic request message; matching the priority of each diagnostic request message according to the actual diagnostic type, and forwarding the diagnostic request message with the highest priority to the diagnostic server.

[0082] It is understandable that since the time when multiple diagnostic requests are sent is the same, the diagnostic order cannot be determined based on the request time. Therefore, the priority can be set according to the importance of the diagnosis, and the diagnostic order at this time can be determined by the priority to avoid the situation where the diagnosis cannot be performed when multiple diagnostic requests are requested at the same time, thereby improving the reliability of the diagnosis.

[0083] In the embodiment of the present application, before controlling any client to resend the diagnosis request message after the target delay time, it also includes: obtaining the cumulative number of times the diagnosis request message is resent; and determining the target delay time according to the cumulative number.

[0084] It is understandable that since the target delay duration is determined based on the number of re-forwardings, the delay duration for each re-forwarding may be different, which can effectively avoid mechanical interval sending, so that the client can delay for a random time and then initiate a diagnostic request again, avoiding diagnostic collisions while reducing the number of transmissions to a certain extent and saving processing resources.

[0085] It should be noted that the target delay duration can be determined in various ways in the present embodiment, such as by using the target delay duration calculation formula: target duration = 2 N *ΔT, calculated; for example, random selection can be made through a delayed queue, etc.

[0086] As a possible implementation method, in an embodiment of the present application, the target delay duration is determined based on the cumulative number of times, including: judging whether the cumulative number of times reaches a preset number of times; when the cumulative number of times is less than or equal to the preset number of times, calculating the target delay duration based on the cumulative number of times, and when the cumulative number of times is equal to the preset number of times, generating a delay queue based on the target delay duration corresponding to each delay; when the cumulative number of times is greater than the preset number of times, randomly obtaining the target delay duration from the delay queue.

[0087] The preset number of times can be set according to actual needs and is not specifically limited.

[0088] Specifically, the embodiment of the present application avoids diagnostic collisions through a collision backoff algorithm. The collision backoff operation corresponding to the collision backoff algorithm can be understood as: random time backoff, that is, when a diagnostic collision occurs, the diagnostic client delays for a random time and then initiates a diagnostic request again. Among them, the commonly used time backoff algorithm is mainly the exponential backoff algorithm. In communication networks, the most commonly used exponential backoff algorithm is the binary exponential backoff algorithm. The backoff algorithm of the embodiment of the present application includes any form of time backoff, not limited to exponential backoff. The following will take the binary exponential collision backoff as an example to explain the backoff operation principle of the embodiment of the present application as follows:

[0089] For a diagnostic request client, set the cumulative number of request collisions N received from the diagnostic processing coordinator, that is, the initial value of the number of busy signals N returned by the diagnostic processing coordinator is 0, set the upper limit of N's growth to MAX, MAX must be an integer constant greater than 2, and set the basic backoff time after the first conflict to ΔT. Set a client backoff time queue, which initially has only one element ΔT, represented as [ΔT]. Whenever the client receives a busy signal, N increments by 1. The increment of N has an upper limit of MAX. When N ≥ MAX, N will not increment even if it receives R in response to the busy signal again; then add an element 2 to the queue. N ΔT, the elements in the queue can be expressed as [ΔT, 2ΔT, 4ΔT, …, 2 N ΔT]. After receiving a busy signal, the client randomly selects a time from the backoff time queue for delayed backoff.

[0090] For example, Fig. 9 As shown in FIG. 1 , the process of the diagnostic client performing the backoff operation includes:

[0091] 1. The initial value of the cumulative number of times the client receives the busy signal N is set to 0, and the upper limit of N is set to MAX;

[0092] 2. The client sends a diagnostic service request. If it receives a busy signal in response to R, it executes step 3. Otherwise, it executes the normal diagnostic process.

[0093] 3. Determine whether N has reached the upper limit MAX. If not, N is incremented by 1 and then step 4 is executed. Otherwise, N does not increment and then step 4 is executed.

[0094] 4. From the delay queue [ΔT, 2ΔT, 4ΔT, …, 2 N An element is randomly selected from ΔT] as the backoff delay time;

[0095] 5. Execute delayed retreat, and when the delay ends, return to step 2.

[0096] The parallel diagnosis method of a vehicle will be described below through a specific embodiment. Fig.10 As shown, the details are as follows:

[0097] 1. The client initiates a diagnostic request;

[0098] 2. After receiving the request, the coordinator determines whether there is a diagnostic collision. If yes, it responds to the collision signal busy and goes to step 3, otherwise it goes to step 4;

[0099] 3. The client receives the busy signal, and performs a delay backoff operation. After the delay, it enters step 1;

[0100] 4. The coordinator forwards the diagnostic service request to the corresponding diagnostic service processing end;

[0101] 5. After receiving the request, the diagnostic service processing end processes the request and responds with the processing result;

[0102] 6. The coordinator forwards the processing results to the diagnostic client. At this point, the diagnostic request processing is completed.

[0103] Therefore, the embodiment of the present application can realize the full-time parallel diagnosis function of multiple clients based on the collision avoidance algorithm.

[0104] In specific applications, Figure 4 and Figure 5 Take the structure shown as an example, the details are as follows:

[0105] for Figure 4 The parallel diagnosis method of the embodiment of the present application has the following steps:

[0106] 1. Each client independently initiates a diagnostic service request;

[0107] 2. The diagnostic service coordinator software module in the diagnostic message routing controller forwards the first received diagnostic request message to the target controller. If the diagnostic service coordinator software module receives another diagnostic request before the first diagnostic request is processed, the diagnostic service coordinator software module returns a diagnostic busy signal to the corresponding client;

[0108] 3. After receiving the busy signal returned by the diagnostic service coordinator software module, the client performs a backoff operation and then executes step 1 again;

[0109] for Figure 5 The parallel diagnosis method of the embodiment of the present application has the following steps:

[0110] 1. Each client independently initiates a diagnostic service request;

[0111] 2. The diagnostic service coordinator software module in the target controller forwards the first received diagnostic request to the diagnostic service processing module inside the controller. If the diagnostic service coordinator software module receives another diagnostic request before the first diagnostic request is processed, the diagnostic service coordinator software module returns a diagnostic busy signal to the corresponding client;

[0112] 3. After receiving the busy signal returned by the diagnostic service coordinator software module, the client performs a backoff operation and then executes step 1 again; during the whole process, the diagnostic message routing controller is used for message routing and forwarding.

[0113] According to the parallel diagnosis method for a vehicle proposed in an embodiment of the present application, the diagnostic request message received during the server-side diagnosis is delayed and resent in a loop until the server-side diagnosis is completed, so that diagnostic collisions can be avoided through a collision avoidance strategy, and situations where no response to the diagnostic request or the diagnostic request is ignored can be effectively avoided. Compared with the problems of diagnostic conflicts in various possible parallel diagnosis scenarios such as production line electrical inspection, road test, over-the-air upgrade, remote diagnosis, etc. in related technologies, this method can truly meet the vehicle's full-time parallel diagnosis needs and realize full-time multi-channel parallel diagnosis.

[0114] Next, a parallel diagnosis device for a vehicle according to an embodiment of the present application will be described with reference to the accompanying drawings.

[0115] Fig.11 It is a block diagram of a parallel diagnostic device for a vehicle according to an embodiment of the present application.

[0116] like Fig.11 As shown, the parallel diagnosis device 10 of the vehicle includes: a receiving module 100 , a detection module 200 and a coordination module 300 .

[0117] Among them, the receiving module 100 is used to receive the diagnostic request message sent by any client; the detection module 200 is used to detect the current diagnostic status of the diagnostic server after receiving the diagnostic request message, wherein the current diagnostic status includes a completed status and an uncompleted status; the coordination module 300 is used to forward the diagnostic request message to the diagnostic server through the target routing controller when the current diagnostic status is a completed status, otherwise control any client to resend the diagnostic request message after a target delay time, until the diagnostic server is in a completed status, and forward the diagnostic request message to the diagnostic server through the target routing controller to process the diagnostic request message.

[0118] In the embodiment of the present application, the device 10 of the embodiment of the present application further includes: a calculation module. The calculation module is used to obtain the cumulative number of resending of the diagnosis request message before controlling any client to resend the diagnosis request message after the target delay time; and determine the target delay time according to the cumulative number.

[0119] In an embodiment of the present application, the calculation module is further used to: determine whether the cumulative number of times reaches a preset number of times; when the cumulative number of times is less than or equal to the preset number of times, calculate the target delay duration based on the cumulative number of times, and when the cumulative number of times is equal to the preset number of times, generate a delay queue based on the target delay duration corresponding to each delay; when the cumulative number of times is greater than the preset number of times, randomly obtain the target delay duration from the delay queue.

[0120] In the embodiment of the present application, the calculation formula of the target delay duration is:

[0121] Target duration = 2 N*ΔT,

[0122] Wherein, N is the cumulative number of times, and ΔT is the preset interval time.

[0123] In an embodiment of the present application, the detection module 200 is further used to: detect the actual detection time of the diagnosis server; when the actual detection time is greater than the preset diagnosis time, determine that the current diagnosis state is a completed state; when the actual detection time is less than or equal to the preset diagnosis time, if a response message sent by the detection diagnosis server is received, determine that the current diagnosis state is a completed state, otherwise, determine that the current diagnosis state is an unfinished state.

[0124] In an embodiment of the present application, the coordination module 300 is further used to: when the actual number of diagnostic request messages is multiple, obtain the actual request time of each diagnostic request message; forward the diagnostic request message corresponding to the earliest actual request time to the diagnostic server, and update the current diagnostic status to an unfinished status.

[0125] In an embodiment of the present application, the coordination module 300 is further used to: when there are multiple diagnostic request messages corresponding to the earliest actual request time, obtain the actual diagnostic type corresponding to each diagnostic request message; match the priority of each diagnostic request message according to the actual diagnostic type, and forward the diagnostic request message with the highest priority to the diagnostic server.

[0126] It should be noted that the above explanation of the embodiment of the parallel diagnosis method for a vehicle is also applicable to the parallel diagnosis device for a vehicle in this embodiment, and will not be repeated here.

[0127] According to the parallel diagnosis device for a vehicle proposed in the embodiment of the present application, the diagnosis request message received during the server-side diagnosis is delayed and resent in a loop until the server-side diagnosis is completed, so that diagnosis collisions can be avoided through a collision avoidance strategy, and situations where no response to the diagnosis request or the diagnosis request is ignored can be effectively avoided. Compared with the problems of diagnosis conflicts in various possible parallel diagnosis scenarios such as production line electrical inspection, road test, over-the-air upgrade, remote diagnosis, etc. in related technologies, it can truly meet the vehicle's full-time parallel diagnosis needs and realize full-time multi-channel parallel diagnosis.

[0128] Fig.12 A schematic diagram of the structure of the diagnostic service coordinator provided in an embodiment of the present application. The vehicle may include:

[0129] A memory 1201 , a processor 1202 , and a computer program stored in the memory 1201 and executable on the processor 1202 .

[0130] When the processor 1202 executes the program, the parallel diagnosis method for the vehicle provided in the above embodiment is implemented.

[0131] Furthermore, the diagnostic service coordinator also includes:

[0132] The communication interface 1203 is used for communication between the memory 1201 and the processor 1202 .

[0133] The memory 1201 is used to store computer programs that can be executed on the processor 1202 .

[0134] The memory 1201 may include a high-speed RAM (Random Access Memory) memory, and may also include a non-volatile memory, such as at least one disk memory.

[0135] If the memory 1201, the processor 1202 and the communication interface 1203 are implemented independently, the communication interface 1203, the memory 1201 and the processor 1202 can be connected to each other through a bus and communicate with each other. The bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.12 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0136] Optionally, in a specific implementation, if the memory 1201, the processor 1202 and the communication interface 1203 are integrated on a chip, the memory 1201, the processor 1202 and the communication interface 1203 can communicate with each other through an internal interface.

[0137] The processor 1202 may be a CPU (Central Processing Unit), or an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application.

[0138] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned parallel diagnosis method for a vehicle.

[0139] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms are not necessarily directed to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0140] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0141] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

[0142] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above embodiment, the N steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. If implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit with a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit with a suitable combination of logic gate circuits, a programmable gate array, a field programmable gate array, etc.

[0143] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0144] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in the field can change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A vehicle parallel diagnosis method, characterized in that: The following steps are involved: Receive diagnostic request messages sent by any client; After receiving the diagnosis request message, detecting the current diagnosis status of the diagnosis server, wherein the current diagnosis status includes a completed status and an uncompleted status; and When the current diagnostic state is the completed state, the diagnostic request message is forwarded to the diagnostic server through the target routing controller; otherwise, any client is controlled to resend the diagnostic request message after a target delay time, until the diagnostic server is in the completed state, the diagnostic request message is forwarded to the diagnostic server through the target routing controller to process the diagnostic request message; before controlling any client to resend the diagnostic request message after the target delay time, it also includes: Obtaining the cumulative number of times the diagnosis request message is resent; Determining the target delay duration according to the accumulated number of times; determining the target delay duration according to the accumulated number of times includes: Determining whether the accumulated number of times reaches a preset number of times; When the accumulated number of times is less than or equal to the preset number of times, the target delay duration is calculated according to the accumulated number of times, and when the accumulated number of times is equal to the preset number of times, a delay queue is generated based on the target delay duration corresponding to each delay; When the accumulated number of times is greater than the preset number of times, the target delay duration is randomly obtained from the delay queue; the calculation formula of the target delay duration is: Target duration = 2 N * , Wherein, N is the cumulative number of times, The preset interval duration.

2. The method according to claim 1, characterized in that The current diagnosis status of the detection diagnosis server includes: Detecting the actual detection time of the diagnostic server; When the actual detection time is longer than the preset diagnosis time, determining that the current diagnosis state is the completion state; When the actual detection duration is less than or equal to the preset diagnosis duration, if a response message sent by the detection diagnosis service end is received, the current diagnosis state is determined to be the completed state; otherwise, the current diagnosis state is determined to be the uncompleted state.

3. The method according to any one of claims 1 to 2, characterized in that: The forwarding of the diagnosis request message to the diagnosis service end further includes: When the actual number of the diagnosis request messages is multiple, obtaining the actual request time of each diagnosis request message; The diagnosis request message corresponding to the earliest actual request time is forwarded to the diagnosis service end, and the current diagnosis state is updated to the unfinished state.

4. The method according to claim 3, characterized in that The step of forwarding the diagnosis request message corresponding to the earliest actual request time to the diagnosis server includes: When there are multiple diagnosis request messages corresponding to the earliest actual request time, obtaining the actual diagnosis type corresponding to each diagnosis request message; The priority of each diagnostic request message is matched according to the actual diagnostic type, and the diagnostic request message with the highest priority is forwarded to the diagnostic service end.

5. A parallel diagnostic device for a vehicle, characterized in that: include: A receiving module, used to receive a diagnostic request message sent by any client; a detection module, configured to detect a current diagnosis status of the diagnosis server after receiving the diagnosis request message, wherein the current diagnosis status includes a completed status and an uncompleted status; and A coordination module, used for forwarding the diagnostic request message to the diagnostic server through a target routing controller when the current diagnostic state is the completed state, otherwise controlling any client to resend the diagnostic request message after a target delay time, until the diagnostic server is in the completed state, forwarding the diagnostic request message to the diagnostic server through the target routing controller to process the diagnostic request message; and further comprising: A calculation module is used to obtain the cumulative number of times the diagnosis request message is resent before controlling any client to resend the diagnosis request message after the target delay time; and determine the target delay time according to the cumulative number; the calculation module is further used to: Determining whether the accumulated number of times reaches a preset number of times; When the accumulated number of times is less than or equal to the preset number of times, the target delay duration is calculated according to the accumulated number of times, and when the accumulated number of times is equal to the preset number of times, a delay queue is generated based on the target delay duration corresponding to each delay; When the accumulated number of times is greater than the preset number of times, the target delay duration is randomly obtained from the delay queue; the calculation formula of the target delay duration is: Target duration = 2 N * , Wherein, N is the cumulative number of times, The preset interval duration.

6. The device according to claim 5, characterized in that The detection module is further used for: Detecting the actual detection time of the diagnostic server; When the actual detection time is longer than the preset diagnosis time, determining that the current diagnosis state is the completion state; When the actual detection duration is less than or equal to the preset diagnosis duration, if a response message sent by the detection diagnosis service end is received, the current diagnosis state is determined to be the completed state; otherwise, the current diagnosis state is determined to be the uncompleted state.

7. The device according to any one of claims 5 to 6, characterized in that: The coordination module is further configured to: When the actual number of the diagnosis request messages is multiple, obtaining the actual request time of each diagnosis request message; The diagnosis request message corresponding to the earliest actual request time is forwarded to the diagnosis service end, and the current diagnosis state is updated to the unfinished state.

8. The device according to claim 7, characterized in that The coordination module is further configured to: When there are multiple diagnosis request messages corresponding to the earliest actual request time, obtaining the actual diagnosis type corresponding to each diagnosis request message; The priority of each diagnostic request message is matched according to the actual diagnostic type, and the diagnostic request message with the highest priority is forwarded to the diagnostic service end.

9. A diagnostic service coordinator, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the vehicle parallel diagnosis method according to any one of claims 1 to 4.

10. A parallel diagnostic system for a vehicle, characterized in that: include: At least one client, used to send a diagnosis request message; A diagnostic server, configured to diagnose the at least one client in response to the at least one diagnostic request message; The diagnostic services coordinator as claimed in claim 9.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that: The program is executed by a processor to implement the parallel diagnosis method for a vehicle as claimed in any one of claims 1 to 4.