CN113485920B - Method and device for realizing DoIP entity, readable storage medium and electronic equipment - Google Patents

Method and device for realizing DoIP entity, readable storage medium and electronic equipment Download PDF

Info

Publication number
CN113485920B
CN113485920B CN202110742529.0A CN202110742529A CN113485920B CN 113485920 B CN113485920 B CN 113485920B CN 202110742529 A CN202110742529 A CN 202110742529A CN 113485920 B CN113485920 B CN 113485920B
Authority
CN
China
Prior art keywords
server
doip
client
vehicle
diagnosis
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.)
Active
Application number
CN202110742529.0A
Other languages
Chinese (zh)
Other versions
CN113485920A (en
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.)
Zhongling Zhixing Chengdu Technology Co ltd
Original Assignee
Zhongling Zhixing Chengdu 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 Zhongling Zhixing Chengdu Technology Co ltd filed Critical Zhongling Zhixing Chengdu Technology Co ltd
Priority to CN202110742529.0A priority Critical patent/CN113485920B/en
Publication of CN113485920A publication Critical patent/CN113485920A/en
Application granted granted Critical
Publication of CN113485920B publication Critical patent/CN113485920B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/36Software reuse
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • H04L69/162Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms

Abstract

The invention relates to a method, a device, a readable storage medium and electronic equipment for realizing a DoIP entity, which are applied to a vehicle-mounted Ethernet, wherein the DoIP entity refers to an electronic element for realizing a DoIP protocol in the vehicle-mounted Ethernet, and the DoIP protocol refers to an IP-based diagnosis protocol; the method comprises the following steps: a C/S model is adopted to realize the server side and the client side of the DoIP entity; the server is used for realizing the DoIP protocol; the client is used for interacting diagnostic data with the server and carrying out custom development. The technical problems that the development period is long, the development and test cost is greatly increased, the program of the server can be well reused, the cost of software testing is reduced, and the deployment of software is accelerated because the function of each DoIP entity is different and each DoIP entity needs to be independently developed and tested in the prior art are solved.

Description

