Communication data analysis method and device, vehicle and storage medium
By using preset message grabbing conditions and message parser in the vehicle system, the problem of insufficient information and time-consuming in the existing technology is solved, and the communication data analysis is improved Efficiency and accuracy.
Patent Information
- Application Number
- CN202411302826.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-18
- Publication Date
- 2025-01-03
AI Technical Summary
Existing on-board SOMEIP communication data analysis methods such as log analysis and network card packet capture analysis have problems such as insufficient information or large data volume and long analysis, making it difficult to effectively analyze faults and improve system performance.
SOMEIP packets are obtained by preset message grabbing conditions, and automatic analysis is used by the message parser to realize communication data analysis, reducing resource consumption and manual resolution errors.
It realizes accurate capture and automatic analysis of SOMEIP packets, improves data analysis efficiency, reduces manual analysis errors, and improves analysis efficiency and accuracy.
Smart Images

Figure CN119254856A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of vehicle technology, and specifically relates to a communication data analysis method, device, vehicle and storage medium. Background Art
[0002] The conventional analysis methods for vehicle-mounted SOMEIP (Scalable service-Oriented MiddlewarE over IP) communication problems include log analysis and network card packet capture analysis.
[0003] The log analysis method is based on the output log information and combines it with the software business logic for static analysis. However, when the log level is set to Error (the default configuration in the real vehicle environment), very little information is provided, and it is impossible to effectively analyze the fault. If the log level is lowered, too many useless logs may be generated, which will also affect system performance.
[0004] The network card packet capture method uses tools such as tcpdump to capture relevant network messages, and then performs manual analysis on the host computer. On the one hand, this method is post-sampling and cannot collect the communication process when the fault occurs; on the other hand, the amount of data collected is large, and data analysis must be done manually, which takes a lot of time and effort, and is even more difficult when the communication chain is long. Summary of the invention
[0005] In view of the above problems, the present application proposes a communication data analysis method, device, vehicle and storage medium to improve the above problems.
[0006] In a first aspect, an embodiment of the present application provides a communication data analysis method, the method comprising: based on preset message capture conditions, obtaining multiple SOMEIP messages of a target domain within a preset time period; parsing the multiple SOMEIP messages through a message parser to obtain detailed information corresponding to each of the multiple SOMEIP messages; and performing communication data analysis on the target domain based on the detailed information corresponding to each of the multiple SOMEIP messages.
[0007] In a second aspect, an embodiment of the present application provides a communication data analysis device, which includes: a message acquisition unit, used to acquire multiple SOMEIP messages of a target domain within a preset time period based on preset message capture conditions; a parsing unit, used to parse the multiple SOMEIP messages through a message parser to obtain detailed information corresponding to each of the multiple SOMEIP messages; a data analysis unit, used to perform communication data analysis on the target domain based on the detailed information corresponding to each of the multiple SOMEIP messages.
[0008] In a third aspect, an embodiment of the present application provides a vehicle, comprising one or more processors and a memory; one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the above-mentioned method.
[0009] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a program code is stored, wherein the above method is executed when the program code is run.
[0010] The embodiments of the present application provide a communication data analysis method, device, vehicle and storage medium. First, based on the preset message capture conditions, multiple SOMEIP messages of the target domain within the preset time period are obtained, and then the multiple SOMEIP messages are parsed by the message parser to obtain detailed information corresponding to each of the multiple SOMEIP messages, and finally, based on the detailed information corresponding to each of the multiple SOMEIP messages, communication data analysis is performed on the target domain. Through the above method, accurate capture of SOMEIP messages can be achieved through preset message capture conditions, reducing the resource consumption required for packet capture, and the captured SOMEIP messages can be automatically parsed by the message parser, which not only greatly improves the data analysis efficiency, but also reduces the errors caused by manual analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0012] Figure 1 A schematic diagram of an application scenario of a communication data analysis method provided by an embodiment of the present application is shown;
[0013] Figure 2 A flow chart of a communication data analysis method proposed in one embodiment of the present application is shown;
[0014] Figure 3 A flow chart of a communication data analysis method proposed in another embodiment of the present application is shown;
[0015] Figure 4 A structural block diagram of a communication data analysis device proposed in an embodiment of the present application is shown;
[0016] Figure 5 A structural block diagram of a communication data analysis device proposed in an embodiment of the present application is shown;
[0017] Figure 6 A structural block diagram of a vehicle for executing a communication data analysis method according to an embodiment of the present application is shown;
[0018] Figure 7 A storage unit in an embodiment of the present application is shown for storing or carrying program codes for implementing the communication data analysis method according to an embodiment of the present application. DETAILED DESCRIPTION
[0019] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0020] The embodiment of the present application proposes a communication data analysis method, device, vehicle and storage medium. First, based on the preset message capture conditions, multiple SOMEIP messages of the target domain within the preset time period are obtained, and then the multiple SOMEIP messages are parsed by the message parser to obtain detailed information corresponding to each of the multiple SOMEIP messages, and finally, based on the detailed information corresponding to each of the multiple SOMEIP messages, communication data analysis is performed on the target domain. Through the above method, accurate capture of SOMEIP messages can be achieved through preset message capture conditions, reducing the resource consumption required for packet capture, and the captured SOMEIP messages can be automatically parsed by the message parser, which not only greatly improves the data analysis efficiency, but also reduces the errors caused by manual analysis.
[0021] The following is an introduction to the application environment of the communication data analysis method provided by the present invention:
[0022] See also Figure 1 The communication data analysis method provided by the embodiment of the present invention can be applied to a communication data analysis system 100, which may include a message collection module 110, a message parser automatic generator 120, and a message intelligent analysis and warning module 130.
[0023] Among them, the message collection module 110 is used to accurately capture SOMEIP (Scalable service-oriented Middleware over IP, service-oriented scalable communication middleware protocol based on IP protocol) messages; the message parser automatic generator 120 is used to automatically generate a message parser according to the input ARXML (Automotive Open System Architecture Extensible Markup Language) file, and the message parser can be used to parse the SOMEIP message captured by the message collection module 110 to obtain detailed information of the SOMEIP message; the message intelligent analysis and warning module 130 can be used to perform data analysis based on the detailed information of the SOMEIP message. The message intelligent analysis and warning module 130 can run regularly to analyze whether there are abnormal situations such as message loss, timeout response, business logic error in the service in the past period of time, and summarize and count the service quality, service status, etc., and output a visual analysis report.
[0024] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0025] See also Figure 2 , an embodiment of the present application provides a communication data analysis method, the method comprising:
[0026] Step S110: Based on a preset message capture condition, a plurality of SOMEIP messages of the target domain within a preset time period are acquired.
[0027] In an embodiment of the present application, the preset message capture condition may be a pre-set condition for accurately capturing the captured SOMEIP message, and the preset message capture condition may be set according to the data that needs to be paid attention to, for example, the preset message capture condition may be set to, but not limited to, "network card name + source IP address + destination IP address + protocol transmission type (TCP / UDP) + port number + SOA-ServiceID + SOA-MethodID + ClientID". Among them, SOA-ServiceID refers to Service-Oriented Architecture ServiceID, i.e., a service provider identifier based on a service-oriented architecture; SOA-MethodID refers to Service-Oriented Architecture MethodID, i.e., a service-oriented architecture method identifier, which can be understood as a method identifier of a certain method; the network card name may be understood as the name of the network card that sends / receives SOMEIP messages; the source IP address may be understood as the host address that sends the SOMEIP message; the destination IP address may be understood as the host address that receives the SOMEIP message; the port number may be understood as the port that sends / receives the SOMEIP message; and the ClientID may be understood as the service consumer identifier.
[0028] The more detailed the preset message capture conditions are, the more accurate the captured SOMEIP messages are, the less system resources are occupied, but the less information is included; conversely, the broader the preset message capture conditions are, the more SOMEIP messages are captured, the more complete the information is, but the more system resources are consumed. System resources can be understood as CPU resources and memory resources.
[0029] As a method, different message capture conditions can be set as different filter condition monitoring network cards, and then when different SOMEIP messages need to be obtained, different filter condition monitoring network cards can be called to continuously and accurately capture SOMEIP messages.
[0030] Optionally, in the embodiment of the present application, the preset time period may be a pre-set cycle for data analysis, wherein the preset time period may be set to any time length according to actual needs, and is not specifically limited here; the target domain may be understood as a functional domain in the vehicle, such as the target domain may be at least one of the CCU (Central Control Unit) domain, IDC (Infortainment Domain Controller) domain, ADC (ADASDomain Control) domain, or T-Box (Telematics Box) domain, and is not specifically limited here. When there are multiple target domains, step S110 may be: based on the preset message capture conditions, obtain multiple SOMEIP messages corresponding to each of the multiple target domains within the preset time period.
[0031] Optionally, in response to the message acquisition instruction, based on the preset message capture condition, multiple SOMEIP messages of the target domain within a preset time period are acquired. The message acquisition instruction may be an instruction sent by an electronic device that is connected to the vehicle for communication; or, an instruction triggered when a designated application in the vehicle is detected to be started, which is not specifically limited here. Optionally, the electronic device may be a mobile phone, tablet computer, computer, smart wearable device or smart home device, etc., which is not specifically limited here; the designated application may be an application set in the vehicle that can perform message data analysis.
[0032] Step S120: parsing the plurality of SOMEIP messages through a message parser to obtain detailed information corresponding to each of the plurality of SOMEIP messages.
[0033] Wherein, the message parser includes a parsing method for parsing all SOMEIP messages of the entire vehicle.
[0034] In an embodiment of the present application, the parsing method for parsing all SOMEIP messages of the whole vehicle may include the serialization / deserialization method of all SOMEIP messages of the whole vehicle. It can be known that serialization / deserialization in AUTOSAR (Automotive Open System Architecture) refers to the expression of data in PDU (Protocol Data Unit), which can be understood as the conversion of real data from the application layer into a fixed format byte sequence to realize the transmission of data on the network. The software component transfers data from the application layer to the RTE (Run-time environment) layer, calls SOME / IP Transformer at the RTE layer, and performs configurable data serialization (Serialize) or deserialization (Deserialize). Among them, SOME / IP Serializer serializes data in the form of structure into data in linear structure; SOME / IP Deserializer deserializes linear structure data into data in the form of structure.
[0035] The detailed information corresponding to each of the multiple SOMEIP messages may include the sending and receiving time, the sending and receiving network card, the IP address, the transmission type (TCP / UDP), the port number, the service ID, the Method-ID, the Client-ID, the Session-ID, the message type (Request, Response, Notify, Event), the data load, etc., and may also include more information, which is not specifically limited here. Among them, the sending and receiving time refers to the sending time and receiving time of the message; the sending and receiving network card refers to the network card that sends the message and the network card that receives the message; the IP address refers to the IP address that sends the message and the IP address that receives the message; the transmission type refers to the data transmission type between the message sending end and the message receiving end; the port number refers to the port number that sends the message and the port number that receives the message; the service ID refers to the service identifier of the sending message and the service identifier of the receiving message; the Method-ID refers to the message identifier; the Client-ID refers to the service consumer identifier; the Session-ID refers to the session identifier; and the data load refers to the load of the message sending end or the message receiving end.
[0036] In the embodiment of the present application, after the SOMEIP message of the target domain is obtained, the SOMEIP message can be automatically parsed by the message parser to obtain detailed information of each SOMEIP message. That is, the SOMEIP message is serialized / deserialized by the message parser.
[0037] Step S130: Based on the detailed information corresponding to each of the plurality of SOMEIP messages, communication data analysis is performed on the target domain.
[0038] In the embodiment of the present application, communication data analysis of the target domain can be understood as determining whether message loss, timeout response or business logic error within the service occurs, so as to determine whether the target domain is in a normal communication state.
[0039] After obtaining the detailed information corresponding to each of the multiple SOMEIP messages, it is possible to determine whether each SOMEIP message has experienced message loss, timeout response, or service logic error based on the detailed information corresponding to each of the multiple SOMEIP messages, thereby determining whether the target domain is in a normal communication state. Specifically, if it is determined based on the detailed information corresponding to each of the multiple SOMEIP messages that message loss, timeout response, or service logic error has not occurred, it can be determined that the target domain is in a normal communication state; otherwise, it can be determined that the target domain is not in a normal communication state.
[0040] A communication data analysis method provided by the present application can realize accurate capture of SOMEIP messages by presetting message capture conditions, reduce the resource consumption required for packet capture, and can automatically parse the captured SOMEIP messages through a message parser, which not only greatly improves the data analysis efficiency, but also reduces the errors caused by manual analysis.
[0041] See also Figure 3 , an embodiment of the present application provides a communication data analysis method, the method comprising:
[0042] Step S210: Based on a preset message capture condition, a plurality of SOMEIP messages of a target domain within a preset time period are acquired.
[0043] Step S220: parsing the plurality of SOMEIP messages through a message parser to obtain detailed information corresponding to each of the plurality of SOMEIP messages.
[0044] In an embodiment of the present application, after obtaining detailed information corresponding to each of the multiple SOMEIP messages, the detailed information corresponding to each of the multiple SOMEIP messages can be saved in a unified format and compressed and archived.
[0045] When it is detected that the network is available, the compressed data can also be uploaded to the cloud or host computer.
[0046] Before step S220, the method also includes: obtaining an ARXML file; and generating the message parser based on the ARXML file.
[0047] Among them, the ARXML file may refer to an ARXML file containing the entire vehicle SOA service matrix information.
[0048] In the embodiment of the present application, the vehicle SOA service matrix refers to the service matrix composed of all SOA services of the vehicle. The service matrix information may include definition documents, development documents, functional descriptions, etc. of each service, which are not specifically limited here.
[0049] As a method, the ARXML file containing the vehicle SOA service matrix information can be input into the message parser automatic generator to obtain the message parser, ensuring that the message parser can obtain the serialization / deserialization method of all SOMEIP messages of the vehicle, and then automatically parse the obtained SOMEIP messages and identify the detailed information in the messages.
[0050] Step S230: If based on the first information in the detailed information corresponding to each of the multiple SOMEIP messages, it is determined that the multiple SOMEIP messages all meet the first preset condition, based on the second information in the detailed information corresponding to each of the multiple SOMEIP messages, detect whether there is message loss in the multiple SOMEIP messages.
[0051] In an embodiment of the present application, the first information is information in the detailed information of the message used to verify whether the SOMEIP message satisfies the first preset condition; the first preset condition is a condition set to characterize that each SOMEIP message is likely to be a normal message; the second information is information in the detailed information of the message used to detect whether there is a message loss situation.
[0052] As a method, the detecting whether there is message loss among the multiple SOMEIP messages based on the second information in the detailed information corresponding to each of the multiple SOMEIP messages includes: detecting whether there is message loss among the multiple SOMEIP messages based on the sending and receiving message identifiers corresponding to each of the multiple SOMEIP messages, the sending and receiving message identifiers including a sending message identifier and a receiving message identifier; if, among the multiple SOMEIP messages, there is a SOMEIP message whose sending message identifier is different from the receiving message identifier, determining that there is message loss among the multiple SOMEIP messages; if the sending message identifier and the receiving message identifier corresponding to each of the multiple SOMEIP messages are the same, determining that there is no message loss among the multiple SOMEIP messages.
[0053] The second information may be a sent message identifier and a received message identifier; the sent message identifier may refer to an identifier of a message sent by a message sender, and the received message identifier may refer to an identifier of a message received by a message receiver.
[0054] If the sending message identifiers and receiving message identifiers corresponding to multiple SOMEIP messages are the same, it can be determined that there is no message loss in the multiple SOMEIP messages; conversely, if the sending message identifiers and receiving message identifiers of the SOMEIP messages in the multiple SOMEIP messages are different, it can be determined that the SOMEIP messages with different sending message identifiers and receiving message identifiers have message loss, and an error can be recorded at this time. The recorded error is: packet loss.
[0055] As another way, the detecting whether there is message loss among the multiple SOMEIP messages based on the second information in the detailed information corresponding to each of the multiple SOMEIP messages includes: obtaining the number of sent messages and the number of received messages corresponding to the multiple SOMEIP messages; if the number of sent messages and the number of received messages corresponding to the multiple SOMEIP messages are the same, determining that there is no message loss among the multiple SOMEIP messages; if the number of sent messages and the number of received messages corresponding to the multiple SOMEIP messages are not the same, determining that there is message loss among the multiple SOMEIP messages.
[0056] Among them, the second information is the number of sent messages and the number of received messages; among them, the number of sent messages can be understood as the number of messages sent by the message sending end within the preset time period, and the number of received messages can be understood as the number of messages received by the message receiving end within the preset time period.
[0057] If the number of sent messages and the number of received messages of multiple SOMEIP messages are the same, it can be determined that there is no message loss in the multiple SOMEIP messages; on the contrary, if the number of sent messages and the number of received messages corresponding to the multiple SOMEIP messages are different, it can be determined that message loss has occurred in the multiple SOMEIP messages, and an error can be recorded at this time. The recorded error is: packet loss.
[0058] Optionally, the above two methods can be combined to determine whether packet loss has occurred. Specifically, if the number of sent messages and the number of received messages of multiple SOMEIP messages are the same, and the sent message identifiers and received message identifiers corresponding to the multiple SOMEIP messages are the same, it can be determined that there is no packet loss in the multiple SOMEIP messages; otherwise, it can be determined that packet loss has occurred, and an error can be recorded. The recorded error is: packet loss.
[0059] Optionally, if based on the first information in the detailed information corresponding to each of the multiple SOMEIP messages, it is determined that the multiple SOMEIP messages all meet the first preset condition, based on the second information in the detailed information corresponding to each of the multiple SOMEIP messages, before detecting whether there is message loss in the multiple SOMEIP messages, it also includes: obtaining the service identifier, method identifier and business logic corresponding to each of the multiple SOMEIP messages; if the service identifier corresponding to each of the multiple SOMEIP messages is the same as the preset service identifier, the method identifier corresponding to each of the multiple SOMEIP messages is the same as the preset method identifier, and the business logic corresponding to each of the multiple SOMEIP messages is the same as the preset business logic, then it is determined that the multiple SOMEIP messages all meet the first preset condition.
[0060] Among them, the service identifier refers to ServiceID, the method identifier refers to MethodID, and the business logic refers to the business logic within the service; the preset service identifier, the preset method identifier and the preset business logic are all the ideal parsing information of each SOMEIP message set in advance.
[0061] After parsing multiple SOMEIP messages through a message parser and obtaining detailed information of each SOMEIP message, each SOMEIP message can be initially verified based on the service identifier, method identifier, and business logic in the detailed information. Specifically, if the service identifier of the SOMEIP message is the same as the preset service identifier, the method identifier of the SOMEIP message is the same as the preset method identifier, and the business logic of the SOMEIP message is the same as the preset business logic, it is determined that the SOMEIP message meets the first preset condition, that is, the initial verification of the SOMEIP message passes; conversely, if the service identifier of the SOMEIP message is different from the preset service identifier, an error can be recorded at this time. Record error: ServiceID error.
[0062] If the method ID of the SOMEIP message is different from the preset method ID, an error can be recorded. Record error: MethodID error.
[0063] If the business logic of the SOMEIP message is different from the preset business logic, an error can be recorded. Record error: Operation failed.
[0064] Step S240: If there is no message loss among the multiple SOMEIP messages, based on the third information in the detailed information corresponding to each of the multiple SOMEIP messages, detect whether there is a response timeout among the multiple SOMEIP messages.
[0065] In the embodiment of the present application, the third information is information in the detailed information of the message used to verify whether there is a response timeout in the SOMEIP message.
[0066] As a method, the detecting whether the multiple SOMEIP messages have response timeouts based on the third information in the detailed information corresponding to each of the multiple SOMEIP messages includes: obtaining the sending and receiving times corresponding to each of the multiple SOMEIP messages; determining the delays corresponding to each of the multiple SOMEIP messages based on the sending and receiving times corresponding to each of the multiple SOMEIP messages; if the delays corresponding to each of the multiple SOMEIP messages are all within a preset delay range, determining that the multiple SOMEIP messages do not have response timeouts; if, among the multiple SOMEIP messages, there are SOMEIP messages whose delays are not within the preset delay range, determining that the multiple SOMEIP messages have response timeouts.
[0067] Among them, the sending and receiving times corresponding to multiple SOMEIP messages refer to the request sending time and response receiving time of each SOMEIP message; the delay refers to the time difference between the request sending time and the response receiving time; the preset delay range is a pre-set delay range that indicates that no response timeout has occurred.
[0068] After determining that there is no message loss in multiple SOMEIP messages, the delay of each SOMEIP message can be further determined according to the respective sending and receiving time of each SOMEIP message. After obtaining the delay of each SOMEIP message, the delay of each SOMEIP message is compared with the preset delay range. If the delay of the SOMEIP message is within the preset delay range, it can be determined that there is no response timeout in the SOMEIP message; otherwise, it can be determined that there is a response timeout in the SOMEIP message, and an error can be recorded at this time. Record error: response timeout.
[0069] Step S250: If there is no response timeout for the multiple SOMEIP messages, it is determined that the target domain is in a normal communication state.
[0070] In the embodiment of the present application, if there is no response timeout in multiple SOMEIP messages, it can be determined that the target domain is in a normal communication state.
[0071] Optionally, the errors recorded above can all be reported to generate a message analysis report, and the message analysis report can be displayed.
[0072] In the embodiment of the present application, the process described in step S210-step S250 can be performed for multiple functional domains in the vehicle to determine the communication status of each functional domain. Optionally, the communication status data of each functional domain can be collected in the cloud or the host computer, and the data can be analyzed in a longer time dimension and a wider space dimension (across multiple functional domains), and a communication status analysis report at the vehicle level can be generated.
[0073] This application provides an automatic message parsing tool, continuous and accurate data collection work, and data intelligence tools, which can collect data accurately and continuously in real time, save snapshots of the entire communication process, and replay and restore the fault site at any time when necessary. It superimposes automatic message parsing and intelligent aggregation of associated communication nodes, greatly improving efficiency.
[0074] A communication data analysis method provided by the present application can realize accurate capture of SOMEIP messages by presetting message capture conditions, reduce the resource consumption required for packet capture, and can automatically parse the captured SOMEIP messages through a message parser, which not only greatly improves the data analysis efficiency, but also reduces the errors caused by manual analysis.
[0075] See also Figure 4 , an embodiment of the present application provides a communication data analysis device 300, the device 300 comprising:
[0076] The message acquisition unit 310 is used to acquire a plurality of SOMEIP messages of a target domain within a preset time period based on a preset message capture condition.
[0077] The parsing unit 320 is configured to parse the plurality of SOMEIP messages through a message parser to obtain detailed information corresponding to each of the plurality of SOMEIP messages.
[0078] The data analysis unit 330 is configured to perform communication data analysis on the target domain based on the detailed information corresponding to each of the plurality of SOMEIP messages.
[0079] As a method, the data analysis unit 330 is specifically used to, if based on the first information in the detailed information corresponding to each of the multiple SOMEIP messages, determine that the multiple SOMEIP messages all meet the first preset condition, and based on the second information in the detailed information corresponding to each of the multiple SOMEIP messages, detect whether there is message loss among the multiple SOMEIP messages; if there is no message loss among the multiple SOMEIP messages, based on the third information in the detailed information corresponding to each of the multiple SOMEIP messages, detect whether there is response timeout among the multiple SOMEIP messages; if there is no response timeout among the multiple SOMEIP messages, determine that the target domain is in a normal communication state.
[0080] Further, the data analysis unit 330 is also specifically used to detect whether there is message loss in the multiple SOMEIP messages based on the sending and receiving message identifiers corresponding to each of the multiple SOMEIP messages, and the sending and receiving message identifiers include a sending message identifier and a receiving message identifier; if among the multiple SOMEIP messages, the sending message identifier of a SOMEIP message is different from the receiving message identifier, it is determined that there is message loss in the multiple SOMEIP messages; if the sending message identifier and the receiving message identifier corresponding to each of the multiple SOMEIP messages are the same, it is determined that there is no message loss in the multiple SOMEIP messages.
[0081] Furthermore, the data analysis unit 330 is also used to obtain the number of sent messages and the number of received messages corresponding to the multiple SOMEIP messages; if the number of sent messages and the number of received messages corresponding to the multiple SOMEIP messages are the same, it is determined that there is no message loss for the multiple SOMEIP messages; if the number of sent messages and the number of received messages corresponding to the multiple SOMEIP messages are not the same, it is determined that there is message loss for the multiple SOMEIP messages.
[0082] Optionally, the data analysis unit 330 is further specifically used to obtain the sending and receiving times corresponding to each of the multiple SOMEIP messages; based on the sending and receiving times corresponding to each of the multiple SOMEIP messages, determine the delays corresponding to each of the multiple SOMEIP messages; if the delays corresponding to each of the multiple SOMEIP messages are all within a preset delay range, it is determined that there is no response timeout for the multiple SOMEIP messages; if among the multiple SOMEIP messages, there are SOMEIP messages whose delays are not within the preset delay range, it is determined that there is a response timeout for the multiple SOMEIP messages.
[0083] Optionally, the data analysis unit 330 is also specifically used to obtain the service identifier, method identifier and business logic corresponding to each of the multiple SOMEIP messages; if the service identifier corresponding to each of the multiple SOMEIP messages is the same as the preset service identifier, the method identifier corresponding to each of the multiple SOMEIP messages is the same as the preset method identifier, and the business logic corresponding to each of the multiple SOMEIP messages is the same as the preset business logic, then it is determined that the multiple SOMEIP messages all meet the first preset condition.
[0084] Optional, such as Figure 5 As shown, the device 300 may further include:
[0085] The parser generation unit 340 is used to obtain an ARXML file; and generate the message parser based on the ARXML file.
[0086] It should be noted that the device embodiment in the present application corresponds to the aforementioned method embodiment. The specific principles in the device embodiment can be found in the contents of the aforementioned method embodiment and will not be repeated here.
[0087] The following will be combined Figure 6 A vehicle provided in the present application is described.
[0088] See also Figure 6 Based on the above communication data analysis method and device, the embodiment of the present application also provides another vehicle 800 that can execute the above communication data analysis method. The vehicle 800 includes one or more (only one is shown in the figure) processors 802, a memory 804 and a network module 806 that are coupled to each other. Among them, the memory 804 stores a program that can execute the content of the above embodiment, and the processor 802 can execute the program stored in the memory 804.
[0089] Among them, the processor 802 may include one or more processing cores. The processor 802 uses various interfaces and lines to connect various parts of the entire vehicle 800, and executes various functions and processes data of the vehicle 800 by running or executing instructions, programs, code sets or instruction sets stored in the memory 804, and calling data stored in the memory 804. Optionally, the processor 802 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 802 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 802, but may be implemented separately through a communication chip.
[0090] The memory 804 may include a random access memory (RAM) or a read-only memory (ROM). The memory 804 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 804 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc. The data storage area may also store data created by the vehicle 800 during use (such as a phone book, audio and video data, chat record data), etc.
[0091] The network module 806 is used to receive and send electromagnetic waves, realize the mutual conversion between electromagnetic waves and electrical signals, and thus communicate with a communication network or other devices, such as communicating with a vehicle. The network module 806 may include various existing circuit elements for performing these functions, such as antennas, radio frequency nodes, digital signal processors, encryption / decryption chips, user identity module (SIM) cards, memories, etc. The network module 806 can communicate with various networks such as the Internet, corporate intranets, wireless networks, or communicate with other devices through wireless networks. The above-mentioned wireless networks may include cellular telephone networks, wireless local area networks, or metropolitan area networks. For example, the network module 806 can exchange information with a base station.
[0092] Please refer to Figure 7 , which shows a structural block diagram of a computer-readable storage medium provided in an embodiment of the present application. The computer-readable storage medium 900 stores program codes, which can be called by a processor to execute the method described in the above method embodiment.
[0093] The computer-readable storage medium 900 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer-readable storage medium 900 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 900 has storage space for program code 910 that performs any method step in the above method. These program codes can be read from or written to one or more computer program products. The program code 910 can be compressed, for example, in an appropriate form.
[0094] The present application provides a communication data analysis method, device, vehicle and storage medium. First, based on a preset message capture condition, multiple SOMEIP messages of a target domain within a preset time period are obtained, and then the multiple SOMEIP messages are parsed by a message parser to obtain detailed information corresponding to each of the multiple SOMEIP messages, and finally, based on the detailed information corresponding to each of the multiple SOMEIP messages, communication data analysis is performed on the target domain. Through the above method, accurate capture of SOMEIP messages can be achieved through preset message capture conditions, reducing the resource consumption required for packet capture, and the captured SOMEIP messages can be automatically parsed by the message parser, which not only greatly improves the data analysis efficiency, but also reduces the errors caused by manual analysis.
[0095] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.
Claims
1. A communication data analysis method, characterized in that: The method comprises: Based on the preset message capture conditions, multiple SOMEIP messages of the target domain within the preset time period are obtained; Parsing the multiple SOMEIP messages through a message parser to obtain detailed information corresponding to each of the multiple SOMEIP messages; Based on the detailed information corresponding to each of the multiple SOMEIP messages, communication data analysis is performed on the target domain.
2. The method according to claim 1, characterized in that Before the parsing of the plurality of SOMEIP messages by a message parser to obtain detailed information corresponding to each of the plurality of SOMEIP messages further includes: Get the ARXML file; The message parser is generated based on the ARXML file.
3. The method according to claim 1, characterized in that The performing communication data analysis on the target domain based on the detailed information corresponding to each of the plurality of SOMEIP messages includes: If it is determined that the multiple SOMEIP messages all meet the first preset condition based on the first information in the detailed information corresponding to each of the multiple SOMEIP messages, then based on the second information in the detailed information corresponding to each of the multiple SOMEIP messages, it is detected whether there is message loss in the multiple SOMEIP messages; If no message loss exists among the multiple SOMEIP messages, detecting whether there is a response timeout among the multiple SOMEIP messages based on the third information in the detailed information corresponding to each of the multiple SOMEIP messages; If there is no response timeout for the multiple SOMEIP messages, it is determined that the target domain is in a normal communication state.
4. The method according to claim 3, characterized in that The detecting whether there is message loss among the multiple SOMEIP messages based on the second information in the detailed information corresponding to each of the multiple SOMEIP messages includes: Based on the sending and receiving message identifiers corresponding to the multiple SOMEIP messages, respectively, detecting whether the multiple SOMEIP messages have message loss, the sending and receiving message identifiers including a sending message identifier and a receiving message identifier; If, among the multiple SOMEIP messages, a sent message identifier of a SOMEIP message is different from a received message identifier, it is determined that message loss exists among the multiple SOMEIP messages; If the sending message identifiers and receiving message identifiers corresponding to each of the multiple SOMEIP messages are the same, it is determined that there is no message loss in the multiple SOMEIP messages.
5. The method according to claim 4, characterized in that The method further comprises: Obtaining the number of sent messages and the number of received messages corresponding to the multiple SOMEIP messages; If the number of sent messages and the number of received messages corresponding to the multiple SOMEIP messages are the same, it is determined that there is no message loss in the multiple SOMEIP messages; If the number of sent messages and the number of received messages corresponding to the multiple SOMEIP messages are different, it is determined that message loss exists in the multiple SOMEIP messages.
6. The method according to claim 3, characterized in that The detecting, based on the third information in the detailed information corresponding to each of the plurality of SOMEIP messages, whether any of the plurality of SOMEIP messages has a response timeout comprises: Obtaining the sending and receiving times corresponding to each of the plurality of SOMEIP messages; Determine the delay corresponding to each of the plurality of SOMEIP messages based on the sending and receiving times corresponding to each of the plurality of SOMEIP messages; If the delays corresponding to the multiple SOMEIP messages are all within the preset delay range, it is determined that there is no response timeout for the multiple SOMEIP messages; If the delay of a SOMEIP message among the multiple SOMEIP messages is not within the preset delay range, it is determined that there is a response timeout in the multiple SOMEIP messages.
7. The method according to claim 3, characterized in that If, based on the first information in the detailed information corresponding to each of the multiple SOMEIP messages, it is determined that the multiple SOMEIP messages all meet the first preset condition, based on the second information in the detailed information corresponding to each of the multiple SOMEIP messages, detecting whether there is message loss in the multiple SOMEIP messages also includes: Obtaining the service identifier, method identifier and business logic corresponding to each of the plurality of SOMEIP messages; If the service identifier corresponding to each of the multiple SOMEIP messages is the same as the preset service identifier, the method identifier corresponding to each of the multiple SOMEIP messages is the same as the preset method identifier, and the business logic corresponding to each of the multiple SOMEIP messages is the same as the preset business logic, then it is determined that the multiple SOMEIP messages all meet the first preset condition.
8. A communication data analysis device, characterized in that: The device comprises: A message acquisition unit, used to acquire a plurality of SOMEIP messages of a target domain within a preset time period based on a preset message capture condition; A parsing unit, configured to parse the plurality of SOMEIP messages through a message parser to obtain detailed information corresponding to each of the plurality of SOMEIP messages; A data analysis unit is used to perform communication data analysis on the target domain based on the detailed information corresponding to each of the multiple SOMEIP messages.
9. A vehicle, characterized in that: The method comprises one or more processors; one or more programs are stored in a memory and configured to execute the method according to any one of claims 1 to 6 by the one or more processors.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program code, wherein when the program code is executed by a processor, the method according to any one of claims 1 to 6 is executed.
