Extensible SOMEIP service state diagnosis system and method
By deploying the SOMEIP service probe subsystem and diagnostic subsystem in the vehicle network, SOMEIP-SD protocol data is captured and parsed, solving the problem of low efficiency in traditional manual diagnosis. This enables fast and accurate SOMEIP service status diagnosis, reducing resource and time costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-08
- Publication Date
- 2026-03-31
AI Technical Summary
Traditional SOMEIP service status assessment relies on manual analysis, which is inefficient and prone to errors. It cannot quickly and intuitively diagnose the status of distributed service instances in the vehicle network, resulting in high resource and time costs.
Design an extensible SOMEIP service status diagnostic system, including a SOMEIP service probe subsystem and a diagnostic subsystem. By listening to the SOMEIP-SD protocol service port, it captures and forwards data, uses a parsing module to obtain diagnostic information, updates the service instance status, and supports diagnostic processes such as Find, Offer, StopOffer, and Subscribe.
It enables rapid and accurate diagnosis of the status of SOMEIP service instances in the vehicle network without affecting the original SOMEIP protocol stack system logic, reducing manual intervention, lowering costs, and providing real-time online and offline diagnostic capabilities.
Smart Images

Figure CN121486255B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of vehicle network technology, and particularly relates to a scalable SOMEIP service status diagnosis system and method. Background Technology
[0002] In traditional vehicular networks, SOMEIP serves as a communication middleware, enabling service publication and subscription through service discovery (SOMEIP-SD). Service discovery can also manage whether service instances are running or able to send business data packets. With the increasing complexity of vehicular networks, the number of service instances based on SOMEIP communication is growing exponentially. Often, SOMEIP protocol stack service instances are distributed across different devices, which brings many problems to the technical positioning of service status.
[0003] Traditional SOMEIP service status determination usually relies on developers to debug business code or analyze data such as packets and logs. However, this consumes a lot of system development resources, manpower costs, and project development cycle. The analysis results are not intuitive, human error is possible, and the technical skills required for system development and testing personnel are also high.
[0004] Therefore, a method is needed to quickly diagnose the real-time status of SOMEIP service instances in the entire vehicle network domain without affecting the original SOMEIP protocol stack system logic or disrupting the vehicle network environment. Summary of the Invention
[0005] To address the shortcomings of existing technologies, the present invention aims to provide a scalable SOMEIP service status diagnosis system and method.
[0006] To achieve the objectives of this invention, the technical solution adopted is as follows:
[0007] An extensible SOMEIP service status diagnostic system includes a SOMEIP service probe subsystem and a SOMEIP service status diagnostic subsystem. The SOMEIP service probe subsystem includes a SOMEIP service data capture module and a SOMEIP service data forwarding module. The SOMEIP service status diagnostic subsystem includes a SOMEIP service data receiving module, a SOMEIP service status parsing module, and a SOMEIP service status diagnostic module.
[0008] The SOMEIP service probe subsystem listens to the SOMEIP-SD protocol service port through the SOMEIP service data capture module. When SOMEIP service data is detected, the data is passed to the SOMEIP service data forwarding module via an intra-domain socket. After receiving the service data from the SOMEIP service data capture module, the SOMEIP service data forwarding module performs network serialization on the data and sends it to the SOMEIP service data receiving module of the SOMEIP service status diagnosis subsystem through the network forwarding interface.
[0009] After receiving service data, the SOMEIP service data receiving module of the SOMEIP service status diagnostic subsystem deserializes the network data and then passes the processed data to the SOMEIP service status parsing module. The SOMEIP service status parsing module then parses the SOMEIP service data to obtain diagnostic information. After parsing, it obtains the parsing result and passes it to the SOMEIP service status diagnostic module. Upon receiving the parsing result, the diagnostic module proceeds through different diagnostic processes based on different message types, and finally updates the current status of the SOMEIP service instance based on the final diagnostic result.
[0010] Furthermore, the diagnostic module is internally divided into the Find diagnostic process, Offer diagnostic process, StopOffer diagnostic process, Subscribe diagnostic process, SubscribeAck diagnostic process, and StopSubscribe diagnostic process.
[0011] Furthermore, the SOMEIP service data capture module uses the libpcap library to monitor network data of the SOMEIP protocol stack communication network card, and uses the filter function of the libpcap library to configure the feature filter content as "udp port30490", with the purpose of specifically filtering SOMEIP-SD protocol messages.
[0012] Furthermore, after receiving the service data from the SOMEIP service data capture module, the SOMEIP service data forwarding module starts a local UDP socket. The IP and port of the local UDP socket are bound to a custom IP and port. Then, the SOMEIP service data is serialized over the network via the local UDP socket. The IP and port of the target UDP socket are the IP and port of the UDP socket predefined and started by the SOMEIP service data receiving module of the SOMEIP service status diagnostic subsystem.
[0013] Furthermore, the SOMEIP service data receiving module deserializes the service data and then transmits the SOMEIP service data to the SOMEIP service status parsing module of the SOMEIP service status diagnostic subsystem via an intra-domain socket.
[0014] Furthermore, after obtaining the SOMEIP service data, the SOMEIP service status resolution module performs Ethernet network behavior and SOMEIP-SD protocol parsing to obtain network 5-tuple information, someipsd.entry.type, someipsd.entry.serviceid, someipsd.entry.instanceid, and if someipsd.entry.eventgroupid exists, it also obtains someipsd.entry.eventgroupid. Then, the resolution result is sent to the SOMEIP service status diagnosis module through an intra-domain socket.
[0015] Furthermore, after receiving the summarized information from the SOMEIP service status parsing module, the SOMEIP service status diagnosis module first obtains the SOMEIP service data message type from the information. Based on the message type, it follows different diagnostic processes. First, it uses someipsd.entry.serviceid + someipsd.entry.instanceid as the unique identifier of the service instance to query the current information of the corresponding service in the service status mapping table. Then, it obtains the diagnostic result according to the current diagnostic process, updates the corresponding service status information in the status mapping table, and then notifies the SOMEIP service status diagnosis subsystem to print the current status update result on the front end.
[0016] A scalable SOMEIP service status diagnostic method, comprising the following steps:
[0017] (1) Deploy the SOMEIP service probe subsystem on the server where the SOMEIP protocol stack is located. The SOMEIP service probe subsystem first starts the domain socket for data transmission within the subsystem, and then starts the Udp socket for network transmission after service data collection. According to the predefined filtering configuration, the probe subsystem captures SOMEIP service data through the SOMEIP service data capture module. After passing through the message within the subsystem, the SOMEIP service data forwarding module sends the data in real time.
[0018] (2) The SOMEIP service diagnostic subsystem first starts the domain socket for data transmission within the subsystem, and then starts the Udp socket to receive service data transmitted by the SOMEIP service probe subsystem. Data is received in real time through the system's predefined IP and port.
[0019] (3) When the SOMEIP service diagnostic subsystem receives the service data from the SOMEIP service probe subsystem, it first performs network data deserialization, and then transmits the data to the SOMEIP service status parsing module for parsing through the internal domain socket;
[0020] (4) The SOMEIP service status parsing module obtains the service diagnostic sensitive data information of the current service data according to the Ethernet data frame structure. According to the service data protocol type of SOMEIP-SD, it creates the corresponding data protocol type diagnostic sensitive data structure Struct SomeIpSdMsgInfo and network resource structure Struct NetRes, and initializes the structure data. Then, according to the service data network 5-tuple, it first fills the SrcIp, DstIp, Sport, Dport, and Protocol in the NetRes structure. Then, according to the service data SOMEIP-SD protocol data parsing content, it fills the SomeipSdtype, ServiceId, InstanceId, and EventGroupId in the SomeIpSdMsgInfo structure. Finally, it attaches the filled NetRes object to the SomeIpSdMsgInfo structure object. At this point, the parsing module completes the parsing task and passes the data to the SOMEIP service diagnostic subsystem diagnostic module through the Unix Domain Socket.
[0021] (5) The SOMEIP service diagnosis module first extracts SomeipSdtype based on the content of the received SomeIpSdMsgInfo structure, and then determines which service type diagnosis process to follow based on the SOMEIP service type. Then, it uses SomeIpSdMsgInfo->ServiceId and SomeIpSdMsgInfo->InstanceId as unique service status key values to query the current service status information in the status mapping table. Then, based on the result of the current diagnosis process, it updates the status of the service instance identified by the current ServiceId+InstanceId, and then updates the service status result to the front-end print of the SOMEIP service diagnosis subsystem in real time.
[0022] Furthermore, the structure Struct SomeIpSdMsgInfo contains structure members {char*:SomeipSdtype; uint64:SessonId; uint64:ServiceId; uint64:InstanceId; uint64:EventGroupId; Struct*:NetRes}, and the network resource structure Struct NetRes contains structure members {char*:SrcIp; char*:DstIp; int:Sport; int:Dport; int:Protocol}.
[0023] Furthermore, the status mapping table contains the following information: 1. ServiceId + InstanceId as a unique key-value pair; 2. Status1 indicates whether the current service is online; 3. Status2 indicates whether the current service is subscribed to; 4. SomeipNetRes indicates the network resource information of the client endpoints to which the current service is subscribed.
[0024] The beneficial effects of this invention are as follows: Compared with the prior art, this invention collects SOMEIP-SD service discovery data by deploying a SOMEIP service probe subsystem on the SOMEIP protocol stack target server. According to the service discovery port and the four-layer protocol carried by the discovery protocol as specified in the SOMEIP-SD service discovery protocol specification, the service probe subsystem can complete the service data collection without affecting the existing SOMEIP protocol stack system. The data is then sent to the diagnostic subsystem via the network, and the current service status is obtained in real time through the diagnostic calculation of the SOMEIP diagnostic subsystem. This invention is a pure software implementation, implemented according to the standard defined in the specification, with minimal subsequent logic modifications. It provides a good technical guarantee for the development of the SOMEIP whole vehicle domain system, minimizing system and small network impacts while maximizing the fulfillment of service status diagnostic requirements.
[0025] This invention deploys SOMEIP service probes on the server hosting the SOMEIP protocol stack without adding any hardware, without changing the current vehicle network topology, and without any awareness of the existing SOMEIP protocol stack system. The probe subsystem is responsible for collecting and forwarding SOMEIP-SD service data. The probe also has a filtering function that can be configured to capture data conditions as needed. Furthermore, the probe subsystem can be selectively deployed based on the server hosting the SOMEIP protocol stack, and the location and number of probe subsystems can be deployed according to diagnostic needs, demonstrating good scalability.
[0026] This invention is developed using the C language. After static compilation, it has no subsequent environmental dependencies. Compared to dynamic languages, it has better portability and higher performance. All service diagnostic calculation logic is performed on the SOMEIP diagnostic subsystem. The parsing and diagnostic logic is developed based on the SOMEIP-SD specification, with very few major logical changes to the protocol standard, reducing subsequent maintenance costs. Furthermore, the probe subsystem is mainly responsible for data collection and forwarding logic, which is highly targeted. Subsequent maintenance only requires the SOMEIP service diagnostic subsystem logic. The data structure definition in the form of a structure provides data structure expansion capabilities for subsequent new diagnostic requirements.
[0027] The system of this invention provides real-time online diagnostics, and can also save and replay the vehicle network data packets for import into the SOMEIP diagnostic subsystem to replay the SOMEIP service status of the vehicle network system for offline diagnostics. This helps development and testing to discover and locate SOMEIP service problems to the greatest extent, reduces the time cost of locating problems, and optimizes the methods of locating problems. Attached Figure Description
[0028] Figure 1 This is a block diagram of the SOMEIP service status diagnostic system;
[0029] Figure 2 This is a logical diagram of the SOMEIP service status diagnosis method. Detailed Implementation
[0030] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and should not be used to limit the scope of protection of this application.
[0031] like Figure 1 As shown, the scalable SOMEIP service status diagnostic system of the present invention includes a SOMEIP service probe subsystem and a SOMEIP service status diagnostic subsystem. The SOMEIP service probe subsystem includes a SOMEIP service data capture module and a SOMEIP service data forwarding module. The SOMEIP service status diagnostic subsystem includes a SOMEIP service data receiving module, a SOMEIP service status parsing module, and a SOMEIP service status diagnostic module.
[0032] The SOMEIP service probe subsystem listens to the SOMEIP-SD protocol service port through the SOMEIP service data capture module. When SOMEIP service data is detected, it is passed to the SOMEIP service data forwarding module via a Unix domain socket. After receiving the service data from the SOMEIP service data capture module, the SOMEIP service data forwarding module performs network serialization on the data and sends it to the SOMEIP service data receiving module of the SOMEIP service status diagnosis subsystem through the network forwarding interface.
[0033] The SOMEIP service status diagnosis subsystem consists of several modules. The SOMEIP service data receiving module receives service data, deserializes the network data, and then passes the processed data to the SOMEIP service status parsing module. The parsing module then parses the SOMEIP service data to extract necessary diagnostic information. After parsing, it obtains the parsing result and passes it to the SOMEIP service status diagnosis module. Upon receiving the parsing result, the diagnosis module proceeds through different diagnostic processes based on the message type. These processes are divided into Find, Offer, StopOffer, Subscribe, SubscribeAck, and StopSubscribe diagnostic processes. Finally, the current status of the SOMEIP service instance is updated based on the final diagnostic result.
[0034] The SOMEIP service data capture module of the SOMEIP service probe subsystem uses the libpcap library to monitor network data on the SOMEIP protocol stack communication network card of the vehicle domain controller. At the same time, it uses the filter function of the libpcap library to configure the feature filter content as "udp port 30490" to specifically filter SOMEIP-SD protocol messages. When service data is captured, the data is passed to the SOMEIP service data forwarding module via the Unix Domain Socket.
[0035] The SOMEIP service data forwarding module of the SOMEIP service probe subsystem, after receiving service data from the SOMEIP service data capture module, starts a local UDP socket. The IP and port of the local UDP socket are bound to a custom IP and port. Then, the SOMEIP service data is serialized over the network and passed through the local UDP socket. The IP and port of the target UDP socket are the IP and port of the UDP socket predefined and started by the SOMEIP service data receiving module of the SOMEIP service status diagnosis subsystem.
[0036] The SOMEIP service data receiving module of the SOMEIP service status diagnostic subsystem deserializes the service data and then passes the SOMEIP service data to the SOMEIP service status parsing module of the SOMEIP service status diagnostic subsystem via the Unix Domain Socket.
[0037] After obtaining the SOMEIP service data, the SOMEIP service status resolution module performs Ethernet network behavior and SOMEIP-SD protocol parsing to obtain network 5-tuple information, someipsd.entry.type, someipsd.entry.serviceid, someipsd.entry.instanceid, and if someipsd.entry.eventgroupid exists, it also obtains someipsd.entry.eventgroupid. Then, the resolution result is sent to the SOMEIP service status diagnostic module through an intra-domain socket.
[0038] After receiving the aggregated information from the SOMEIP service status parsing module, the SOMEIP service status diagnosis module first obtains the SOMEIP service data message type from the information. Based on the message type, it follows different diagnostic processes. First, it uses someipsd.entry.serviceid + someipsd.entry.instanceid as the unique identifier of the service instance to query the current information of the corresponding service in the service status mapping table. Then, it obtains the diagnostic result according to the current diagnostic process, updates the corresponding service status information in the status mapping table, and then notifies the SOMEIP service status diagnosis subsystem to print the current status update result on the front end.
[0039] like Figure 1As shown in one embodiment of the present invention, a SOMEIP service probe subsystem is deployed on the server of the vehicle domain controller 1 where the SOMEIP protocol stack is located, and it listens on the network card 1 used by the SOMEIP protocol stack. The corresponding filtering conditions are configured to capture SOMEIP-SD service packets passing through the network card 1 in real time. When a SOMEIP service packet that meets the conditions is captured, the SOMEIP service data capture module sends it to the SOMEIP service data forwarding module through the intra-process domain socket. After the service data is serialized by the network, the entire service packet frame is stored in the UDP payload through the local UDP socket. According to the IP and port of the actual deployment plan, it is sent to the SOMEIP service status diagnosis subsystem. The data type of SOMEIP-SD may be: Offer, Subscriber, SubscriberAck, StopOffer, StopSubscribe, etc.
[0040] Deploy SOMEIP service probe subsystem 2 on vehicle domain controller 2. The deployment and packet capture and forwarding processing logic are the same as those of SOMEIP service probe subsystem 1 on vehicle domain controller 1.
[0041] After receiving service data forwarded by the SOMEIP service probe subsystem from the SOMEIP service status diagnostic subsystem via its UDP socket, the SOMEIP service data receiving module deserializes the service data and then sends it to the SOMEIP service status parsing module via an intra-domain socket. The parsing module initializes the `StructNetRes` and `StructSomeIpSdMsgInfo` data structures. Then, it assigns the source IP, destination IP, source port, destination port, and transport layer protocol information parsed from the received SOMEIP service data frame to `NetRes.SrcIp`, `NetRes.DstIp`, `NetRes.Sport`, `NetRes.Dport`, and `NetRes.Protocol`, respectively. Finally, it assigns the SOMEIP-SD message type, session ID, service ID, entity ID, and event group ID parsed from the SOMEIP service data frame to `SomeIpSdMsgInfo.SomeipSdtype`. The parsing module processes the `SomeIpSdMsgInfo.SessonId`, `SomeIpSdMsgInfo.ServiceId`, `SomeIpSdMsgInfo.InstanceId`, and `SomeIpSdMsgInfo.EventGroupId`. Then, it assigns the already assigned `NetRes` value to `SomeIpSdMsgInfo.NetRes`. The parsing module then sends the processed `SomeIpSdMsgInfo` structure data to the SOMEIP service status diagnosis module via an intra-domain socket. The diagnosis module determines the specific message type based on `SomeIpSdMsgInfo.SomeipSdtype` and proceeds through the diagnosis process. It then queries the status mapping table using `SomeIpSdMsgInfo.ServiceId + SomeIpSdMsgInfo.InstanceId` and updates the status mapping table based on the diagnosis process results. Finally, the front-end prints the current service status update in real time.
[0042] like Figure 2 As shown, a scalable SOMEIP service status diagnostic method includes the following steps:
[0043] (1) Deploy the SOMEIP service probe subsystem on the server where the SOMEIP protocol stack is located. The SOMEIP service probe subsystem first starts the domain socket for data transmission within the subsystem, and then starts the Udp socket for network transmission after service data collection. According to the predefined filtering configuration, the probe subsystem captures SOMEIP service data through the SOMEIP service data capture module. After passing through the message within the subsystem, the SOMEIP service data forwarding module sends the data in real time.
[0044] (2) The SOMEIP service diagnostic subsystem first starts the domain socket for data transmission within the subsystem, and then starts the Udp socket to receive service data transmitted by the SOMEIP service probe subsystem. Data is received in real time through the system's predefined IP and port.
[0045] (3) When the SOMEIP service diagnostic subsystem receives the service data from the SOMEIP service probe subsystem, it first performs network data deserialization, and then transmits the data to the SOMEIP service status parsing module for parsing through the internal domain socket;
[0046] (4) The SOMEIP service status parsing module obtains the service diagnostic sensitive data information of the current service data according to the Ethernet data frame structure. According to the service data protocol types of SOMEIP-SD, namely Find, Offer, Subscribe, SubscribeAck, StopOffer, and StopSubscribe, it creates the corresponding data protocol type diagnostic sensitive data structure Struct SomeIpSdMsgInfo and network resource structure Struct NetRes, and initializes the structure data. Then, according to the service data network 5-tuple, it first fills the SrcIp, DstIp, Sport, Dport, and Protocol in the NetRes structure. Then, according to the service data SOMEIP-SD protocol data parsing content, it fills the SomeIpSdMsgInfo structure SomeipSdtype, ServiceId, InstanceId, and EventGroupId. Finally, it attaches the filled NetRes object to the SomeIpSdMsgInfo structure object. At this point, the parsing module completes the parsing task and passes the data to the SOMEIP service diagnostic subsystem diagnostic module through the Unix Domain Socket.
[0047] The structure `Struct SomeIpSdMsgInfo` contains structure members `{char*:SomeipSdtype; uint64:SessonId; uint64:ServiceId; uint64:InstanceId; uint64:EventGroupId;Struct*:NetRes}`, and the network resource structure `Struct NetRes` contains structure members `{char*:SrcIp; char*:DstIp; int:Sport; int:Dport; int:Protocol}`.
[0048] (5) The SOMEIP service diagnosis module first extracts SomeipSdtype based on the content of the received SomeIpSdMsgInfo structure, and then determines which service type diagnosis process to follow based on the SOMEIP service type. Then, it uses SomeIpSdMsgInfo->ServiceId and SomeIpSdMsgInfo->InstanceId as unique service status key values to query the current service status information in the status mapping table. Then, based on the result of the current diagnosis process, it updates the status of the service instance identified by the current ServiceId+InstanceId, and then updates the service status result to the front-end print of the SOMEIP service diagnosis subsystem in real time.
[0049] The status mapping table contains the following information: 1. ServiceId + InstanceId as unique key-value pairs; 2. Status1 indicates whether the current service is online; 3. Status2 indicates whether the current service is subscribed to; 4. SomeipNetRes indicates the network resource information of the client endpoints to which the current service is subscribed.
[0050] like Figure 2 As shown, the processing logic of SOMEIP-SD service messages in the SOMEIP service status diagnostic subsystem includes the data capture and forwarding logic of the probe subsystem, the receiving and parsing logic of the diagnostic subsystem, and the diagnostic logic.
[0051] In one embodiment of the present invention, when the service instance ServiceId: 0x1234 InstanceId: 0x5678 is in the "service offline" state, the service diagnostic system refreshes the service status to "service online" after receiving the Offer message.
[0052] The present invention provides a scalable SOMEIP service status diagnosis method, comprising the following steps:
[0053] (1) The SOMEIP service data capture module of the SOMEIP service probe subsystem captures a packet of SOMEIP-SD data pkt on network card 1, and transmits the pkt data in the process through the Unix Domain Socket, and then passes the data to the SOMEIP service data forwarding module;
[0054] (2) The SOMEIP service data forwarding module first serializes the service data pkt for network transmission, and then sends it to the SOMEIP service data receiving module of the SOMEIP service status diagnosis subsystem through the network UDP socket;
[0055] (3) The network UDP socket of the SOMEIP service data receiving module of the SOMEIP service status diagnosis subsystem receives the service data pkt and performs network data deserialization. Then, it transmits the pkt data to the SOMEIP service data parsing module through the intra-domain socket process.
[0056] (4) After the SOMEIP service data parsing module obtains the service data pkt, it first initializes SomeIpSdMsgInfo and NetRes structure information. Then the parsing module parses and fills SomeIpSdMsgInfo data content. Then the parsed and filled SomeIpSdMsgInfo is passed to the SOMEIP service status diagnosis module through the domain socket process.
[0057] Fill in the data content of SomeIpSdMsgInfo as follows: SomeIpSdMsgInfo.SomeipSdtype="Offer", SomeIpSdMsgInfo.SessonId=0x0001;SomeIpSdMsgI nfo.ServiceId=0x1234、SomeIpSdMsgInfo.InstanceId=0x5678、SomeIpSdMsgInfo.EventGroupId=Null、SomeIpSdMsgInfo. NetRes {NetRes.SrcIp="192.168.2.135", NetRes.DstIp="234.56.78.90", NetRes.Sport=30490, NetRes.Dport=30490, NetRes.Protocol=17}.
[0058] (5) The SOMEIP service status diagnosis module obtains the value of the SomeIpSdMsgInfo.SomeipSdtype attribute in the SomeIpSdMsgInfo structure as “Offer”, and then determines whether to enter the Offer diagnosis process.
[0059] (6) The Offer diagnosis process first queries the current service status data in the service status mapping table based on SomeIpSdMsgInfo.ServiceId+SomeIpSdMsgInfo.InstanceId as the unique index value;
[0060] (7) The service instance with the unique index SomeIpSdMsgInfo.ServiceId + SomeIpSdMsgInfo.InstanceId was found in the service status mapping table. The current Status1 is "Service offline". The diagnostic process updates the current service instance status Status1 to "Service online" and refreshes the network resource SomeipNetRes content of the current instance in the service status mapping table to SomeIpSdMsgInfo.NetRes{NetRes.SrcIp="192.168.2.135", NetRes.DstIp="234.56.78.90", NetRes.Sport=30490, NetRes.Dport=30490};
[0061] (8) Update the current service instance status information in the front end and print it to the diagnostic subsystem client. This completes the implementation of this embodiment.
[0062] The beneficial effect of this invention is that, compared with the prior art, this invention, by deploying a probe subsystem, monitors the SOMEIP protocol stack service discovery data in the entire vehicle domain network, and intervenes without awareness of the existing system architecture and networking, thus ensuring the structural integrity of the entire vehicle network.
[0063] This invention can dynamically control the number and location of deployed probe subsystems according to diagnostic needs and network topology, greatly increasing the scalability of this SOMEIP service status diagnostic system.
[0064] This invention is developed based on the C language. It uses intra-domain sockets within subsystems and network transmission between subsystems, which ensures both performance and real-time online diagnosis. Furthermore, the logic between subsystems is decoupled, and the diagnostic subsystem can also be deployed independently as an offline diagnostic system with both online and offline diagnostic capabilities.
[0065] The applicant of this invention has provided a detailed description of the embodiments of the invention in conjunction with the accompanying drawings. However, those skilled in the art should understand that the above embodiments are merely preferred embodiments of the invention. The detailed description is only intended to help readers better understand the spirit of the invention and is not intended to limit the scope of protection of the invention. On the contrary, any improvements or modifications made based on the inventive spirit of the invention should fall within the scope of protection of the invention.
Claims
1. An extensible SOMEIP service state diagnostic system, characterized in that, The SOMEIP service probe subsystem comprises a SOMEIP service data capture module and a SOMEIP service data forwarding module, and the SOMEIP service state diagnosis subsystem comprises a SOMEIP service data receiving module, a SOMEIP service state analysis module and a SOMEIP service state diagnosis module; The SOMEIP service probe subsystem listens to the SOMEIP-SD protocol service port through the SOMEIP service data capture module, and when SOMEIP service data is listened to, the data is transmitted to the SOMEIP service data forwarding module through the domain socket; the SOMEIP service data forwarding module receives the service data of the SOMEIP service data capture module, serializes the data in network, and sends the data to the SOMEIP service data receiving module of the SOMEIP service state diagnosis subsystem through the network forwarding interface; The SOMEIP service data receiving module of the SOMEIP service state diagnosis subsystem receives the network data after the service data, deserializes the network data, and then transmits the arranged data to the SOMEIP service state analysis module; the SOMEIP service state analysis module obtains the diagnosis information in the SOMEIP service data after receiving the SOMEIP service data, obtains the analysis result after the analysis is completed, and transmits the analysis result to the SOMEIP service state diagnosis module; the SOMEIP service state diagnosis module obtains the analysis result of the analysis module, and the diagnosis module enters different diagnosis processes according to different message types, and finally updates the current state of the SOMEIP service instance according to the final diagnosis result.
2. The scalable SOMEIP service state diagnostic system of claim 1, wherein, The diagnosis module is internally divided into a Find diagnosis process, an Offer diagnosis process, a StopOffer diagnosis process, a Subscribe diagnosis process, a SubscribeAck diagnosis process and a StopSubscribe diagnosis process.
3. The extensible SOMEIP service state diagnostic system of claim 1, wherein, The SOMEIP service data capture module uses the libpcap library to listen to the network data of the SOMEIP protocol stack communication card, and uses the filter function of the libpcap library to configure the feature filter content as "udp port 30490", for the purpose of filtering SOMEIP-SD protocol messages.
4. The extensible SOMEIP service state diagnostic system of claim 1, wherein, After the SOMEIP service data forwarding module receives the service data of the SOMEIP service data capture module, a local Udp socket is started, the IP and Port of the local Udp socket are bound to the custom IP and Port, and then the SOMEIP service data is serialized in network and transmitted through the local Udp socket, and the IP and Port of the target Udp socket are the IP and Port of the Udp socket pre-defined and started by the SOMEIP service data receiving module of the SOMEIP service state diagnosis subsystem.
5. The extensible SOMEIP service state diagnostic system of claim 1, wherein, The SOMEIP service data receiving module carries out service data deserialization, and then delivers the SOMEIP service data to the SOMEIP service state analysis module of the SOMEIP service state diagnosis subsystem through an inter-domain socket.
6. The extensible SOMEIP service state diagnostic system of claim 1, wherein, The SOMEIP service state analysis module carries out Ethernet network behavior and SOMEIP-SD protocol analysis after obtaining the SOMEIP service data, obtains network five-tuple information, someipsd.entry.type, someipsd.entry.serviceid, someipsd.entry.instanceid, and someipsd.entry.eventgroupid if it exists, and then sends the analysis result to the SOMEIP service state diagnosis module through an inter-domain socket.
7. The extensible SOMEIP service state diagnostic system of claim 1, wherein, After the SOMEIP service state diagnosis module receives the information aggregated by the SOMEIP service state analysis module, the SOMEIP service data message type in the information is first obtained, different diagnosis processes are taken according to the message type, the corresponding service current information is first queried in the service state mapping table by taking someipsd.entry.serviceid+someipsd.entry.instanceid as the unique identifier of the service instance, the diagnosis result is obtained according to the current diagnosis process, the corresponding service state information in the state mapping table is then updated, and the SOMEIP service state diagnosis subsystem front desk is then notified to print the current state update result.
8. An extensible SOMEIP service state diagnosis method, characterized in that, The steps include: (1) deploying a SOMEIP service probe subsystem on a server where a SOMEIP protocol stack is located, starting an inter-domain socket for internal data transmission of the subsystem, starting a Udp socket for network transmission after service data collection, capturing SOMEIP service data by the probe subsystem according to a predefined filtering configuration, transmitting the data in real time by the SOMEIP service data forwarding module after internal message transmission, and receiving the data in real time by the SOMEIP service diagnosis subsystem through a predefined IP and port; (2) starting an inter-domain socket for internal data transmission of the subsystem, and starting a Udp socket for receiving service data transmitted by the SOMEIP service probe subsystem, and receiving the data in real time by the system through a predefined IP and port; (3) after the SOMEIP service diagnosis subsystem receives the service data from the SOMEIP service probe subsystem, carrying out network data deserialization, and then transmitting the data to the SOMEIP service state analysis module for analysis through an internal domain socket; (4) SOMEIP service state analysis module acquires service diagnosis sensitive data information of current service data according to Ethernet data frame structure, creates diagnosis sensitive data structure body Struct SomeIpSdMsgInfo and network resource structure body Struct NetRes of corresponding data protocol type according to service data protocol type of SOMEIP-SD respectively, and performs structure data initialization, then fills in SrcIp, DstIp, Sport, Dport and Protocol in NetRes structure body according to service data network five-tuple first, then fills in SomeipSdtype, ServiceId, InstanceId and EventGroupId in SomeIpSdMsgInfo structure body according to service data SOMEIP-SD protocol data analysis content, finally hangs the filled NetRes object to the SomeIpSdMsgInfo structure object, thus the analysis module completes the analysis task, and transmits the data to the SOMEIP service diagnosis subsystem diagnosis module through Unix Domain Socket; (5) SOMEIP service diagnosis module takes out SomeipSdtype first according to the received SomeIpSdMsgInfo structure body content, judges according to SOMEIP service type to determine which service type diagnosis process to take, then queries the current service state information according to SomeIpSdMsgInfo->ServiceId and SomeIpSdMsgInfo->InstanceId as the unique service state key value to the state mapping table, then updates the state of the service instance identified by ServiceId+ InstanceId according to the result of the current diagnosis process, and then updates the service state result to the front-end printing of the SOMEIP service diagnosis subsystem in real time.
9. The scalable SOMEIP service state diagnostic method of claim 8, wherein, Struct SomeIpSdMsgInfo contains structure members {char*:SomeipSdtype; uint64:SessonId; uint64:ServiceId; uint64:InstanceId; uint64:EventGroupId; Struct*:NetRes}, and network resource structure body Struct NetRes contains structure body members {char*:SrcIp; char*:DstIp; int:Sport; int:Dport; int:Protocol}.
10. The scalable SOMEIP service state diagnostic method of claim 8, wherein, The state mapping table contains the following information: 1, ServiceId+ InstanceId as the unique key value; 2, Status1 marks whether the current service is online; 3, Status2 marks whether the current service is subscribed; 4. SomeipNetRes marks the client endpoint network resource information of the current service being subscribed.
Citation Information
Patent Citations
Vehicle-mounted time-sensitive network communication method based on SOME / IP protocol
CN115996196A
Method and device for testing vehicle-mounted SOMEIP protocol
CN116614420A