Method and device for realizing DoIP entity, readable storage medium and electronic equipment
Technical Field
The invention relates to the field of automobile diagnosis, in particular to a method and a device for realizing a DoIP entity, a readable storage medium and electronic equipment.
Background
In the process of diagnosing a vehicle, the electronic components in the vehicle can be diagnosed based on an IP (Internet Protocol ), and the electronic components for implementing the DoIP (Diagnostic over IP, IP-based diagnosis) protocol in the vehicle-mounted ethernet are called DoIP entities, and because the functions of each DoIP entity are different, separate function development and test are required for each DoIP entity, which results in a long development period and greatly increased development and test costs.
Disclosure of Invention
The invention aims to provide a method, a device, a readable storage medium and electronic equipment for realizing DoIP entities, which are used for solving the technical problems that in the prior art, as the functions of each DoIP entity are different, each DoIP entity needs to be independently developed and tested, the development period is long, and the development and test cost is greatly increased.
In order to achieve the above object, a first aspect of the present invention provides a method for implementing a DoIP entity, which is applied to a vehicle-mounted ethernet, where the DoIP entity refers to an electronic element implementing a DoIP protocol in the vehicle-mounted ethernet, and the DoIP protocol refers to an IP-based diagnostic protocol; the method comprises the following steps:
a C/S model is adopted to realize the server side and the client side of the DoIP entity; the server is used for realizing the DoIP protocol; the client is used for interacting diagnostic data with the server and carrying out custom development.
Optionally, the method further comprises:
when the vehicle diagnosis is carried out, the server receives diagnosis information sent by external test equipment and forwards the diagnosis information to the client;
the client acquires a diagnosis result corresponding to the diagnosis information and returns the diagnosis result to the server;
and the server receives the diagnosis result returned by the client and sends the diagnosis result to the external test equipment.
Optionally, the client obtains a diagnosis result corresponding to the diagnosis information, including:
judging the entity type of the DoIP entity; the entity type is one of an edge gateway, a gateway or a node;
if the entity type is an edge gateway or a gateway, the client forwards the diagnosis information to an associated Electronic Control Unit (ECU) in the vehicle-mounted Ethernet and receives a diagnosis result fed back by the ECU; or (b)
And if the entity type is a node, the client generates a diagnosis result based on the diagnosis information.
Optionally, if the entity type is the edge gateway, before the server receives the diagnostic information sent by the external test device and forwards the diagnostic information to the client, the method further includes:
the server loads data information for realizing the DoIP function;
the server creates a timer thread, a TCP/UDP Socket read-write management thread and a local Socket read-write management thread;
the server creates TCP/UDP Socket monitoring and local Socket monitoring;
the server side sets vehicle information; the vehicle information comprises a vehicle identification number VIN, a unique identifier EID of the DoIP entity and a unique identifier GID of a group of DoIP entities in the same vehicle;
the server determines that the external test equipment and the vehicle are connected with a network activation line, and performs vehicle network activation;
after the vehicle network is successfully activated, the server allocates an IP address to the DoIP entity in the vehicle-mounted Ethernet;
the server side sets the ECU in the vehicle-mounted Ethernet to be in a starting state;
the client establishes Socket connection with the server;
the client registers monitoring with the server.
Optionally, if the entity type is the gateway/node, before the server receives the diagnostic information sent by the external test device and forwards the diagnostic information to the client, the method includes:
the server loads data information for realizing the DoIP function;
the server creates a TCP/UDP Socket read-write management thread and a local Socket read-write management thread;
the server creates TCP/UDP Socket monitoring and local Socket monitoring;
the client establishes Socket connection with the server;
the client registers monitoring with the server.
Optionally, the method further comprises:
and establishing communication connection between the server and the client based on any one mode of Socket, pipeline, semaphore, signal, message queue or shared memory.
The second aspect of the present invention provides a device for implementing a DoIP entity, which is applied to a vehicle-mounted ethernet, where the DoIP entity refers to an electronic element implementing a DoIP protocol in the vehicle-mounted ethernet, and the DoIP protocol refers to an IP-based diagnostic protocol; the device comprises a client and a server which adopt a C/S model;
the server is used for realizing the DoIP protocol;
the client is used for interacting diagnostic data with the server and carrying out custom development.
A third aspect of the invention provides a non-transitory computer readable storage medium having stored thereon a computer program which when executed by a processor implements the steps of the method of the first aspect.
A fourth aspect of the present invention provides an electronic device, comprising:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to implement the steps of the method of the first aspect.
Through the technical scheme, the Client (Client) performs custom development according to the actual requirement of a user by adopting the C/S model, and the Server (Server) is used for realizing standard protocol content specified by ISO13400-2, so that the Client has the following advantages: the implementation of the ISO13400-2 DoIP protocol and the development part of specific requirements of users are decoupled, so that the development of individual functions of the DoIP entity is facilitated. Because the ISO13400-2 DoIP protocol content realized by the Server end is a fixed program, after the development is finished and the test is finished, the user only needs to modify the Client end program according to the actual demand of the user without modifying the Server end program, so that repeated tests on the Server end are not needed, the problem in the prior art that because the functions of each DoIP entity are different, and each DoIP entity needs to be independently developed and tested is solved, the technical problems of long development period and greatly increasing development and test cost are caused, the programs of the Server end can be well reused, the cost of software test is reduced, and the deployment of software is accelerated.
Additional features and advantages of the invention will be set forth in the detailed description which follows.
Drawings
The accompanying drawings are included to provide a further understanding of the invention, and are incorporated in and constitute a part of this specification, illustrate the invention and together with the description serve to explain, without limitation, the invention. In the drawings:
FIG. 1 is a schematic diagram of a C/S model of a DoIP entity shown in accordance with an exemplary embodiment;
FIG. 2 is a flow chart illustrating a method of implementing a DoIP entity according to an exemplary embodiment;
FIG. 3 is a flow chart of a Server side of an edge gateway, according to an example embodiment;
FIG. 4 is a flow diagram illustrating the Client side of an edge gateway according to an example embodiment;
FIG. 5 is a flowchart of a Server side of a gateway/node shown according to an exemplary embodiment;
fig. 6 is a block diagram of an electronic device, according to an example embodiment.
Detailed Description
The following describes specific embodiments of the present invention in detail with reference to the drawings. It should be understood that the detailed description and specific examples, while indicating and illustrating the invention, are not intended to limit the invention.
In this specification, first, a diagnosis technique of an automobile ECU will be described.
ECU (Electronic Control Unit) is an abbreviation for electronic control unit. The microcomputer is specially used for automobiles. Modern automobiles are becoming increasingly functional, and various subsystems on the automobile require powerful ECUs to control the operation of the system. For example, the gearbox ECU adjusts a proper gear according to the current speed and rotation speed, and the air conditioner ECU automatically adjusts the temperature according to the current temperature. The application of the automobile ECU diagnosis comprises the steps of reading an ECU fault code in after-sales service, accurately positioning faults and saving maintenance man-hour; before the whole vehicle is off line, performing operations such as coding, parameter rewriting, terminal element detection and the like on different configured vehicle types; and updating software to the ECU during the development phase, etc. The automobile ECU diagnosis is a communication process, and in the embodiment of the invention, the diagnosis of electronic elements in the automobile can be performed in an IP-based manner.
DoIP is defined by ISO13400 series standard as a scheme for realizing diagnostic communication based on Ethernet. Electronic components implementing the DoIP (Diagnostic over IP: IP-based diagnostics) protocol in the in-vehicle ethernet are called DoIP entities.
The inventor of the scheme finds that the software model description of the DoIP entities is not given in the ISO13400 protocol, if the DoIP entities are used as a whole for program development, each DoIP entity needs to be subjected to independent function development and test, which results in long development period and greatly increased development and test cost. Therefore, the present invention proposes a method for implementing a DoIP entity in a vehicle-mounted ethernet by using a C/S model, as shown in fig. 1, the method for implementing a DoIP entity includes the following steps.
Step 101, a C/S model is adopted to realize the server side and the client side of the DoIP entity; the server is used for realizing the DoIP protocol; the client is used for interacting diagnostic data with the server and carrying out custom development.
As shown in fig. 2, the DoIP Entity (DoIP Entity) includes a Client (i.e., client side) and a Server side. The main functions of each component are as follows:
and the client interacts with the diagnosis data and the user develops the custom program according to the actual specific requirements.
And the server is used for realizing the ISO13400-2 standard DoIP protocol. In the embodiment of the invention, the DoIP protocol refers to an ISO13400-2 standard DoIP protocol, and is hereinafter referred to as an ISO13400-2 DoIP protocol.
In the embodiment of the invention, the custom development refers to the custom development according to specific requirements and functions according to different DoIP entities.
The advantage of this is: the implementation of the ISO13400-2 DoIP protocol and the development part of specific requirements of users are decoupled, so that the development of individual functions of the DoIP entity is facilitated. Because the ISO13400-2 DoIP protocol content realized by the Server end is a fixed program, after the development is finished and the test is finished, the user only needs to modify the Client end program according to the actual demand of the user without modifying the Server end program, so that repeated tests on the Server end are not needed, the problem in the prior art that because the functions of each DoIP entity are different, and each DoIP entity needs to be independently developed and tested is solved, the technical problems of long development period and greatly increasing development and test cost are caused, the programs of the Server end can be well reused, the cost of software test is reduced, and the deployment of software is accelerated.
In the embodiment of the invention, the following several types of nodes may exist in the vehicle network.
An edge gateway, in the case of an on-board network, must be present and has only one edge gateway (DoIP edge node gateway) which serves as the only interface of the vehicle to external diagnostic equipment. For external test equipment, they must only connect and communicate directly with the edge gateway, and communications with other ECUs in the vehicle network must be routed by the edge gateway.
The gateway supports the DoIP protocol and also acts as a gateway, behind which is the ECU subnetwork.
The node, the ECU supporting the DoIP protocol while supporting the ethernet connection, is considered as the DoIP node.
The different types of entities can adopt the C/S model in the embodiment of the invention to realize the service end and the client end of the DoIP entity.
Next, an implementation method and an implemented function of the different types of nodes will be described.
As shown in fig. 3, the Server side of the edge gateway is used to execute the following steps.
Step 301, loading configuration information. Loading configuration information refers to loading data information of the DoIP function from the configuration file; loading configuration information includes, but is not limited to, reading whether the IP address type is IPv4 or IPv6; reading whether the DoIP entity type is an edge gateway, a gateway or a node; reading the Socket number which can be connected with the DoIP entity at most; reading the maximum data size of a logic request which can be processed by the DoIP entity; reading the version of the DoIP protocol; reading a source address of external test equipment; reading the time interval of 3 vehicle announcements; reading the longest time allowed by the route activation after the external test equipment and the DoIP entity establish connection; reading the longest time allowed by the external test equipment to not perform diagnostic operation after the external test equipment successfully performs route activation; reading the logic address of the DoIP entity; reading a logical address addressed by the function; read routing tables, etc.
In step 302, a thread is created. The creation thread is used for creating a timer thread, a TCP/UDP Socket read-write management thread and a local Socket read-write management thread. Wherein the timer thread is used for processing the instructions defined by the ISO13400 protocol: a_doip_Annunce_interval (3 vehicle announced time intervals) timer, t_TCP_initial_activity (maximum time allowed for no route activation after the external test device and the DoIP entity establish a connection), t_TCP_general_activity (maximum time allowed for no diagnostic operation after the external test device successfully route-activated), etc. The TCP/UDP Socket read-write management thread is used for processing interaction with external test equipment specified by the ISO13400 protocol, a vehicle identification request sent by the external test equipment, a route activation request, a diagnosis message and the like. The local Socket read-write management thread is used for processing data interaction between the Server terminal and the Client terminal, transmitting diagnostic information sent by the external test equipment to the Client terminal, and returning a diagnostic result to the Server terminal by the Client terminal.
Step 303, create Socket listening. Creating Socket interception refers to creating TCP/UDP Socket interception and local Socket interception. The TCP/UDP Socket monitoring is used for establishing Socket connection between a Server end and external test equipment, and performing interaction of vehicle identification, route activation, diagnosis and the like. The local Socket monitoring is used for establishing Socket connection between the Server end and the Client end to perform interaction of diagnostic data.
In step 304, vehicle information is set, which means that vehicle information such as VIN (vehicle identification number or frame number, vehicle Identification Number), EID (unique identifier of DoIP Entity), GID (unique identifier of a Group of DoIP entities in the same vehicle) and the like of the vehicle are set.
Step 305, connect to the network activation line, which means that the external test device and the vehicle are already connected to the network activation line, and perform the network activation of the vehicle.
Step 306, assigning the IP address refers to performing IP address assignment on the DoIP entity after the vehicle network is successfully activated.
Setting 307 the ECU status refers to the ECU on the vehicle being successfully started, and diagnosis of the vehicle may begin, otherwise, diagnosis of the vehicle may not be available.
As shown in fig. 4, the Client side of the edge gateway is used to perform the following steps.
In step 401, establishing connection means that the Client end and the Server end establish Socket connection.
Step 402, client registration monitoring refers to Client registration callback monitoring, so that the Client can receive diagnostic data information sent by the Server;
and 403, the client receives the notification of the Server and performs custom processing on the received diagnostic data information.
For a gateway or node, as shown in fig. 5, the Server is configured to perform the following steps.
Step 501, loading configuration information, namely loading data information for realizing the DoIP function.
Step 502, a thread is created, namely a TCP/UDP Socket read-write management thread and a local Socket read-write management thread are created.
In step 503, a monitor is created, i.e. a TCP/UDP Socket monitor and a local Socket monitor are created.
The steps performed by the Client side of the gateway or node are similar to those performed by the edge gateway and will not be described in detail herein.
Next, a vehicle diagnostic process will be described.
In the embodiment of the invention, when the DoIP entity loads the configuration information, whether the DoIP entity type is an edge gateway, a gateway or a node can be read. When the vehicle diagnosis is carried out, if the type of the DoIP entity is an edge gateway, the Server end of the DoIP entity directly receives diagnosis information sent by external test equipment and forwards the diagnosis information to the Client end, and then the Client end forwards the diagnosis information to an associated electronic control unit ECU in the vehicle-mounted Ethernet. Modern automobiles are becoming increasingly functional, and the automobile may have multiple ECU subnetworks, the relevant ECU may be within the ECU subnetwork behind the edge gateway, within the ECU subnetwork behind other gateways, or the relevant ECU may be a separate DoIP node. Then, the Client receives the diagnosis result fed back by the ECU, and returns the diagnosis result to the Server.
If the DoIP entity type is gateway, the Server end of the DoIP entity receives the diagnosis information sent by the external test equipment through the edge gateway, and forwards the diagnosis information to the Client end, and then the Client end forwards the diagnosis information to the relevant ECU. The Client receives the diagnosis result fed back by the ECU and returns the diagnosis result to the Server.
If the DoIP entity type is a node, the Server end of the DoIP entity receives the diagnosis information sent by the external test equipment through the edge gateway, and the Client end generates a diagnosis result based on the diagnosis information and returns the diagnosis result to the Server end.
And finally, sending a diagnosis result returned by the ECU or the node to the external test equipment through a Server end of the edge gateway, thereby completing vehicle diagnosis.
In the foregoing embodiment, the communication between the Client and the Server of the DoIP entity is implemented in a Socket-based manner. Based on the inventive concept embodied by the present invention, other implementation schemes may be further adopted, for example: the communication between the Client end and the Server end of the DoIP entity is realized through pipelines, semaphores, signals, message queues, shared memory and the like.
The invention is based on the new software architecture idea of the DoIP entity in the software implementation of the DoIP protocol, the implementation of the DoIP entity is divided into two parts, namely a Client end and a Server end, the Client end can be subjected to custom development according to the actual requirement, and the Server end is used for implementing the ISO13400-2 DoIP protocol. The implementation of the ISO13400-2 DoIP protocol and the development part of specific requirements of users are decoupled, so that the development of individual functions of the DoIP entity is facilitated. The user only needs to modify the Client program according to the actual demand of the user, but does not need to modify the Server program, so that repeated tests on the Server are not needed, the Server program can be well reused, the software test cost is reduced, and the software deployment is accelerated.
Based on the same inventive concept, the embodiment of the invention also provides a device for realizing the DoIP entity, which is applied to the vehicle-mounted Ethernet, wherein the DoIP entity refers to an electronic element for realizing the DoIP protocol in the vehicle-mounted Ethernet, and the DoIP protocol refers to an IP-based diagnostic protocol; the device comprises a client and a server which adopt a C/S model; the server is used for realizing the DoIP protocol; the client is used for interacting diagnostic data with the server and carrying out custom development.
The specific manner in which the server and the client perform the operations in the apparatus of the above embodiments has been described in detail in the embodiments related to the method, and will not be described in detail herein.
Fig. 6 is a block diagram of an electronic device 600, according to an example embodiment. As shown in fig. 6, the electronic device 600 may include: a processor 601, a memory 602. The electronic device 600 may also include one or more of a multimedia component 603, an input/output (I/O) interface 604, and a communication component 605.
Wherein the processor 601 is configured to control the overall operation of the electronic device 600 to perform all or part of the steps in the method for improving prize distribution described above. The memory 602 is used to store various types of data to support operations at the electronic device 600, which may include, for example, instructions for any application or method operating on the electronic device 600, as well as application-related data, such as contact data, transceived messages, pictures, audio, video, and the like. The Memory 602 may be implemented by any type or combination of volatile or nonvolatile Memory devices, such as static random access Memory (Static Random Access Memory, SRAM for short), electrically erasable programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory, EEPROM for short), erasable programmable Read-Only Memory (Erasable Programmable Read-Only Memory, EPROM for short), programmable Read-Only Memory (Programmable Read-Only Memory, PROM for short), read-Only Memory (ROM for short), magnetic Memory, flash Memory, magnetic disk, or optical disk. The multimedia component 603 may include a screen and an audio component. Wherein the screen may be, for example, a touch screen, the audio component being for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signals may be further stored in the memory 602 or transmitted through the communication component 605. The audio assembly further comprises at least one speaker for outputting audio signals. The I/O interface 604 provides an interface between the processor 601 and other interface modules, which may be a keyboard, mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 605 is used for wired or wireless communication between the electronic device 600 and other devices. Wireless communication, such as Wi-Fi, bluetooth, near field communication (Near Field Communication, NFC for short), 2G, 3G, 4G, NB-IOT, eMTC, or other 5G, etc., or one or a combination of more of them, is not limited herein. The corresponding communication component 605 may thus comprise: wi-Fi module, bluetooth module, NFC module, etc.
In an exemplary embodiment, the electronic device 600 may be implemented by one or more application specific integrated circuits (Application Specific Integrated Circuit, abbreviated as ASIC), digital signal processors (Digital Signal Processor, abbreviated as DSP), digital signal processing devices (Digital Signal Processing Device, abbreviated as DSPD), programmable logic devices (Programmable Logic Device, abbreviated as PLD), field programmable gate arrays (Field Programmable Gate Array, abbreviated as FPGA), controllers, microcontrollers, microprocessors, or other electronic components for performing the above-described methods of implementing a DoIP entity.
In another exemplary embodiment, a computer readable storage medium is also provided comprising program instructions which, when executed by a processor, implement the steps of the method of implementing a DoIP entity as described above. For example, the computer readable storage medium may be the memory 602 including program instructions described above, which are executable by the processor 601 of the electronic device 600 to perform the method of implementing the DoIP entity described above.
In another exemplary embodiment, a computer program product is also provided, comprising a computer program executable by a programmable apparatus, the computer program having code portions for performing the above-mentioned method of implementing a DoIP entity when executed by the programmable apparatus.
The preferred embodiments of the present invention have been described in detail above with reference to the accompanying drawings, but the present invention is not limited to the specific details of the above embodiments, and various simple modifications can be made to the technical solution of the present invention within the scope of the technical concept of the present invention, and all the simple modifications belong to the protection scope of the present invention.
In addition, the specific features described in the above embodiments may be combined in any suitable manner, and in order to avoid unnecessary repetition, various possible combinations are not described further.
Moreover, any combination of the various embodiments of the invention can be made without departing from the spirit of the invention, which should also be considered as disclosed herein.

Claims (7)

1. The method for realizing the DoIP entity is applied to the vehicle-mounted Ethernet, wherein the DoIP entity refers to an electronic element for realizing the DoIP protocol in the vehicle-mounted Ethernet, and the DoIP protocol refers to an IP-based diagnosis protocol; characterized in that the method comprises:
a C/S model is adopted to realize the server side and the client side of the DoIP entity; the server is used for realizing the DoIP protocol; the client is used for interacting diagnostic data with the server and carrying out custom development;
when the vehicle diagnosis is carried out, the server receives diagnosis information sent by external test equipment and forwards the diagnosis information to the client;
the client acquires a diagnosis result corresponding to the diagnosis information and returns the diagnosis result to the server;
the server receives the diagnosis result returned by the client and sends the diagnosis result to the external test equipment;
the client obtains a diagnosis result corresponding to the diagnosis information, including:
judging the entity type of the DoIP entity; the entity type is one of an edge gateway, a gateway or a node;
if the entity type is an edge gateway or gateway, the client forwards the diagnosis information to an associated Electronic Control Unit (ECU) in the vehicle-mounted Ethernet and receives the diagnosis result fed back by the ECU; or (b)
And if the entity type is a node, the client generates the diagnosis result based on the diagnosis information.
2. The method of claim 1, wherein if the entity type is an edge gateway, before the server receives the diagnostic information sent by the external test device and forwards the diagnostic information to the client, the method further comprises:
the server loads data information for realizing the DoIP function;
the server creates a timer thread, a TCP/UDP Socket read-write management thread and a local Socket read-write management thread;
the server creates TCP/UDP Socket monitoring and local Socket monitoring;
the server side sets vehicle information; the vehicle information comprises a vehicle identification number VIN, a unique identifier EID of the DoIP entity and a unique identifier GID of a group of DoIP entities in the same vehicle;
the server determines that the external test equipment and the vehicle are connected with a network activation line, and performs vehicle network activation;
after the vehicle network is successfully activated, the server allocates an IP address to the DoIP entity in the vehicle-mounted Ethernet;
the server side sets the ECU in the vehicle-mounted Ethernet to be in a starting state;
the client establishes Socket connection with the server;
the client registers monitoring with the server.
3. The method of claim 1, wherein if the entity type is the gateway/node, before the server receives the diagnostic information sent by the external test device and forwards the diagnostic information to the client, the method comprises:
the server loads data information for realizing the DoIP function;
the server creates a TCP/UDP Socket read-write management thread and a local Socket read-write management thread;
the server creates TCP/UDP Socket monitoring and local Socket monitoring;
the client establishes Socket connection with the server;
the client registers monitoring with the server.
4. The method of claim 1, wherein the method further comprises:
and establishing communication connection between the server and the client based on any one mode of Socket, pipeline, semaphore, signal, message queue or shared memory.
5. The device for realizing the DoIP entity is applied to the vehicle-mounted Ethernet, wherein the DoIP entity refers to an electronic element for realizing the DoIP protocol in the vehicle-mounted Ethernet, and the DoIP protocol refers to an IP-based diagnosis protocol; the device is characterized by comprising a client and a server which adopt a C/S model;
the server is used for realizing the DoIP protocol;
the client is used for interacting diagnostic data with the server and carrying out custom development;
when the vehicle diagnosis is carried out, the server receives diagnosis information sent by external test equipment and forwards the diagnosis information to the client;
the client acquires a diagnosis result corresponding to the diagnosis information and returns the diagnosis result to the server;
the server receives the diagnosis result returned by the client and sends the diagnosis result to the external test equipment;
the client obtains a diagnosis result corresponding to the diagnosis information, including:
judging the entity type of the DoIP entity; the entity type is one of an edge gateway, a gateway or a node;
if the entity type is an edge gateway or gateway, the client forwards the diagnosis information to an associated Electronic Control Unit (ECU) in the vehicle-mounted Ethernet and receives the diagnosis result fed back by the ECU; or (b)
And if the entity type is a node, the client generates the diagnosis result based on the diagnosis information.
6. A non-transitory computer readable storage medium having stored thereon a computer program, characterized in that the program when executed by a processor realizes the steps of the method according to any of claims 1-4.
7. An electronic device, comprising:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to implement the steps of the method of any one of claims 1-4.
CN202110742529.0A 2021-07-01 2021-07-01 Method and device for realizing DoIP entity, readable storage medium and electronic equipment Active CN113485920B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110742529.0A CN113485920B (en) 2021-07-01 2021-07-01 Method and device for realizing DoIP entity, readable storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110742529.0A CN113485920B (en) 2021-07-01 2021-07-01 Method and device for realizing DoIP entity, readable storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN113485920A CN113485920A (en) 2021-10-08
CN113485920B true CN113485920B (en) 2024-02-02

Family

ID=77936990

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110742529.0A Active CN113485920B (en) 2021-07-01 2021-07-01 Method and device for realizing DoIP entity, readable storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN113485920B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115174245A (en) * 2022-07-15 2022-10-11 湖北天融信网络安全技术有限公司 Test method and system based on DoIP protocol detection
CN115840435A (en) * 2022-09-16 2023-03-24 广州汽车集团股份有限公司 Data transmission method, device, vehicle and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110311992A (en) * 2019-05-31 2019-10-08 上海赫千电子科技有限公司 The functional addressing method of the unified diagnostic service of automobile Ethernet
CN110515366A (en) * 2019-07-29 2019-11-29 华为技术有限公司 A kind of method for diagnosing faults and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110311992A (en) * 2019-05-31 2019-10-08 上海赫千电子科技有限公司 The functional addressing method of the unified diagnostic service of automobile Ethernet
WO2020238291A1 (en) * 2019-05-31 2020-12-03 上海赫千电子科技有限公司 Automobile ethernet-based unified diagnostic service functional addressing method
CN110515366A (en) * 2019-07-29 2019-11-29 华为技术有限公司 A kind of method for diagnosing faults and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于DoIP的终检线模拟测试系统;周洋;姚西峰;王天军;李峰;;汽车实用技术(03);全文 *

Also Published As

Publication number Publication date
CN113485920A (en) 2021-10-08

Similar Documents

Publication Publication Date Title
KR101630729B1 (en) Method and System for Providing Optimized Ethernet Communication for vehicle
CN113485920B (en) Method and device for realizing DoIP entity, readable storage medium and electronic equipment
US11027676B2 (en) Vehicle data communications network
JP2017220220A (en) Electronic control units and service management system for vehicles
CN115437337A (en) Multi-ECU simulation test method and device, computer equipment and storage medium
US11273775B2 (en) Vehicle data communications network
CN115242689B (en) Vehicle-mounted gateway testing method, system and computer readable storage medium
WO2022061804A1 (en) Data transmission system, data transmission method, smart vehicle and device
CN111527389A (en) Vehicle diagnosis method, vehicle diagnosis device and storage medium
CN114326672A (en) ECU simulation detection method, electronic device and storage medium
CN113268050A (en) Vehicle diagnosis method and device
CN116456301A (en) Program refreshing method, device, equipment and storage medium
CN115118577B (en) Remote upgrade abnormality cause determination method, device, electronic equipment and storage medium
CN115951596A (en) Real vehicle signal simulation method and vehicle signal interaction system
CN115685971A (en) Vehicle diagnosis method and related device
JP7140011B2 (en) Gateway device
CN115174245A (en) Test method and system based on DoIP protocol detection
CN114328229A (en) Over-the-air technology test system
CN114442590A (en) Vehicle diagnosis method, apparatus, diagnosis communication device, server, and storage medium
CN111740972A (en) Method, device, equipment and storage medium for updating communication protocol stack information
JP2017114406A (en) Network system
CN116224976B (en) Test method and device
US20230198954A1 (en) Method for analyzing services of nodes of a network
CN111443683B (en) Electronic control unit testing method and device based on vehicle CAN bus structure
CN111624983B (en) Synchronous connection method and vehicle remote diagnosis system

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
GR01 Patent grant
GR01 Patent grant