CN116300804A - Remote diagnosis method, remote diagnosis device, electronic equipment and computer readable storage medium - Google Patents

Remote diagnosis method, remote diagnosis device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN116300804A
CN116300804A CN202310166888.5A CN202310166888A CN116300804A CN 116300804 A CN116300804 A CN 116300804A CN 202310166888 A CN202310166888 A CN 202310166888A CN 116300804 A CN116300804 A CN 116300804A
Authority
CN
China
Prior art keywords
diagnosis
vehicle
remote
instruction
diagnostic
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
Application number
CN202310166888.5A
Other languages
Chinese (zh)
Inventor
黎开江
熊万军
黄涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BDstar Intelligent and Connected Vehicle Technology Co Ltd
Original Assignee
BDstar Intelligent and Connected Vehicle Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by BDstar Intelligent and Connected Vehicle Technology Co Ltd filed Critical BDstar Intelligent and Connected Vehicle Technology Co Ltd
Priority to CN202310166888.5A priority Critical patent/CN116300804A/en
Publication of CN116300804A publication Critical patent/CN116300804A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B23/00Testing or monitoring of control systems or parts thereof
    • G05B23/02Electric testing or monitoring
    • G05B23/0205Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults
    • G05B23/0259Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults characterized by the response to fault detection
    • G05B23/0262Confirmation of fault detection, e.g. extra checks to confirm that a failure has indeed occurred
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/24Pc safety
    • G05B2219/24065Real time diagnostics
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Abstract

The embodiment of the invention provides a remote diagnosis method, a device, electronic equipment and a computer readable storage medium, which belong to the field of automobile diagnosis, wherein when a domain controller receives a remote diagnosis request forwarded by an on-vehicle TBOX and the current state of a vehicle meets diagnosis conditions, an objective function is called from a plurality of pre-configured protocol analysis functions, protocol analysis is carried out on the remote diagnosis request to obtain diagnosis information, so that a diagnosis instruction and target control equipment are analyzed from the diagnosis information, each diagnosis instruction is sent to the corresponding target control equipment to control the corresponding target assembly to execute diagnosis operation, diagnosis execution data returned by the target control equipment is packaged and sent to the on-vehicle TBOX to be sent to a cloud server, and for different remote diagnosis requests, the remote diagnosis function can be realized only by processing the differential selection objective function, thereby being beneficial to improving development efficiency.

Description

Remote diagnosis method, remote diagnosis device, electronic equipment and computer readable storage medium
Technical Field
The present invention relates to the field of automobile diagnosis, and in particular, to a remote diagnosis method, a remote diagnosis device, an electronic apparatus, and a computer readable storage medium.
Background
With the rapid development of automobile electronic technology, more and more electronic devices are installed on automobiles nowadays, and the electronic devices are very important for state management and monitoring of various electronic devices installed on automobiles. Accordingly, more and more automobile manufacturers manage various electronic devices mounted on a vehicle by adding remote diagnosis functions.
Currently, considering that most of electronic devices mounted on a vehicle do not have an ethernet communication function, a cloud server is often adopted to issue a remote diagnosis request to a vehicle-mounted TBOX, and the vehicle-mounted TBOX forwards the remote diagnosis request to a domain controller, and the domain controller obtains a diagnosis instruction from the remote diagnosis request based on a processing party program of a pre-developed diagnosis project so as to send the diagnosis instruction to a target device through a CAN bus. However, since remote diagnosis protocols used in different projects of different factories are different, new process programs need to be developed on domain controllers for different factories or different projects, resulting in low development efficiency.
Disclosure of Invention
In view of the above, an object of the present invention is to provide a remote diagnosis method, apparatus, electronic device, and computer-readable storage medium, which can solve the problem of low development efficiency of the conventional vehicle remote diagnosis method.
In order to achieve the above object, the technical scheme adopted by the embodiment of the invention is as follows:
in a first aspect, an embodiment of the present invention provides a remote diagnosis method applied to a domain controller on a vehicle, where the domain controller is respectively in communication connection with a vehicle-mounted TBOX of the vehicle and a control device of each functional component, and the domain controller stores a protocol parsing library in advance, and the method includes:
when a remote diagnosis request forwarded by the vehicle-mounted TBOX is received, judging whether the current state of the vehicle meets diagnosis conditions or not; wherein the remote diagnostic request is sent by a cloud server to the on-board TBOX;
if yes, according to the vehicle factory information of the vehicle, calling an objective function from a plurality of protocol analysis functions in the protocol analysis library, and carrying out protocol analysis on the remote diagnosis request to obtain diagnosis information;
performing instruction analysis on the diagnosis information to obtain at least one diagnosis instruction and target control equipment of each diagnosis instruction, and sending each diagnosis instruction to corresponding target control equipment; each diagnosis instruction is used for prompting a target component corresponding to the target control equipment to execute diagnosis operation;
And receiving diagnosis execution data returned by the target control equipment aiming at the diagnosis instruction, packaging the diagnosis execution data into response data, and sending the response data to the vehicle-mounted TBOX so as to be sent to the cloud server through the vehicle-mounted TBOX.
Further, the diagnostic information includes device identification data and diagnostic content data;
the step of analyzing the diagnostic information to obtain at least one diagnostic instruction and a target component of each diagnostic instruction includes:
processing the equipment identification data by adopting a preset addressing macro to obtain a physical addressing ID of target control equipment;
identifying the diagnosis content data based on a UDS protocol and/or a preset analysis macro, and determining a service ID and an effective length corresponding to each service ID;
and for each service ID, taking a first byte after the service ID in the diagnosis content data as an extraction starting point, and extracting data according to the effective length corresponding to the service ID to obtain a diagnosis instruction of the service ID.
Further, the vehicle factory information includes a vehicle factory identifier, and the step of calling an objective function from the plurality of protocol analysis functions according to the vehicle factory information of the vehicle includes:
Acquiring a protocol analysis function taking the vehicle-factory identifier as an index from the protocol analysis functions as a preselected analysis function;
detecting the remote diagnosis request to obtain a data structure of the remote diagnosis request;
and determining a target protocol adopted by the remote diagnosis request according to the data structure, and selecting a protocol analysis function of the target protocol from all protocol analysis functions as a target function.
Further, the method further comprises:
when an analysis function updating instruction transmitted by operation and maintenance equipment is received, analyzing a new protocol analysis function from the analysis function updating instruction, and writing the new protocol analysis function into the protocol analysis library;
the new protocol analysis function is sent by the operation and maintenance equipment when the remote diagnosis protocol of the vehicle is changed.
Further, the method further comprises:
setting a remote diagnosis mark under the condition that the current state of the vehicle meets diagnosis conditions;
the diagnostic condition includes a diagnostic state of a component to be diagnosed, and the step of judging whether the current state of the vehicle satisfies the diagnostic condition includes:
Judging whether the domain controller is provided with the remote diagnosis mark;
if not, judging whether the current state of each component to be diagnosed meets the respective diagnosis state according to the order of the diagnosis priority of each component to be diagnosed; wherein the component to be diagnosed comprises a power supply and an engine of the vehicle;
the method further comprises the steps of:
and when all diagnostic operations corresponding to the remote diagnostic request are completed, the remote diagnostic mark is cleared.
Further, the step of sending each diagnostic instruction to the corresponding target control device includes:
sequentially adding the diagnosis instructions to a remote diagnosis queue;
determining a diagnosis instruction with the forefront sequencing in the remote diagnosis queue, and transmitting the diagnosis instruction to corresponding target control equipment;
and after receiving diagnosis execution data returned by the target control equipment aiming at the diagnosis instruction, inserting the diagnosis execution data into the remote diagnosis queue, returning to execute the step of determining the diagnosis instruction with the forefront sequencing in the remote diagnosis queue, and issuing the diagnosis instruction to the corresponding target control equipment.
Further, the step of processing the device identification data by using a preset addressing macro to obtain a physical addressing ID of the target control device includes:
And judging whether the equipment identification data is a physical addressing ID or not by adopting a preset addressing macro, if not, looking up a table of the equipment identification data to obtain the physical addressing ID corresponding to the equipment identification data.
In a second aspect, an embodiment of the present invention provides a remote diagnosis device, which is applied to a domain controller on a vehicle, where the domain controller is respectively in communication connection with a vehicle-mounted TBOX of the vehicle and a control device of each functional component, and the domain controller stores a protocol parsing library in advance, and the remote diagnosis device includes a condition detection module, a protocol parsing module, and a data processing module;
the condition detection module is used for judging whether the current state of the vehicle meets the diagnosis condition or not when the remote diagnosis request forwarded by the vehicle-mounted TBOX is received; wherein the remote diagnostic request is sent by a cloud server to the on-board TBOX;
the protocol analysis module is used for calling an objective function from a plurality of protocol analysis functions in the protocol analysis library according to the vehicle factory information of the vehicle under the condition that the current state of the vehicle meets the diagnosis condition, and carrying out protocol analysis on the remote diagnosis request to obtain diagnosis information;
The data processing module is used for carrying out instruction analysis on the diagnosis information to obtain at least one diagnosis instruction and target control equipment of each diagnosis instruction, and sending each diagnosis instruction to the corresponding target control equipment; each diagnosis instruction is used for prompting a target component corresponding to the target control equipment to execute diagnosis operation;
the data processing module is further configured to receive diagnosis execution data returned by the target control device for the diagnosis instruction, package the diagnosis execution data into response data, and send the response data to the vehicle-mounted TBOX, so as to send the response data to the cloud server through the vehicle-mounted TBOX.
In a third aspect, an embodiment of the present invention provides an electronic device, including a processor and a memory storing machine executable instructions executable by the processor to implement the remote diagnostic method according to the first aspect.
In a fourth aspect, embodiments of the present invention provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the remote diagnostic method according to the first aspect.
According to the remote diagnosis method, the device, the electronic equipment and the computer readable storage medium, the protocol analysis library is stored in the domain controller in advance, when the remote diagnosis request forwarded by the vehicle-mounted TBOX is received and the current state of the vehicle meets the diagnosis condition, the target function is called from a plurality of protocol analysis functions in the protocol analysis library, protocol analysis is carried out on the remote diagnosis request to obtain diagnosis information, so that the diagnosis instruction and the target control equipment of each diagnosis instruction are analyzed from the diagnosis information, each diagnosis instruction is issued to the corresponding target control equipment, the target assembly corresponding to the target control equipment is enabled to execute diagnosis operation, diagnosis execution data returned by the target control equipment aiming at the diagnosis instruction is packaged and sent to the vehicle-mounted TBOX to be sent to the cloud server, and for different remote diagnosis requests, the remote diagnosis function can be realized only by processing the target function based on a plurality of protocol analysis functions prestored in the protocol analysis library, and development efficiency is improved.
In order to make the above objects, features and advantages of the present invention more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 shows a block schematic diagram of a remote diagnostic system provided by an embodiment of the present invention.
Fig. 2 shows one of the flow diagrams of the remote diagnosis method according to the embodiment of the invention.
Fig. 3 shows a flow diagram of part of the sub-steps of step S11 in fig. 2.
Fig. 4 shows a second flowchart of a remote diagnosis method according to an embodiment of the invention.
Fig. 5 shows a schematic flow chart of a partial sub-step of step S13 in fig. 2 or fig. 4.
Fig. 6 shows a schematic flow chart of a partial sub-step of step S15 in fig. 2 or fig. 4.
Fig. 7 shows a block schematic diagram of a remote diagnosis device according to an embodiment of the present invention.
Fig. 8 shows a block schematic diagram of an electronic device according to an embodiment of the present invention.
Reference numerals: 100-a remote diagnostic system; 110-a cloud server; 120-on-board TBOX; 130-domain controller; 140-control device; 150-a remote diagnostic device; 160-a condition detection module; 170-a protocol parsing module; 180-a data processing module; 190-an electronic device.
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. The components of the embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the invention, as presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be made by a person skilled in the art without making any inventive effort, are intended to be within the scope of the present invention.
It is 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.
At present, different factories use different remote diagnosis protocols or remote diagnosis functions of different vehicles in the same factory are different, so for development of the remote diagnosis functions of the vehicles in different factories, different processing programs need to be developed on a domain controller of the vehicle, which results in low development efficiency and easily influences the safety and stability of data transmission.
Based on the above consideration, the embodiment of the invention provides a remote diagnosis method, which can improve the problem of low development efficiency of the existing vehicle remote diagnosis function and improve the safety and stability of data transmission.
The remote diagnosis method provided by the embodiment of the invention can be applied to the remote diagnosis system 100 in fig. 1, and the remote diagnosis system 100 can comprise a cloud server 110, a vehicle-mounted TBOX120 of a vehicle, a domain controller 130 and control equipment 140 of each functional component. The domain controller 130 may be communicatively connected to the control device 140 of each functional component through a can bus, the domain controller 130 may be communicatively connected to the on-board TBOX120 through a usb, ethernet, serial port, or spi bus, and the on-board TBOX120 may be communicatively connected to the cloud server 110 through a network. The domain controller 130 stores a protocol parsing library in advance, the protocol parsing library includes protocol parsing functions of different diagnostic protocols, and the domain controller 130 includes only one entry for receiving data and one exit for transmitting data.
Functional components include, but are not limited to: vehicle-mounted air conditioner, power supply, engine, motor, central control equipment, display equipment, steering wheel, vehicle event data recorder, vehicle-mounted instrument, windshield wiper, windshield washer, windshield defogging defrosting equipment, various sensors, audio-visual equipment, central control door lock and the like.
The vehicle-mounted TBOX120 is configured to receive a remote diagnosis request sent by the cloud server 110, and send the remote diagnosis request to the domain controller 130.
The domain controller 130 may include a condition detection module 160, a protocol parsing module 170, and a data processing module 180, and is used to implement the remote diagnosis method provided by the embodiment of the present invention.
In one possible implementation, an embodiment of the present invention provides a remote diagnosis method, referring to fig. 2, may include the following steps. In the present embodiment, the remote diagnosis method is applied to the domain controller 130 of fig. 1 for illustration.
S11, when a remote diagnosis request forwarded by the vehicle-mounted TBOX is received, judging whether the current state of the vehicle meets diagnosis conditions or not. If yes, step S13 is executed, if not, a response of the diagnosis failure is returned to the vehicle-mounted TBOX, so as to return to the cloud server through the vehicle-mounted TBOX.
In this embodiment, the remote diagnostic request is sent by the cloud server to the on-board TBOX.
S13, according to the vehicle factory information of the vehicle, an objective function is called from a plurality of protocol analysis functions in a protocol analysis library, and protocol analysis is carried out on the remote diagnosis request to obtain diagnosis information.
S15, carrying out instruction analysis on the diagnosis information to obtain at least one diagnosis instruction and target control equipment of each diagnosis instruction, and sending each diagnosis instruction to the corresponding target control equipment.
In this embodiment, the target control device of all the diagnostic instructions obtained from the diagnostic information may be the same control device or may be different control devices.
S17, receiving diagnosis execution data returned by the target control equipment aiming at the diagnosis instruction, packaging the diagnosis execution data into response data, and sending the response data to the vehicle-mounted TBOX so as to be sent to the cloud server through the vehicle-mounted TBOX.
The cloud server 110 may issue a remote diagnosis request to the on-board TBOX120 of the vehicle every certain diagnosis period, or when remote diagnosis of the vehicle is required, and the on-board TBOX120 forwards the remote diagnosis request to the domain controller 130 of the vehicle after receiving the remote diagnosis request. After receiving the remote diagnosis request, the domain controller 130 invokes the protocol parsing module 170 when the condition detection module 160 determines that the current state of the vehicle satisfies the diagnosis condition. The protocol analysis module 170 determines an objective function from a plurality of protocol analysis functions configured in the protocol analysis library based on the vehicle factory information of the vehicle, and performs protocol analysis on the remote diagnosis request to obtain diagnosis information.
The protocol parsing module 170 transmits the parsed diagnosis information to the data processing module 180, and the data processing module 180 parses the diagnosis instructions and the target control devices 140 of each diagnosis instruction from the diagnosis information and issues each diagnosis instruction to the corresponding target control device 140. The target control device 140 controls the corresponding target component to perform a diagnostic operation in response to the diagnostic instruction, obtains diagnostic execution data, and returns the diagnostic execution data to the domain controller 130. The data parsing module packages the diagnostic execution data into response data for return to the cloud server 110 through the on-board TBOX 120.
Compared with the existing remote diagnosis method, in the remote diagnosis method, for different remote diagnosis requests, the remote diagnosis function can be realized by processing the different selection objective functions only based on a plurality of protocol analysis functions pre-stored in the protocol analysis library, and different processing flows are not required to be adopted for different projects of different factories, so that the development of the remote diagnosis function can be simplified, and the development efficiency is improved.
Further, in order to improve the development efficiency when the remote diagnosis function of a new project of a new vehicle factory needs to be developed on the domain controller 130, in a possible implementation manner, the remote diagnosis method provided by the embodiment of the present invention may further be implemented: when an analysis function updating instruction transmitted by the operation and maintenance equipment is received, analyzing a new protocol analysis function from the analysis function updating instruction, and writing the new protocol analysis function into a protocol analysis library.
In this embodiment, the new protocol analysis function is issued by the operation and maintenance device when the remote diagnosis protocol of the vehicle is changed.
The developer or the operation and maintenance personnel can transmit an analysis function updating instruction to the domain controller of the vehicle through the operation and maintenance equipment, after the domain controller analyzes a new protocol analysis function from the analysis function updating instruction, the new protocol analysis function takes the information of the vehicle factory as an index and writes the information into a protocol analysis library, so that when the remote diagnosis of a new project of the vehicle factory is carried out, the remote diagnosis function can be realized by executing the flow of the steps S11-S17. The new protocol analysis function of the new project of the new vehicle factory is only required to be written into the protocol analysis library of the domain controller, and the development of the new remote diagnosis function can be completed, so that the development workload is greatly reduced, and the development efficiency is further improved.
In order to ensure safe driving of the vehicle and smooth remote diagnosis to obtain real diagnosis data, it is necessary to determine the current state of the vehicle when a remote diagnosis request is received. In one possible embodiment, the diagnostic conditions may include safe driving conditions and diagnostic demand conditions. By the safe running condition, it is judged whether or not the current state of the vehicle can ensure safe running when the diagnostic operation is performed. By diagnosing the demand conditions, it is ensured that the current state of the vehicle satisfies the diagnostic demand.
It should be appreciated that different remote diagnostic content may correspond to different diagnostic conditions. Different remote diagnosis contents can also correspond to the same diagnosis condition.
The diagnostic conditions may include a diagnostic state of the component to be diagnosed, further, the diagnostic conditions are not limited to: vehicle power state, engine state, vehicle speed state, vehicle diagnostic state, CAN bus state, and physical addressing ID. The diagnostic requirement conditions may include, among other things, a vehicle diagnostic status, a CAN bus status, and a physical addressing ID, for example, the vehicle diagnostic status is currently not remotely diagnosed. The safe driving conditions may include a vehicle power state, an engine state, and a vehicle speed, for example, the vehicle speed cannot exceed a vehicle speed threshold.
In one possible embodiment, referring to fig. 3, step S11 may determine whether the current state of the vehicle satisfies the diagnostic condition by the following steps.
S111, judging whether the domain controller is provided with a remote diagnosis mark. If yes, step S112 is executed, and if no, step S113 is executed.
S112, judging that the current state of the vehicle does not meet the diagnosis condition.
S113, judging whether the current state of each component to be diagnosed meets the respective diagnostic state according to the order of the diagnostic priorities of the components to be diagnosed.
In actual use, the diagnosis priority of each component to be diagnosed can be set according to the requirement, and the diagnosis conditions can be cut and adjusted according to different projects, i.e. different remote diagnosis projects (the remote diagnosis request can comprise the identification of the diagnosis project) can have different diagnosis condition contents. And judging whether the current state of each component to be diagnosed reaches the diagnostic state or not in sequence according to the sequence of the diagnostic priorities from high to low, if so, satisfying the diagnostic conditions, and if not, not satisfying the diagnostic conditions.
Further, in order to avoid that a plurality of remote diagnoses are performed simultaneously, which causes mutual interference of diagnoses and disturbance of data transmission, a remote diagnosis mark is introduced to control that only one remote diagnosis can be performed at the same time. Specifically, referring to fig. 4, the remote diagnosis method provided by the embodiment of the present invention may further include the following steps.
S12, setting a remote diagnosis mark when the current state of the vehicle meets diagnosis conditions. Step S12 may be performed before step S13 or may be performed simultaneously.
S19, when all diagnostic operations corresponding to the remote diagnostic request are completed, the remote diagnostic mark is cleared.
By controlling the above-described step S111, step S12 and step S19, only one remote diagnosis can be made on the vehicle at the same time.
Further, in view of the difference in remote diagnosis protocols adopted by different factories, and the possibility that the same factory uses a plurality of remote diagnosis protocols, for quick determination of an objective function, with reference to fig. 5, for S13, the objective function can be determined by the following steps.
S131, acquiring a protocol analysis function taking the vehicle factory identification as an index from a plurality of protocol analysis functions as a preselected analysis function.
S132, detecting the remote diagnosis request to obtain a data structure of the remote diagnosis request.
Wherein the data structure includes, but is not limited to: identification, format, length, etc.
S133, determining a target protocol adopted by the remote diagnosis request according to the data structure, and selecting a protocol analysis function of the target protocol from all protocol analysis functions as the target function.
Through the above steps S131 to S133, the protocol parsing function of the remote diagnosis protocol can be precisely located.
For the diagnosis information obtained by analyzing the remote diagnosis protocol by adopting the objective function, different remote diagnosis requests may have different contents of the corresponding diagnosis information, for example, the diagnosis information may include any one or any several of a diagnosis request ID, diagnosis data content, diagnosis data length and instruction type, and the diagnosis information may also be a piece of unknown data, that is, the diagnosis information may also include device identification data and diagnosis content data. Wherein the diagnostic request ID is an identification of the target control device.
In order to obtain accurate diagnostic instructions, an addressing macro and a parsing macro are introduced, and the domain controller may be preconfigured with the addressing macro and the parsing macro. Specifically, in one possible embodiment, referring to fig. 6, step S15 may obtain the diagnosis instruction and the target control apparatus of the diagnosis instruction through the following steps.
S151, processing the equipment identification data by adopting a preset addressing macro to obtain the physical addressing ID of the target control equipment.
In this embodiment, step S151 may be further implemented as: and judging whether the equipment identification data is a physical addressing ID by adopting a preset addressing macro, if not, looking up a table of the equipment identification data to obtain the physical addressing ID corresponding to the equipment identification data.
And S152, identifying the diagnosis content data based on the UDS protocol and/or a preset analysis macro, and determining the service ID and the effective length corresponding to each service ID.
S153, for each service ID, taking the first byte after the service ID in the diagnostic content data as an extraction starting point, and extracting data according to the effective length corresponding to the service ID to obtain a diagnostic instruction of the service ID.
In this embodiment, the addressing macro may be: # define RemoteDiagIDType RemoteDiagID/RemoteDiagIdentifier. The RemoteDiagIDType may be defined as RemoteDiagID or RemoteDiagIdentifier, remoteDiagID indicating that the diagnostic information includes a diagnostic request ID as a physical address ID, which is a physical address ID of the target control device, and may be directly used in a subsequent step. The RemoteDiagIdentifier indicates that the received diagnostic request ID is the device identification data of the corresponding target control device, and the physical address ID of the corresponding target control device needs to be obtained through table lookup.
The parsing macro may be: # define RemoteDiagDataType RemoteDiagDataWithLength/RemoteDiagDataWithoutLength. The RemoteDiagDataType may be defined as a length filled when RemoteDiagDataWithLength or RemoteDiagDataWithoutLength, remoteDiagDataWithLength indicates that the received diagnostic content data includes a length filled when the diagnostic content data is sent to the CAN bus, and may be used directly later, and the RemoteDiagDataWithLength indicates that the received data content does not include a length filled when the diagnostic content data is sent to the CAN bus, and is required to be used after service ID processing according to the UDS protocol.
Under the condition that the remoteDiagDataType is remoteDagDataWithoutLength, identifying the diagnosis content data based on the UDS protocol, and determining all service IDs in the diagnosis content data and the effective length corresponding to each service ID. Further, the data is extracted based on the effective length of each service ID to obtain a diagnosis instruction.
For example, after identification by the UDS protocol, the structure of the diagnostic content data is known as follows: service ID1+ service ID2+ … + service IDn. And for the service ID1, extracting data with the length being the effective length of the service ID1 from the related data of the service ID1 to obtain a diagnosis instruction corresponding to the service ID 1.
The diagnosis content data processing method is distinguished through remoteDiagDataType, and the diagnosis content data is circularly processed according to the length+the actual data to obtain diagnosis instructions, for example: the relevant data for service ID1+ service ID1 are: 021003, the data content of the diagnostic command is 1003, with a length of 2. And each time a diagnostic instruction is extracted, inserting the diagnostic instruction insertion format into the remote diagnostic queue RemoteDiagTxFIFO until all diagnostic instructions are extracted.
The diagnostic instruction includes the address ID of the target control device.
For step S15, sending each diagnostic instruction to the corresponding target control device may be further implemented as the following steps.
Step 1, adding diagnostic instructions to a remote diagnostic queue in sequence.
And 2, determining the diagnosis instruction which is sequenced forefront in the remote diagnosis queue, and sending the diagnosis instruction to the corresponding target control equipment.
And step 3, after receiving diagnosis execution data returned by the target control equipment for the diagnosis instruction, inserting the diagnosis execution data into the remote diagnosis queue, and returning to the step 2.
For each instruction in the remote diagnosis queue RemoteDiagTxFIFO, the loop issue is performed according to the first-in first-out, and after the response data is obtained, the next diagnosis instruction is issued.
Further, the data processing module obtains the diagnosis execution data of the last issued diagnosis instruction according to the first-in first-out sequence, then obtains the diagnosis instruction after the last issued diagnosis instruction, and determines the target control device according to the physical addressing ID in the diagnosis instruction.
If the target control device is the domain controller itself, the domain controller responds to the diagnosis instruction to execute diagnosis operation, and the obtained diagnosis execution data is inserted into a remote diagnosis queue.
If the target control device is the target control device of each functional component, configuring Tp layer sending and receiving channels according to the diagnosis request ID, and sending the diagnosis instruction to the CAN bus according to the UDS protocol packaging data for transmission to the target control device. And when the diagnosis execution data returned by the target control device is obtained from the can bus, inserting the diagnosis execution data into a remote diagnosis queue. And if any instruction is executed overtime, ending the remote diagnosis.
Considering that the remote diagnosis protocols of different projects of different factories are different, for step S17, packaging the diagnosis execution data into response data may be further implemented as: and packaging the diagnosis execution data into response data according to a protocol corresponding to the objective function.
And packaging all diagnosis execution data of each diagnosis instruction of the remote diagnosis protocol according to the protocol corresponding to the objective function, and setting a corresponding response code to obtain response data.
In other embodiments, the packing rule of the vehicle may be obtained from a preset protocol library, and the diagnostic execution data may be packed, which is not particularly limited in this embodiment.
The remote diagnosis method provided by the embodiment of the invention provides a set of universal remote diagnosis realization method for the vehicle-mounted domain controller, and aims at remote diagnosis requests of different remote diagnosis projects, remote diagnosis can be performed only by selecting different protocol analysis functions in a differentiated manner, so that the development efficiency is improved, and the problem investigation and treatment are easy to realize. Meanwhile, the processing sequence of the remote diagnosis request is orderly controlled, and the orderly processing of each diagnosis instruction and the diagnosis execution data thereof is realized, so that the data accuracy and the transmission stability can be improved.
Based on the same inventive concept of the remote diagnosis method described above, in one possible implementation, the embodiment of the present invention further provides a remote diagnosis device 150, which can be applied to the controller in fig. 1. Referring to fig. 7, the remote diagnosis apparatus 150 may include a condition detection module 160, a protocol parsing module 170, and a data processing module 180.
The condition detection module 160 is configured to determine, when a remote diagnosis request forwarded by the vehicle-mounted TBOX is received, whether a current state of the vehicle meets a diagnosis condition. Wherein the remote diagnostic request is sent by the cloud server to the on-board TBOX.
The protocol analysis module 170 is configured to, when the current state of the vehicle satisfies the diagnostic condition, retrieve an objective function from a plurality of protocol analysis functions in the protocol analysis library according to the vehicle factory information of the vehicle, and perform protocol analysis on the remote diagnostic request to obtain diagnostic information.
The data processing module 180 is configured to perform instruction analysis on the diagnostic information to obtain at least one diagnostic instruction, and a target control device of each diagnostic instruction, and send each diagnostic instruction to a corresponding target control device.
Wherein each diagnostic instruction is configured to cause a target component corresponding to the target control device to perform a diagnostic operation.
The data processing module 180 is further configured to receive diagnostic execution data returned by the target control device for the diagnostic instruction, package the diagnostic execution data into response data, and send the response data to the on-vehicle TBOX, so as to send the response data to the cloud server through the on-vehicle TBOX.
In the remote diagnosis device 150, by the synergistic effect of the condition detection module 160, the protocol analysis module 170 and the data processing module 180, for different remote diagnosis requests, the remote diagnosis function can be realized by processing the remote diagnosis request based on a plurality of protocol analysis functions pre-stored in the protocol analysis library, and the remote diagnosis function can be realized by differentially selecting the objective function without adopting different processing flows for different projects of different vehicles and factories, so that the development of the remote diagnosis function can be simplified and the development efficiency can be improved.
For specific limitations of the remote diagnostic device 150, reference is made to the above limitations of the remote diagnostic method, and no further description is given here. The various modules in the remote diagnostic device 150 described above may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or independent of a processor in the electronic device, or may be stored in software in a memory of the electronic device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, an electronic device 190 is provided, and the electronic device 190 may be a terminal, and an internal structure thereof may be as shown in fig. 8. The electronic device 190 includes a processor, memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the electronic device 190 is configured to provide computing and control capabilities. The memory of the electronic device 190 includes a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The communication interface of the electronic device 190 is used for performing wired or wireless communication with an external terminal, where the wireless communication may be implemented through WIFI, an operator network, near Field Communication (NFC), or other technologies. The computer program, when executed by a processor, implements the remote diagnostic method provided in the above embodiments.
The architecture shown in fig. 8 is merely a block diagram of a portion of the architecture associated with the inventive arrangements and is not limiting of the electronic device 190 to which the inventive arrangements are applied, and a particular electronic device 190 may include more or fewer components than shown in fig. 8, or may combine certain components, or have a different arrangement of components.
In one embodiment, the remote diagnostic apparatus 150 provided by the present invention may be implemented in the form of a computer program that is executable on an electronic device 190 as shown in FIG. 8. The memory of the electronic device 190 may store various program modules constituting the remote diagnosis apparatus 150, such as the condition detection module 160, the protocol parsing module 170, and the data processing module 180 shown in fig. 7. The computer program of each program module causes a processor to execute the steps in the remote diagnosis method described in the present specification.
For example, the electronic device 190 shown in fig. 8 may perform step S11 through the condition detection module 160 in the remote diagnosis apparatus 150 shown in fig. 7. The electronic device 190 may perform step S13 through the protocol parsing module 170. The electronic device 190 may perform S15 and step S17 through the data processing module 180.
In one embodiment, an electronic device 190 is provided that includes a memory storing machine executable instructions and a processor that when executed performs the following steps: when a remote diagnosis request forwarded by a vehicle-mounted TBOX is received, judging whether the current state of the vehicle meets diagnosis conditions or not; if yes, according to the vehicle factory information of the vehicle, calling an objective function from a plurality of protocol analysis functions in a protocol analysis library, and carrying out protocol analysis on the remote diagnosis request to obtain diagnosis information; the method comprises the steps of carrying out instruction analysis on diagnostic information to obtain at least one diagnostic instruction and target control equipment of each diagnostic instruction, and sending each diagnostic instruction to corresponding target control equipment; and receiving diagnosis execution data returned by the target control equipment aiming at the diagnosis instruction, packaging the diagnosis execution data into response data, and sending the response data to the vehicle-mounted TBOX so as to be sent to the cloud server through the vehicle-mounted TBOX.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of: when a remote diagnosis request forwarded by a vehicle-mounted TBOX is received, judging whether the current state of the vehicle meets diagnosis conditions or not; if yes, according to the vehicle factory information of the vehicle, calling an objective function from a plurality of protocol analysis functions in a protocol analysis library, and carrying out protocol analysis on the remote diagnosis request to obtain diagnosis information; the method comprises the steps of carrying out instruction analysis on diagnostic information to obtain at least one diagnostic instruction and target control equipment of each diagnostic instruction, and sending each diagnostic instruction to corresponding target control equipment; and receiving diagnosis execution data returned by the target control equipment aiming at the diagnosis instruction, packaging the diagnosis execution data into response data, and sending the response data to the vehicle-mounted TBOX so as to be sent to the cloud server through the vehicle-mounted TBOX.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other manners as well. The apparatus embodiments described above are merely illustrative, for example, of the flowcharts and block diagrams in the figures that illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present invention may be integrated together to form a single part, or each module may exist alone, or two or more modules may be integrated to form a single part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A remote diagnosis method, characterized by being applied to a domain controller on a vehicle, the domain controller being communicatively connected to a vehicle-mounted TBOX of the vehicle and a control device of each functional component, respectively, the domain controller storing a protocol parsing library in advance, the method comprising:
when a remote diagnosis request forwarded by the vehicle-mounted TBOX is received, judging whether the current state of the vehicle meets diagnosis conditions or not; wherein the remote diagnostic request is sent by a cloud server to the on-board TBOX;
if yes, according to the vehicle factory information of the vehicle, calling an objective function from a plurality of protocol analysis functions in the protocol analysis library, and carrying out protocol analysis on the remote diagnosis request to obtain diagnosis information;
performing instruction analysis on the diagnosis information to obtain at least one diagnosis instruction and target control equipment of each diagnosis instruction, and sending each diagnosis instruction to corresponding target control equipment; each diagnosis instruction is used for prompting a target component corresponding to the target control equipment to execute diagnosis operation;
and receiving diagnosis execution data returned by the target control equipment aiming at the diagnosis instruction, packaging the diagnosis execution data into response data, and sending the response data to the vehicle-mounted TBOX so as to be sent to the cloud server through the vehicle-mounted TBOX.
2. The remote diagnosis method according to claim 1, wherein the diagnosis information includes device identification data and diagnosis content data;
the step of analyzing the diagnostic information to obtain at least one diagnostic instruction and a target component of each diagnostic instruction includes:
processing the equipment identification data by adopting a preset addressing macro to obtain a physical addressing ID of target control equipment;
identifying the diagnosis content data based on a UDS protocol and/or a preset analysis macro, and determining a service ID and an effective length corresponding to each service ID;
and for each service ID, taking a first byte after the service ID in the diagnosis content data as an extraction starting point, and extracting data according to the effective length corresponding to the service ID to obtain a diagnosis instruction of the service ID.
3. The remote diagnosis method according to claim 1 or 2, wherein the vehicle factory information includes a vehicle factory identification, and the step of calling an objective function from the plurality of protocol analysis functions according to the vehicle factory information of the vehicle includes:
acquiring a protocol analysis function taking the vehicle-factory identifier as an index from the protocol analysis functions as a preselected analysis function;
Detecting the remote diagnosis request to obtain a data structure of the remote diagnosis request;
and determining a target protocol adopted by the remote diagnosis request according to the data structure, and selecting a protocol analysis function of the target protocol from all protocol analysis functions as a target function.
4. The remote diagnostic method of claim 1 or 2, wherein the method further comprises:
when an analysis function updating instruction transmitted by operation and maintenance equipment is received, analyzing a new protocol analysis function from the analysis function updating instruction, and writing the new protocol analysis function into the protocol analysis library;
the new protocol analysis function is sent by the operation and maintenance equipment when the remote diagnosis protocol of the vehicle is changed.
5. The remote diagnostic method of claim 1 or 2, wherein the method further comprises:
setting a remote diagnosis mark under the condition that the current state of the vehicle meets diagnosis conditions;
the diagnostic condition includes a diagnostic state of a component to be diagnosed, and the step of judging whether the current state of the vehicle satisfies the diagnostic condition includes:
judging whether the domain controller is provided with the remote diagnosis mark;
If not, judging whether the current state of each component to be diagnosed meets the respective diagnosis state according to the order of the diagnosis priority of each component to be diagnosed; wherein the component to be diagnosed comprises a power supply and an engine of the vehicle;
the method further comprises the steps of:
and when all diagnostic operations corresponding to the remote diagnostic request are completed, the remote diagnostic mark is cleared.
6. The remote diagnosis method according to claim 1 or 2, characterized in that the step of transmitting each of the diagnosis instructions to the corresponding target control apparatus comprises:
sequentially adding the diagnosis instructions to a remote diagnosis queue;
determining a diagnosis instruction with the forefront sequencing in the remote diagnosis queue, and transmitting the diagnosis instruction to corresponding target control equipment;
and after receiving diagnosis execution data returned by the target control equipment aiming at the diagnosis instruction, inserting the diagnosis execution data into the remote diagnosis queue, returning to execute the step of determining the diagnosis instruction with the forefront sequencing in the remote diagnosis queue, and issuing the diagnosis instruction to the corresponding target control equipment.
7. The remote diagnosis method according to claim 2, wherein the step of processing the device identification data using a preset addressing macro to obtain a physical addressing ID of the target control device comprises:
And judging whether the equipment identification data is a physical addressing ID or not by adopting a preset addressing macro, if not, looking up a table of the equipment identification data to obtain the physical addressing ID corresponding to the equipment identification data.
8. The remote diagnosis device is characterized by being applied to a domain controller on a vehicle, wherein the domain controller is respectively in communication connection with a vehicle-mounted TBOX of the vehicle and control equipment of each functional component, the domain controller stores a protocol analysis library in advance, and the remote diagnosis device comprises a condition detection module, a protocol analysis module and a data processing module;
the condition detection module is used for judging whether the current state of the vehicle meets the diagnosis condition or not when the remote diagnosis request forwarded by the vehicle-mounted TBOX is received; wherein the remote diagnostic request is sent by a cloud server to the on-board TBOX;
the protocol analysis module is used for calling an objective function from a plurality of protocol analysis functions in the protocol analysis library according to the vehicle factory information of the vehicle under the condition that the current state of the vehicle meets the diagnosis condition, and carrying out protocol analysis on the remote diagnosis request to obtain diagnosis information;
The data processing module is used for carrying out instruction analysis on the diagnosis information to obtain at least one diagnosis instruction and target control equipment of each diagnosis instruction, and sending each diagnosis instruction to the corresponding target control equipment; each diagnosis instruction is used for prompting a target component corresponding to the target control equipment to execute diagnosis operation;
the data processing module is further configured to receive diagnosis execution data returned by the target control device for the diagnosis instruction, package the diagnosis execution data into response data, and send the response data to the vehicle-mounted TBOX, so as to send the response data to the cloud server through the vehicle-mounted TBOX.
9. An electronic device comprising a processor and a memory, the memory storing machine executable instructions executable by the processor to implement the remote diagnostic method of any one of claims 1-7.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the remote diagnosis method according to any one of claims 1 to 7.
CN202310166888.5A 2023-02-24 2023-02-24 Remote diagnosis method, remote diagnosis device, electronic equipment and computer readable storage medium Pending CN116300804A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310166888.5A CN116300804A (en) 2023-02-24 2023-02-24 Remote diagnosis method, remote diagnosis device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310166888.5A CN116300804A (en) 2023-02-24 2023-02-24 Remote diagnosis method, remote diagnosis device, electronic equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN116300804A true CN116300804A (en) 2023-06-23

Family

ID=86786241

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310166888.5A Pending CN116300804A (en) 2023-02-24 2023-02-24 Remote diagnosis method, remote diagnosis device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN116300804A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117032162A (en) * 2023-08-04 2023-11-10 广州汽车集团股份有限公司 Remote diagnosis method, device, equipment and storage medium for vehicle

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117032162A (en) * 2023-08-04 2023-11-10 广州汽车集团股份有限公司 Remote diagnosis method, device, equipment and storage medium for vehicle

Similar Documents

Publication Publication Date Title
CN107925600B (en) Security processing method and server
CN112367318B (en) Security processing method and computer
CN105981336B (en) Abnormality detection electronic control unit, vehicle-mounted network system, and abnormality detection method
EP3352079B1 (en) Gateway device, vehicle-mounted network system, and firmware update method
US10819792B2 (en) Device and method for extracting data from a communication bus of a motor vehicle
US8983714B2 (en) Failsafe communication system and method
US11178164B2 (en) Data analysis apparatus
US10726645B2 (en) Vehicle diagnostic operation
KR20120093283A (en) Method and system for processing information relating to a vehicle
CN109873652B (en) Vehicle-mounted relay device, external device, information processing device, method, and system
KR101723631B1 (en) Method for testing linkage evaluation between vehicle equipments
CN109005678B (en) Illegal communication detection method, illegal communication detection system, and recording medium
EP4113287B1 (en) Gateway device, in-vehicle network system, and firmware update method
CN109076016B (en) Illegal communication detection criterion determining method, illegal communication detection criterion determining system, and recording medium
CN110995555B (en) CAN communication method, system and medium for controlling in a vehicle using displaced CAN message reference
CN116300804A (en) Remote diagnosis method, remote diagnosis device, electronic equipment and computer readable storage medium
US20130238190A1 (en) Vehicle-mounted application management device and vehicle-mounted application management method
EP4064649A1 (en) Systems and methods for data message decoding and asset type fingerprinting
KR20190119514A (en) On-board cybersecurity diagnostic system for vehicle, electronic control unit, and operating method thereof
WO2016041910A1 (en) Method and system for sharing transport information
CN102713858A (en) Online debugging system for information processing device and online debugging method
CN112083804A (en) Guidance interaction method and device for vehicle-mounted key, vehicle and storage medium
US20210327165A1 (en) Vehicle malfunction prediction system, monitoring device, vehicle malfunction prediction method, and vehicle malfunction prediction program
US20080161994A1 (en) Method and system for autogenerating static fault code data based on a unified summary table for heavy duty diesel engines
EP4064652A1 (en) Systems and methods for asset type fingerprinting and data message decoding

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination