CN118276554A - Vehicle diagnosis method, device, equipment and medium - Google Patents
Vehicle diagnosis method, device, equipment and medium Download PDFInfo
- Publication number
- CN118276554A CN118276554A CN202410372440.3A CN202410372440A CN118276554A CN 118276554 A CN118276554 A CN 118276554A CN 202410372440 A CN202410372440 A CN 202410372440A CN 118276554 A CN118276554 A CN 118276554A
- Authority
- CN
- China
- Prior art keywords
- electronic control
- diagnosis
- diagnostic
- control units
- target
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000003745 diagnosis Methods 0.000 title claims abstract description 233
- 238000000034 method Methods 0.000 title abstract description 27
- 230000004044 response Effects 0.000 claims abstract description 153
- 238000004148 unit process Methods 0.000 claims abstract description 16
- 238000002405 diagnostic procedure Methods 0.000 claims description 18
- 238000004590 computer program Methods 0.000 claims description 15
- 230000005540 biological transmission Effects 0.000 abstract description 13
- 238000004891 communication Methods 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 239000002699 waste material Substances 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B23/00—Testing or monitoring of control systems or parts thereof
- G05B23/02—Electric testing or monitoring
- G05B23/0205—Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults
- G05B23/0208—Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults characterized by the configuration of the monitoring system
- G05B23/0213—Modular or universal configuration of the monitoring system, e.g. monitoring system having modules that may be combined to build monitoring program; monitoring system that can be applied to legacy systems; adaptable monitoring system; using different communication protocols
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B2219/00—Program-control systems
- G05B2219/20—Pc systems
- G05B2219/24—Pc safety
- G05B2219/24065—Real time diagnostics
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Automation & Control Theory (AREA)
- Small-Scale Networks (AREA)
Abstract
The application discloses a vehicle diagnosis method, a device, equipment and a medium, which relate to the field of vehicle diagnosis and are applied to diagnosis equipment and comprise the following steps: determining a diagnosis request of at least two electronic control units which need to be diagnosed in a target vehicle; if the at least two electronic control units are in the same subnet, all diagnostic requests are sent to one target electronic control unit in the at least two electronic control units, so that the target electronic control unit processes the diagnostic requests corresponding to the target electronic control units to obtain diagnostic responses, other diagnostic requests are sent to corresponding other electronic control units and obtain diagnostic responses replied by the other electronic control units, all diagnostic responses are combined into one response, and one response is fed back to the diagnostic equipment. Therefore, the application can save network resources and improve the efficiency of data transmission.
Description
Technical Field
The present invention relates to the field of vehicle diagnosis technologies, and in particular, to a vehicle diagnosis method, device, apparatus, and medium.
Background
Currently, when the diagnostic device sends a diagnostic request to an electronic control unit (ECU, electronic Control Unit) and obtains a diagnostic reply, each diagnostic request and diagnostic reply need to be forwarded through multiple layers of an in-vehicle network, and further, if the diagnostic request needs to be sent to a plurality of electronic control units and the diagnostic reply is obtained, the number of times of forwarding multiple layers of the in-vehicle network is increased by several times, which wastes network resources and reduces the efficiency of data transmission.
Disclosure of Invention
In view of the above, the present invention aims to provide a vehicle diagnosis method, device, equipment and medium, which can save network resources and improve data transmission efficiency, and the specific scheme is as follows:
in a first aspect, the present application discloses a vehicle diagnostic method, applied to a diagnostic apparatus, comprising:
Determining a diagnosis request of at least two electronic control units which need to be diagnosed in a target vehicle;
And if the at least two electronic control units are in the same subnet, sending all the diagnosis requests to one target electronic control unit in the at least two electronic control units so that the target electronic control unit processes the diagnosis requests corresponding to the target electronic control units to obtain diagnosis responses, sending other diagnosis requests to the corresponding other electronic control units and obtaining diagnosis responses replied by the other electronic control units, merging all the diagnosis responses into one response, and feeding back the one response to the diagnosis equipment.
Optionally, the sending all the diagnostic requests to one target electronic control unit of the at least two electronic control units, so that the target electronic control unit processes the diagnostic requests corresponding to the target electronic control units to obtain diagnostic responses, sending other diagnostic requests to the corresponding other electronic control units and obtaining diagnostic responses replied by the other electronic control units, combining all the diagnostic responses into one response, and feeding back the one response to the diagnostic device, including:
selecting one diagnosis request as a basic diagnosis request, and adding other diagnosis requests to the basic diagnosis request to obtain a target diagnosis request;
Sending the target diagnosis request to one target electronic control unit corresponding to the basic diagnosis request in the at least two electronic control units, so that the target electronic control unit processes the basic diagnosis request to obtain a basic diagnosis response, sending other diagnosis requests in the target diagnosis request to corresponding other electronic control units and obtaining other diagnosis responses replied by the other electronic control units, and feeding back the target diagnosis response to the diagnosis equipment; the target diagnostic response is a response obtained by adding the other diagnostic response to the base diagnostic response.
Optionally, the adding the other diagnostic requests to the basic diagnostic request to obtain a target diagnostic request includes:
and adding other diagnosis requests to the basic diagnosis request to obtain a target diagnosis request, and setting an additional flag bit corresponding to the target diagnosis request to be in an additional state, so that when the additional state is detected by the target electronic control unit, the other diagnosis requests are sent to the corresponding other electronic control units, and the other diagnosis responses replied by the other electronic control units are obtained.
Optionally, before sending all the diagnostic requests to one target electronic control unit of the at least two electronic control units if the at least two electronic control units are in the same subnet, the method further includes:
Judging whether the at least two electronic control units are in the same subnet or not based on a whole vehicle network configuration table; the whole vehicle network configuration table is a configuration table obtained from a main gateway of the target vehicle in advance based on a configuration table obtaining instruction; the all-vehicle network configuration table records all the electronic control units of the target vehicle and the sub-network where each electronic control unit is located.
Optionally, the determining, based on the all-vehicle network configuration table, whether the at least two electronic control units are in the same subnet further includes:
and if the at least two electronic control units are not in the same subnet, each diagnosis request is sent to the corresponding electronic control unit independently.
In a second aspect, the present application discloses a vehicle diagnosis method applied to one target electronic control unit of at least two electronic control units to be diagnosed in a target vehicle, including:
acquiring diagnostic requests of the at least two electronic control units sent by the diagnostic equipment; wherein the at least two electronic control units are in the same subnet;
processing the diagnosis request corresponding to the target electronic control unit to obtain a diagnosis response;
Sending the other diagnosis requests to the corresponding other electronic control units and acquiring diagnosis responses replied by the other electronic control units;
All the diagnostic responses are combined into one response and the one response is fed back to the diagnostic device.
Optionally, the obtaining the diagnostic request of the at least two electronic control units sent by the diagnostic device includes:
Acquiring a target diagnosis request which is sent by the diagnosis equipment and comprises diagnosis requests of the at least two electronic control units needing diagnosis; the target diagnosis request comprises a basic diagnosis request corresponding to the target electronic control unit and other diagnosis requests added to the basic diagnosis request;
correspondingly, the diagnosis request corresponding to the target electronic control unit is processed to obtain a diagnosis response; sending the other diagnosis requests to the corresponding other electronic control units and acquiring diagnosis responses replied by the other electronic control units; combining all of the diagnostic responses into one response and feeding back the one response to the diagnostic device, comprising:
Processing the basic diagnosis request to obtain a basic diagnosis response;
Sending other diagnosis requests in the target diagnosis requests to corresponding other electronic control units and acquiring other diagnosis responses replied by the other electronic control units;
feeding back a target diagnostic response to the diagnostic device; the target diagnostic response is a response obtained by adding the other diagnostic response to the base diagnostic response.
In a third aspect, the present application discloses a vehicle diagnostic apparatus applied to a diagnostic device, comprising:
A request determination module for determining a diagnosis request of at least two electronic control units requiring diagnosis in the target vehicle;
And the request sending module is used for sending all the diagnosis requests to one target electronic control unit in the at least two electronic control units if the at least two electronic control units are in the same subnet, so that the target electronic control unit processes the diagnosis requests corresponding to the target electronic control units to obtain diagnosis responses, sending other diagnosis requests to the corresponding other electronic control units and obtaining diagnosis responses replied by the other electronic control units, merging all the diagnosis responses into one response, and feeding back the one response to the diagnosis equipment.
In a fourth aspect, the present application discloses an electronic device, comprising:
a memory for storing a computer program;
A processor for executing the computer program to implement the vehicle diagnostic method disclosed previously.
In a fifth aspect, the present application discloses a computer readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the vehicle diagnostic method disclosed previously.
It can be seen that the present application determines a diagnostic request for at least two electronic control units in a target vehicle that need to be diagnosed; and if the at least two electronic control units are in the same subnet, sending all the diagnosis requests to one target electronic control unit in the at least two electronic control units so that the target electronic control unit processes the diagnosis requests corresponding to the target electronic control units to obtain diagnosis responses, sending other diagnosis requests to the corresponding other electronic control units and obtaining diagnosis responses replied by the other electronic control units, merging all the diagnosis responses into one response, and feeding back the one response to the diagnosis equipment. Therefore, when the diagnostic requests of at least two electronic control units exist, the application can send the next diagnostic request without sending the diagnostic requests in sequence and after obtaining the diagnostic reply of the previous diagnostic request, but directly combine all the diagnostic requests of the at least two electronic control units into one diagnostic request when the at least two electronic control units are in the same subnet, thereby obtaining the diagnostic reply only by completing the multi-layer forwarding diagnostic equipment of the back-and-forth in-car network once, saving network resources and improving the efficiency of data transmission.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a vehicle diagnostic method of the present disclosure;
FIG. 2 is a flow chart of a specific vehicle diagnostic method of the present disclosure;
FIG. 3 is a schematic view of a vehicle diagnostic apparatus according to the present disclosure;
fig. 4 is a block diagram of an electronic device according to the present disclosure.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
At present, when the diagnostic device sends a diagnostic request to the electronic control unit and acquires a diagnostic reply, each diagnostic request and the diagnostic reply need to be forwarded through multiple layers of the in-vehicle network, further, if a plurality of electronic control units are needed to send the diagnostic request and acquire the diagnostic reply, the number of times of forwarding of the multiple layers of the in-vehicle network is increased by a plurality of times, network resources are wasted, and the efficiency of data transmission is reduced.
Therefore, the embodiment of the application provides a vehicle diagnosis scheme which is applied to diagnosis equipment and can save network resources and improve the efficiency of data transmission.
The embodiment of the application discloses a vehicle diagnosis method, which is shown in fig. 1 and comprises the following steps:
step S11: a diagnostic request is determined for at least two electronic control units in the target vehicle that require diagnosis.
In this embodiment, when only one electronic control unit needs to be diagnosed, the diagnosis request of the electronic control unit is directly sent to the electronic control unit, so as to obtain a diagnosis reply.
It is to be noted that the diagnosis request includes which kind of DATA of which electronic control unit, for example, voltage DATA of the ECU1, temperature DATA of the ECU2, specifically, the diagnosis request includes an ID (Identity document, number) of the electronic control unit, a SID (SERVICE ID, service number) of a function requesting diagnosis, and a DID (DATA ID, DATA number) of the requested DATA, for example, when SID is 0x19, it indicates a read trouble code, and when SID is 0x22, it indicates a read signal value, and DID indicates which kind of trouble code or which signal value is specifically read. The specific requested data, such as the voltage data and temperature data described above, are not specifically set forth herein.
Step S12: and if the at least two electronic control units are in the same subnet, sending all the diagnosis requests to one target electronic control unit in the at least two electronic control units so that the target electronic control unit processes the diagnosis requests corresponding to the target electronic control units to obtain diagnosis responses, sending other diagnosis requests to the corresponding other electronic control units and obtaining diagnosis responses replied by the other electronic control units, merging all the diagnosis responses into one response, and feeding back the one response to the diagnosis equipment.
In this embodiment, the sending all the diagnostic requests to one target ecu of the at least two ecu so that the target ecu processes the diagnostic requests corresponding to the target ecu to obtain diagnostic responses, sending other diagnostic requests to the corresponding other ecu and obtaining diagnostic responses returned by the other ecu, merging all the diagnostic responses into one response, and feeding back the one response to the diagnostic device, includes: selecting one diagnosis request as a basic diagnosis request, and adding other diagnosis requests to the basic diagnosis request to obtain a target diagnosis request; sending the target diagnosis request to one target electronic control unit corresponding to the basic diagnosis request in the at least two electronic control units, so that the target electronic control unit processes the basic diagnosis request to obtain a basic diagnosis response, sending other diagnosis requests in the target diagnosis request to corresponding other electronic control units and obtaining other diagnosis responses replied by the other electronic control units, and feeding back the target diagnosis response to the diagnosis equipment; the target diagnostic response is a response obtained by adding the other diagnostic response to the base diagnostic response.
It should be noted that the process of selecting one of the diagnostic requests as the basic diagnostic request may be selected randomly, or the diagnostic request of each electronic control unit in each subnet may be preset to be the priority of the basic diagnostic request, and then the basic diagnostic request is determined according to the priority and the existing at least two electronic control units to be diagnosed.
In this embodiment, the adding the other diagnostic requests to the basic diagnostic request to obtain the target diagnostic request includes: and adding other diagnosis requests to the basic diagnosis request to obtain a target diagnosis request, and setting an additional flag bit corresponding to the target diagnosis request to be in an additional state, so that when the additional state is detected by the target electronic control unit, the other diagnosis requests are sent to the corresponding other electronic control units, and the other diagnosis responses replied by the other electronic control units are obtained.
It is noted that the append state is used to determine whether there is an append diagnostic request in the target diagnostic request; the number of additional diagnostic requests can be increased based on the additional status to ensure that subsequent replies are not reduced.
In a specific embodiment, the ECU1 appends the diagnostic request of the ECU2 to the ECU1, first sets the append flag bit of the diagnostic request of the ECU1 to the append state, which indicates that this request contains diagnostic requests for other ECUs, and then appends the diagnostic request of the ECU2 to the diagnostic request of the ECU 1.
In this embodiment, before sending all the diagnostic requests to one target electronic control unit of the at least two electronic control units if the at least two electronic control units are in the same subnet, the method further includes: judging whether the at least two electronic control units are in the same subnet or not based on a whole vehicle network configuration table; the whole vehicle network configuration table is a configuration table obtained from a main gateway of the target vehicle in advance based on a configuration table obtaining instruction; the all-vehicle network configuration table records all the electronic control units of the target vehicle and the sub-network where each electronic control unit is located.
It should be noted that the diagnostic device may send a configuration table acquisition instruction to the main gateway of the vehicle to obtain the full vehicle network configuration table.
It is noted that all of the diagnostic requests are routed through a layer of the vehicle network layer to a target one of the at least two electronic control units.
In a specific embodiment, after the ECU1 receives the request, it first determines which type of data is to be read according to the SID of the requesting ECU1, for example, SID 0x19 indicates that the fault code information is read, and SID 0x22 indicates that the signal value is read, and then determines which type of fault code is read, or which signal value is read according to the DID, and fills the requested data in the diagnostic reply of the ECU1; if the additional flag bit in the request is determined to be in the additional state, an additional request for reading other ECUs, such as the request of the ECU2, is fetched from the request. Then the request of the ECU2 is sent to the ECU2, and because the ECU1 and the ECU2 are in the same subnet, the request can be directly sent without routing, thereby saving resources and improving efficiency; after receiving the request, the ECU2 analyzes which data to request according to the same method, and replies the data to the ECU1; after the ECU1 receives the data returned by the ECU2, the ID, the SID, the DID and the returned data of the ECU2 are added to the diagnosis and the return of the ECU1, and then returned to the diagnosis equipment; the diagnosis replies reach the diagnosis equipment through reverse route, and the diagnosis equipment can analyze the data replied by the ECU1 and the ECU2 in the diagnosis replies; therefore, the routing process of accessing different ECU data in the same subnet can be reduced, and the data reading efficiency is improved.
In this embodiment, the determining, based on the all-vehicle network configuration table, whether the at least two electronic control units are in the same subnet further includes: and if the at least two electronic control units are not in the same subnet, each diagnosis request is sent to the corresponding electronic control unit independently. It should be noted that the diagnostic devices corresponding to the electronic control units of the different sub-networks cannot be transmitted in combination.
In summary, when acquiring a plurality of ECU data, if it is determined that the ECU data is in the same subnet, the present application only transmits a request command to one ECU, and adds the requests of other ECUs to the command. After receiving the request command, the ECU requests data from other ECUs in the local network according to the additional request in the command, and then combines the returned data of the other ECUs and the returned data of the ECU and returns the combined data to the diagnosis equipment, so that the number of multi-layer transmission between the diagnosis equipment and the ECU is reduced, the resource waste is reduced, and the transmission efficiency is improved.
It can be seen that the present application determines a diagnostic request for at least two electronic control units in a target vehicle that need to be diagnosed; and if the at least two electronic control units are in the same subnet, sending all the diagnosis requests to one target electronic control unit in the at least two electronic control units so that the target electronic control unit processes the diagnosis requests corresponding to the target electronic control units to obtain diagnosis responses, sending other diagnosis requests to the corresponding other electronic control units and obtaining diagnosis responses replied by the other electronic control units, merging all the diagnosis responses into one response, and feeding back the one response to the diagnosis equipment. Therefore, when the diagnostic requests of at least two electronic control units exist, the application can send the next diagnostic request without sending the diagnostic requests in sequence and after obtaining the diagnostic reply of the previous diagnostic request, but directly combine all the diagnostic requests of the at least two electronic control units into one diagnostic request when the at least two electronic control units are in the same subnet, thereby obtaining the diagnostic reply only by completing the multi-layer forwarding diagnostic equipment of the back-and-forth in-car network once, saving network resources and improving the efficiency of data transmission.
The embodiment of the application discloses a specific vehicle diagnosis method, and compared with the previous embodiment, the technical scheme of the embodiment is further described and optimized. Referring to fig. 2, the electronic control unit for a target of at least two electronic control units to be diagnosed in a target vehicle specifically includes:
Step S21: acquiring diagnostic requests of the at least two electronic control units sent by the diagnostic equipment; wherein the at least two electronic control units are within the same subnet.
In this embodiment, the obtaining the diagnostic request of the at least two electronic control units sent by the diagnostic device includes: acquiring a target diagnosis request which is sent by the diagnosis equipment and comprises diagnosis requests of the at least two electronic control units needing diagnosis; the target diagnosis request comprises a basic diagnosis request corresponding to the target electronic control unit and other diagnosis requests added to the basic diagnosis request;
In this embodiment, after the other diagnostic requests are added to the basic diagnostic request, the additional flag bit of the basic diagnostic request is set to an additional state, so that the additional state is checked later to process the additional other diagnostic requests.
Step S22: and processing the diagnosis request corresponding to the target electronic control unit to obtain a diagnosis response.
Step S23: and sending the other diagnosis requests to the corresponding other electronic control units and acquiring diagnosis responses replied by the other electronic control units.
Step S24: all the diagnostic responses are combined into one response and the one response is fed back to the diagnostic device.
In this embodiment, the processing the diagnostic request corresponding to the target electronic control unit obtains a diagnostic response; sending the other diagnosis requests to the corresponding other electronic control units and acquiring diagnosis responses replied by the other electronic control units; combining all of the diagnostic responses into one response and feeding back the one response to the diagnostic device, comprising: processing the basic diagnosis request to obtain a basic diagnosis response; sending other diagnosis requests in the target diagnosis requests to corresponding other electronic control units and acquiring other diagnosis responses replied by the other electronic control units; feeding back a target diagnostic response to the diagnostic device; the target diagnostic response is a response obtained by adding the other diagnostic response to the base diagnostic response.
In summary, the application can reduce a plurality of steps for requesting reply and forwarding compared with the direct acquisition by the diagnosis equipment when the ECU acquires other ECU data of the same subnet, thereby improving the efficiency of data transmission and acquisition.
It can be seen that the present application obtains the diagnostic request of the at least two electronic control units sent by the diagnostic device; wherein the at least two electronic control units are in the same subnet; processing the diagnosis request corresponding to the target electronic control unit to obtain a diagnosis response; sending the other diagnosis requests to the corresponding other electronic control units and acquiring diagnosis responses replied by the other electronic control units; all the diagnostic responses are combined into one response and the one response is fed back to the diagnostic device. Therefore, when the diagnostic requests of at least two electronic control units exist, the application can send the next diagnostic request without sending the diagnostic requests in sequence and after obtaining the diagnostic reply of the previous diagnostic request, but directly combine all the diagnostic requests of the at least two electronic control units into one diagnostic request when the at least two electronic control units are in the same subnet, thereby obtaining the diagnostic reply only by completing the multi-layer forwarding diagnostic equipment of the back-and-forth in-car network once, saving network resources and improving the efficiency of data transmission.
Correspondingly, the embodiment of the application also discloses a vehicle diagnosis device, which is shown in fig. 3, and comprises:
a request determination module 11 for determining a diagnosis request of at least two electronic control units requiring diagnosis in the target vehicle;
And a request sending module 12, configured to send all the diagnostic requests to a target electronic control unit of the at least two electronic control units if the at least two electronic control units are in the same subnet, so that the target electronic control unit processes the diagnostic requests corresponding to the target electronic control unit to obtain diagnostic responses, send other diagnostic requests to the corresponding other electronic control units and obtain diagnostic responses replied by the other electronic control units, combine all the diagnostic responses into one response, and feed back the one response to the diagnostic device.
The more specific working process of each module may be the same as that disclosed in the foregoing embodiment, and will not be described herein.
It can be seen that the present application determines a diagnostic request for at least two electronic control units in a target vehicle that need to be diagnosed; and if the at least two electronic control units are in the same subnet, sending all the diagnosis requests to one target electronic control unit in the at least two electronic control units so that the target electronic control unit processes the diagnosis requests corresponding to the target electronic control units to obtain diagnosis responses, sending other diagnosis requests to the corresponding other electronic control units and obtaining diagnosis responses replied by the other electronic control units, merging all the diagnosis responses into one response, and feeding back the one response to the diagnosis equipment. Therefore, when the diagnostic requests of at least two electronic control units exist, the application can send the next diagnostic request without sending the diagnostic requests in sequence and after obtaining the diagnostic reply of the previous diagnostic request, but directly combine all the diagnostic requests of the at least two electronic control units into one diagnostic request when the at least two electronic control units are in the same subnet, thereby obtaining the diagnostic reply only by completing the multi-layer forwarding diagnostic equipment of the back-and-forth in-car network once, saving network resources and improving the efficiency of data transmission.
In one embodiment, the request sending module 12 includes:
An appending unit, configured to select one of the diagnostic requests as a basic diagnostic request, and append the other diagnostic requests to the basic diagnostic request to obtain a target diagnostic request;
The first request sending unit is used for sending the target diagnosis request to one target electronic control unit corresponding to the basic diagnosis request in the at least two electronic control units, so that the target electronic control unit processes the basic diagnosis request to obtain a basic diagnosis response, sending other diagnosis requests in the target diagnosis request to other corresponding electronic control units and obtaining other diagnosis responses replied by the other electronic control units, and feeding back the target diagnosis response to the diagnosis equipment; the target diagnostic response is a response obtained by adding the other diagnostic response to the base diagnostic response.
In one embodiment, the appending unit is specifically configured to append the other diagnostic requests to the basic diagnostic request to obtain a target diagnostic request, and set an appending flag bit corresponding to the target diagnostic request to an appending state, so that when the appending state is detected by the target electronic control unit, the target electronic control unit sends the other diagnostic requests to the corresponding other electronic control units and obtains the other diagnostic responses returned by the other electronic control units.
In one embodiment, the vehicle diagnostic apparatus further includes:
The judging module is used for judging whether the at least two electronic control units are in the same subnet or not based on the whole vehicle network configuration table; the whole vehicle network configuration table is a configuration table obtained from a main gateway of the target vehicle in advance based on a configuration table obtaining instruction; the all-vehicle network configuration table records all the electronic control units of the target vehicle and the sub-network where each electronic control unit is located.
In one embodiment, the vehicle diagnostic apparatus further includes:
And the second request sending module is used for independently sending each diagnosis request to the corresponding electronic control unit if the at least two electronic control units are not in the same subnet.
Further, the embodiment of the application also provides electronic equipment. Fig. 4 is a block diagram of an electronic device 20, according to an exemplary embodiment, and the contents of the diagram should not be construed as limiting the scope of use of the present application in any way.
Fig. 4 is a schematic structural diagram of an electronic device 20 according to an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a display screen 23, an input output interface 24, a communication interface 25, a power supply 26, and a communication bus 27. Wherein the memory 22 is configured to store a computer program that is loaded and executed by the processor 21 to implement the relevant steps in the vehicle diagnostic method disclosed in any of the foregoing embodiments. In addition, the electronic device 20 in the present embodiment may be specifically an electronic computer.
In this embodiment, the power supply 26 is used to provide an operating voltage for each hardware device on the electronic device 20; the communication interface 25 can create a data transmission channel between the electronic device 20 and an external device, and the communication protocol to be followed is any communication protocol applicable to the technical solution of the present application, which is not specifically limited herein; the input/output interface 24 is used for obtaining external input data or outputting external output data, and the specific interface type thereof may be selected according to the specific application needs, which is not limited herein.
The memory 22 may be a read-only memory, a random access memory, a magnetic disk, an optical disk, or the like, and the resources stored thereon may include the computer program 221, which may be stored in a temporary or permanent manner. Wherein the computer program 221 may further comprise a computer program capable of being used to perform other specific tasks in addition to the computer program capable of being used to perform the vehicle diagnostic method performed by the electronic device 20 as disclosed in any of the foregoing embodiments.
Further, the embodiment of the application also discloses a computer readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the vehicle diagnostic method disclosed previously.
The specific steps of the method may be referred to as corresponding matters disclosed in the foregoing embodiments, and will not be described herein.
In the present disclosure, each embodiment is described in a progressive manner, and each embodiment focuses on the difference from other embodiments, and the same or similar parts between the embodiments refer to each other, that is, for the device disclosed in the embodiments, since the device corresponds to the method disclosed in the embodiments, the description is relatively simple, and the relevant parts refer to the description of the method section.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing has outlined a detailed description of a vehicle diagnostic method, apparatus, device, and storage medium, wherein specific examples are provided herein to illustrate the principles and embodiments of the present application and to help understand the method and core concepts thereof; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.
Claims (10)
1. A vehicle diagnostic method, characterized by being applied to a diagnostic apparatus, comprising:
Determining a diagnosis request of at least two electronic control units which need to be diagnosed in a target vehicle;
And if the at least two electronic control units are in the same subnet, sending all the diagnosis requests to one target electronic control unit in the at least two electronic control units so that the target electronic control unit processes the diagnosis requests corresponding to the target electronic control units to obtain diagnosis responses, sending other diagnosis requests to the corresponding other electronic control units and obtaining diagnosis responses replied by the other electronic control units, merging all the diagnosis responses into one response, and feeding back the one response to the diagnosis equipment.
2. The vehicle diagnostic method according to claim 1, wherein said transmitting all of the diagnostic requests to one of the at least two electronic control units so that the target electronic control unit processes the diagnostic requests corresponding to the target electronic control unit to obtain diagnostic responses, transmitting other of the diagnostic requests to the respective other of the electronic control units and obtaining diagnostic responses returned from the other of the electronic control units, merging all of the diagnostic responses into one response and feeding back the one response to the diagnostic device includes:
selecting one diagnosis request as a basic diagnosis request, and adding other diagnosis requests to the basic diagnosis request to obtain a target diagnosis request;
Sending the target diagnosis request to one target electronic control unit corresponding to the basic diagnosis request in the at least two electronic control units, so that the target electronic control unit processes the basic diagnosis request to obtain a basic diagnosis response, sending other diagnosis requests in the target diagnosis request to corresponding other electronic control units and obtaining other diagnosis responses replied by the other electronic control units, and feeding back the target diagnosis response to the diagnosis equipment; the target diagnostic response is a response obtained by adding the other diagnostic response to the base diagnostic response.
3. The vehicle diagnostic method according to claim 2, wherein the adding the other diagnostic requests to the base diagnostic request results in a target diagnostic request, comprising:
and adding other diagnosis requests to the basic diagnosis request to obtain a target diagnosis request, and setting an additional flag bit corresponding to the target diagnosis request to be in an additional state, so that when the additional state is detected by the target electronic control unit, the other diagnosis requests are sent to the corresponding other electronic control units, and the other diagnosis responses replied by the other electronic control units are obtained.
4. The vehicle diagnostic method of claim 1, wherein if the at least two electronic control units are within the same subnet, further comprising, before sending all of the diagnostic requests to one of the at least two electronic control units:
Judging whether the at least two electronic control units are in the same subnet or not based on a whole vehicle network configuration table; the whole vehicle network configuration table is a configuration table obtained from a main gateway of the target vehicle in advance based on a configuration table obtaining instruction; the all-vehicle network configuration table records all the electronic control units of the target vehicle and the sub-network where each electronic control unit is located.
5. The vehicle diagnostic method according to claim 4, wherein the determining whether the at least two electronic control units are within the same subnet based on the all-vehicle network configuration table further comprises:
and if the at least two electronic control units are not in the same subnet, each diagnosis request is sent to the corresponding electronic control unit independently.
6. A vehicle diagnostic method, characterized by being applied to one of at least two electronic control units requiring diagnosis in a target vehicle, comprising:
acquiring diagnostic requests of the at least two electronic control units sent by the diagnostic equipment; wherein the at least two electronic control units are in the same subnet;
processing the diagnosis request corresponding to the target electronic control unit to obtain a diagnosis response;
Sending the other diagnosis requests to the corresponding other electronic control units and acquiring diagnosis responses replied by the other electronic control units;
All the diagnostic responses are combined into one response and the one response is fed back to the diagnostic device.
7. The vehicle diagnostic method according to claim 6, characterized in that the obtaining of the diagnostic requests of the at least two electronic control units sent by the diagnostic device comprises:
Acquiring a target diagnosis request which is sent by the diagnosis equipment and comprises diagnosis requests of the at least two electronic control units needing diagnosis; the target diagnosis request comprises a basic diagnosis request corresponding to the target electronic control unit and other diagnosis requests added to the basic diagnosis request;
correspondingly, the diagnosis request corresponding to the target electronic control unit is processed to obtain a diagnosis response; sending the other diagnosis requests to the corresponding other electronic control units and acquiring diagnosis responses replied by the other electronic control units; combining all of the diagnostic responses into one response and feeding back the one response to the diagnostic device, comprising:
Processing the basic diagnosis request to obtain a basic diagnosis response;
Sending other diagnosis requests in the target diagnosis requests to corresponding other electronic control units and acquiring other diagnosis responses replied by the other electronic control units;
feeding back a target diagnostic response to the diagnostic device; the target diagnostic response is a response obtained by adding the other diagnostic response to the base diagnostic response.
8. A vehicle diagnostic apparatus, characterized by being applied to a diagnostic device, comprising:
A request determination module for determining a diagnosis request of at least two electronic control units requiring diagnosis in the target vehicle;
And the request sending module is used for sending all the diagnosis requests to one target electronic control unit in the at least two electronic control units if the at least two electronic control units are in the same subnet, so that the target electronic control unit processes the diagnosis requests corresponding to the target electronic control units to obtain diagnosis responses, sending other diagnosis requests to the corresponding other electronic control units and obtaining diagnosis responses replied by the other electronic control units, merging all the diagnosis responses into one response, and feeding back the one response to the diagnosis equipment.
9. An electronic device, comprising:
a memory for storing a computer program;
A processor for executing the computer program to implement the vehicle diagnostic method as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the vehicle diagnostic method as claimed in any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410372440.3A CN118276554A (en) | 2024-03-27 | 2024-03-27 | Vehicle diagnosis method, device, equipment and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410372440.3A CN118276554A (en) | 2024-03-27 | 2024-03-27 | Vehicle diagnosis method, device, equipment and medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN118276554A true CN118276554A (en) | 2024-07-02 |
Family
ID=91647739
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410372440.3A Pending CN118276554A (en) | 2024-03-27 | 2024-03-27 | Vehicle diagnosis method, device, equipment and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118276554A (en) |
-
2024
- 2024-03-27 CN CN202410372440.3A patent/CN118276554A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102299954B (en) | For the context-specific network resource addressing system and method for Distributed Services | |
CN110635933B (en) | Apparatus, control method, and recording medium for managing network of SDN | |
JP5500153B2 (en) | Vehicle communication device and vehicle data communication system using the vehicle communication device | |
US7359957B2 (en) | Method for accessing information and/or services of a distributed automation system | |
CN110311855B (en) | User message processing method and device, electronic equipment and storage medium | |
CN101232421B (en) | Industry internet networking method and address analysis method | |
CN109922120B (en) | Method and terminal for improving DNS availability | |
CN110213365B (en) | User access request processing method based on user partition and electronic equipment | |
CN113810270B (en) | Method and device for realizing SOA (service oriented architecture) of local area network of vehicle-mounted controller | |
CN113315852B (en) | Domain name resolution method, device and system | |
US8645452B2 (en) | In-vehicle communication system | |
CN112702441B (en) | Container-based access data processing method, device, system and storage medium | |
KR20180074128A (en) | Diagnosis message routing system and method for gateway of vehicle | |
CN118276554A (en) | Vehicle diagnosis method, device, equipment and medium | |
CN109788075B (en) | Private network system, data acquisition method and edge server | |
US11977503B2 (en) | Control device, onboard system, control method, and non-transitory computer-readable recording medium | |
CN113595894B (en) | Communication method, device, equipment and medium between service nodes and client nodes | |
CN113596105B (en) | Content acquisition method, edge node and computer readable storage medium | |
CN111901243B (en) | Service request routing method, scheduler and service platform | |
CN109600452B (en) | Server cluster, message pushing method and related server | |
CN110741361B (en) | Resource query processing method, device, computer equipment and storage medium | |
CN102035670A (en) | Communication apparatus having a plurality of network interfaces, method for controlling the communication apparatus, and storage medium | |
CN112615932B (en) | Communication method based on vehicle bus and vehicle gateway equipment | |
EP4322502B1 (en) | Internet-of-vehicles based traffic scheduling method and apparatus, device and medium | |
CN113347284B (en) | Resource access method, resource access device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |