Message analysis method and system, electronic equipment and storage medium

By querying and analyzing the data items of SOME/IP messages from the preset message record table in the autonomous driving system, the problem of low efficiency of the protocol conversion module in processing large amounts of message data is solved, and communication abnormalities can be quickly located and resolved. , reducing storage costs and improving analysis accuracy.

CN118612318APending Publication Date: 2024-09-06ECARX (HUBEI) TECHCO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410880006.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-02
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

In an autonomous driving system, when the protocol conversion module processes a large amount of message data, recording all message data may affect its normal operation and reduce the efficiency of the entire system.

Method used

By obtaining the SOME/IP messages to be analyzed, the corresponding data items are queried from the preset message record table, and abnormal analysis is performed based on the SOME/IP messages and data items. Only the analysis results are stored instead of all message data. .

Benefits of technology

It reduces the amount of data processing, improves system response speed, quickly locates and solves communication anomalies, reduces storage costs, and improves the accuracy of problem analysis and system performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118612318A
    Figure CN118612318A
Patent Text Reader

Abstract

The embodiment of the invention provides a message analysis method and system. The method comprises the following steps: acquiring an SOME / IP message to be analyzed; querying a corresponding data item from a preset message record table according to the SOME / IP message; performing anomaly analysis according to the SOME / IP message and the corresponding data item to obtain an analysis result; and storing the analysis result. According to the message analysis scheme provided by the embodiment of the invention, only the preset message record table and the analysis result are stored, and all message data are not stored any more, so that the data processing amount is greatly reduced, the amount of data needing to be processed is reduced, the system load is reduced, and the system response speed is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of automobile technology, and in particular to a message analysis method, a message analysis system, an electronic device and a computer-readable storage medium. Background Art

[0002] Scalable service-oriented middleware over IP (SOME / IP) is a service-oriented middleware defined by the Automotive Open System Architecture (AUTOSAR) to allow modern automotive electronic networks to communicate efficiently over Ethernet. SOME / IP is designed to meet the needs of modern automotive electronic networks for large amounts of data and high data transfer rates, especially in advanced applications such as driver assistance, infotainment, and in-vehicle Internet.

[0003] As an autonomous driving communication middleware, SOME / IP supports inter-chip communication, such as communication between a microcontroller unit (MCU) and a system on chip (SOC). However, in an autonomous driving system, a custom communication protocol is usually used to achieve efficient communication. Therefore, a protocol conversion module is needed to convert the custom protocol messages of each functional module into a standard protocol, and then send them to the MCU through the SOME / IP protocol for vehicle control.

[0004] The protocol conversion module is not only responsible for protocol conversion, but also needs to record the forwarded messages in order to analyze the abnormalities of the messages. However, due to the large number of messages forwarded by the protocol conversion module, recording all message data may affect its normal operation and even reduce the operating efficiency of the entire autonomous driving system. Summary of the invention

[0005] In view of the above problems, embodiments of the present invention are proposed to provide a message analysis method, a message analysis system, an electronic device and a computer-readable storage medium that overcome the above problems or at least partially solve the above problems.

[0006] In order to solve the above problem, an embodiment of the present invention discloses a message analysis method, which includes: obtaining a SOME / IP message to be analyzed; querying corresponding data items from a preset message record table according to the SOME / IP message; performing abnormal analysis on the SOME / IP message and the corresponding data items to obtain an analysis result; and storing the analysis result.

[0007] Optionally, querying a corresponding data item from a preset message record table according to the SOME / IP message includes: reading event identification information of a message event from the SOME / IP message; and querying the message record table for the data item corresponding to the event identification information.

[0008] Optionally, performing an abnormality analysis on the SOME / IP message and the corresponding data item to obtain an analysis result includes: reading scheduling time information of the message event from the SOME / IP message, and reading scheduling period threshold information of the message event from the data item; calculating scheduling period information according to the message scheduling time information; and comparing the scheduling period information with the scheduling period threshold information to obtain a scheduling period abnormality analysis result of the message event.

[0009] Optionally, performing an abnormality analysis on the SOME / IP message and the corresponding data item to obtain an analysis result includes: performing protocol conversion on the SOME / IP message and sending the message after protocol conversion; recording reception time information of the SOME / IP message and sending time information of the message after protocol conversion; generating forwarding delay information of the message event according to the reception time information and the sending time information; reading forwarding delay threshold information of the message event from the data item; and comparing the forwarding delay information with the forwarding delay threshold information to obtain a forwarding delay abnormality analysis result of the message event.

[0010] Optionally, performing an abnormality analysis on the SOME / IP message and the corresponding data item to obtain an analysis result includes: reading the timestamp information of the message event from the adjacent SOME / IP message, and reading the period threshold information and the period deviation threshold information of the message event from the data item; calculating the period information of the message event according to the timestamp information; calculating the period deviation information of the message event according to the period information and the period threshold information; and comparing the period deviation information with the period deviation threshold information to obtain a period deviation abnormality analysis result of the message event.

[0011] Optionally, performing an abnormality analysis on the SOME / IP message and the corresponding data item to obtain an analysis result includes: reading counting information of the message event from the adjacent SOME / IP message, and reading counting threshold information of the message event from the data item; comparing the counting information with the counting threshold information to obtain a counting abnormality analysis result of the message event.

[0012] Optionally, storing the analysis result includes: obtaining a storage instruction for the analysis result; and storing the analysis result to a storage location corresponding to the storage instruction.

[0013] Optionally, before obtaining the SOME / IP message to be analyzed, the method further includes: obtaining an analysis instruction of the event message; and starting an abnormality analysis operation on the SOME / IP message according to the analysis instruction.

[0014] The embodiment of the present invention also discloses a message analysis system, which includes: a message acquisition module, used to acquire a SOME / IP message to be analyzed; a data item query module, used to query corresponding data items from a preset message record table according to the SOME / IP message; a message anomaly analysis module, used to perform an anomaly analysis on the SOME / IP message and the corresponding data item to obtain an analysis result; and an analysis result storage module, used to store the analysis result.

[0015] Optionally, the data item query module includes: an event identification information reading module, used to read the event identification information of the message event from the SOME / IP message; and a corresponding data item query module, used to query the data item corresponding to the event identification information in the message record table.

[0016] Optionally, the message anomaly analysis module includes: a scheduling information reading module, used to read the scheduling time information of the message event from the SOME / IP message, and read the scheduling period threshold information of the message event from the data item; a scheduling period calculation module, used to calculate the scheduling period information according to the message scheduling time information; a scheduling information comparison module, used to compare the scheduling period information with the scheduling period threshold information to obtain the scheduling period anomaly analysis result of the message event.

[0017] Optionally, the message anomaly analysis module includes: a protocol conversion module, used to perform protocol conversion on the SOME / IP message and send the message after protocol conversion; a sending and receiving time recording module, used to record the receiving time information of the SOME / IP message and the sending time information of the message after protocol conversion; a forwarding delay generation module, used to generate forwarding delay information of the message event according to the receiving time information and the sending time information; a delay threshold reading module, used to read the forwarding delay threshold information of the message event from the data item; a delay information comparison module, used to compare the forwarding delay information with the forwarding delay threshold information to obtain a forwarding delay anomaly analysis result of the message event.

[0018] Optionally, the message anomaly analysis module includes: a timestamp reading module, used to read the timestamp information of the message event from the adjacent SOME / IP message, and read the period threshold information and period deviation threshold information of the message event from the data item; a period information calculation module, used to calculate the period information of the message event according to the timestamp information; a period deviation calculation module, used to calculate the period deviation information of the message event according to the period information and the period threshold information; a period deviation comparison module, used to compare the period deviation information with the period deviation threshold information to obtain the period deviation anomaly analysis result of the message event.

[0019] Optionally, the message anomaly analysis module includes: a counting information reading module, used to read the counting information of the message event from the adjacent SOME / IP message, and read the counting threshold information of the message event from the data item; a counting information comparison module, used to compare the counting information and the counting threshold information to obtain the counting anomaly analysis result of the message event.

[0020] Optionally, the analysis result storage module includes: a storage instruction acquisition module, used to acquire the storage instruction of the analysis result; and a storage result storage module, used to store the analysis result to a storage location corresponding to the storage instruction.

[0021] Optionally, the system further comprises: an analysis instruction acquisition module, used to acquire the analysis instruction of the event message before the message acquisition module acquires the SOME / IP message to be analyzed; and an abnormal analysis starting module, used to start the abnormal analysis operation on the SOME / IP message according to the analysis instruction.

[0022] An embodiment of the present invention further discloses an electronic device, comprising: one or more processors; and one or more machine-readable media storing instructions thereon, which, when executed by the one or more processors, enables the electronic device to execute a message analysis method as described above.

[0023] The embodiment of the present invention further discloses a computer-readable storage medium, which stores a computer program that enables a processor to execute the message analysis method as described above.

[0024] The embodiments of the present invention include the following advantages:

[0025] The message analysis solution provided by the embodiment of the present invention obtains a SOME / IP message to be analyzed, queries corresponding data items from a preset message record table according to the SOME / IP message, then performs abnormal analysis according to the SOME / IP message and the corresponding data items to obtain an analysis result, and then stores the analysis result.

[0026] Since the embodiment of the present invention only stores the preset message record table and analysis results, and no longer stores all message data, the data processing amount is greatly reduced, which helps to reduce the amount of data to be processed, reduce the system load, and improve the system response speed. By querying the corresponding data items from the preset message record table, the abnormal message can be quickly located and further analyzed, which helps to quickly locate and solve communication anomalies, performance problems, etc. Only the preset message record table and analysis results need to be stored, and all message data do not need to be stored, which can reduce storage costs, which is particularly important for systems that need to store a large amount of data for a long time. By performing abnormal analysis based on SOME / IP messages and corresponding data items, the cause of the problem can be analyzed more accurately, which helps to improve the accuracy of problem analysis and reduce misjudgment and missed judgment. The analysis process is divided into two steps of table lookup and abnormal analysis, which makes the optimization of the system more convenient. The preset message record table and analysis method can be optimized to further improve the performance and efficiency of the system.

[0027] In summary, the message analysis solution provided by the embodiment of the present invention can significantly reduce the amount of data processing, quickly locate problems, reduce storage costs, improve analysis accuracy, and facilitate system optimization. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 It is a flowchart of the steps of a message analysis method according to an embodiment of the present invention;

[0029] Figure 2 It is a module schematic diagram of a message forwarding anomaly monitoring solution based on SOME / IP according to an embodiment of the present invention;

[0030] Figure 3 It is a flowchart of a message forwarding anomaly monitoring solution based on SOME / IP according to an embodiment of the present invention;

[0031] Figure 4 It is a data structure diagram of a message record table or an event forwarding table in an embodiment of the present invention;

[0032] Figure 5 It is a schematic diagram of the data structure of the log information of the AP Bridge module forwarding exception according to an embodiment of the present invention;

[0033] Figure 6 It is a structural block diagram of a message analysis system according to an embodiment of the present invention. DETAILED DESCRIPTION

[0034] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0035] The message analysis scheme provided by the embodiment of the present invention is intended to solve the problems that may be encountered by the protocol conversion module in the autonomous driving system, especially the performance problems that may be caused when processing a large amount of message data. In the specific application scenario of the embodiment of the present invention, the SOME / IP message to be analyzed can be selected from the SOME / IP message captured in the autonomous driving system. According to the selected SOME / IP message, the corresponding data item is queried in the preset message record table. This message record table can be defined in advance, including various possible message types and corresponding data items. According to the selected SOME / IP message and the data items queried from the preset message record table, an abnormality analysis is performed. This may involve logical analysis, comparison, statistics and other operations on the message content to determine whether the message has an abnormality or the cause of the abnormality. The results of the abnormality analysis are stored, which can be a simple record or a more complex data structure for subsequent problem tracking and system optimization.

[0036] By using the message analysis solution provided by the embodiment of the present invention, the protocol conversion module can perform abnormal analysis more efficiently when processing a large amount of message data, thereby improving the stability and performance of the system. At the same time, since only part of the data and analysis results are recorded, the storage space occupied can be reduced, and the system cost can be reduced.

[0037] Reference Figure 1 , shows a flow chart of steps of a message analysis method according to an embodiment of the present invention. The message analysis method may specifically include the following steps:

[0038] Step 101: Obtain a SOME / IP message to be analyzed.

[0039] In an embodiment of the present invention, in an autonomous driving system, SOME / IP messages are messages transmitted via Ethernet and are used to communicate between various control units or functional modules inside a car. In order to analyze communication problems or performance problems, some related SOME / IP messages need to be captured.

[0040] For example, if you need to analyze the control information of an autonomous vehicle, you can use network tools to capture SOME / IP messages when the vehicle system interacts with the network.

[0041] Step 102: According to the SOME / IP message, the corresponding data item is searched from the preset message record table.

[0042] In an embodiment of the present invention, the preset message record table includes the structure of the SOME / IP message and the corresponding data items. In this step, according to the captured SOME / IP message, the corresponding data items are found from the preset message record table for subsequent abnormal analysis.

[0043] For example: Assume that a data structure of control information is defined in the message record table, including data items such as vehicle speed and steering angle. When a SOME / IP message is captured, the values ​​of these data items can be found from the record table based on the structure and content of the SOME / IP message.

[0044] Step 103: Perform an abnormality analysis on the SOME / IP message and the corresponding data items to obtain an analysis result.

[0045] In the embodiment of the present invention, in this step, the SOME / IP message and the corresponding data item are analyzed for abnormality to determine whether there is an abnormality or the cause of the abnormality. This may involve operations such as logic analysis, data comparison, and statistical analysis.

[0046] For example: Continuing with the above example, suppose that the vehicle speed in a SOME / IP message is abnormally high and exceeds the normal range. By comparing the vehicle speed value with the vehicle speed value within the normal range in the corresponding data item, it can be determined that the SOME / IP message is abnormal.

[0047] Step 104: store the analysis results.

[0048] In an embodiment of the present invention, the abnormal analysis results are stored for subsequent tracking and optimization. The storage can be a simple record or a more complex data structure, depending on the needs of the system.

[0049] For example: For the abnormal SOME / IP message in the above example, it can be recorded in an abnormal log file, which includes the message content, abnormal type and possible cause for subsequent analysis and processing.

[0050] The message analysis solution provided by the embodiment of the present invention obtains a SOME / IP message to be analyzed, queries corresponding data items from a preset message record table according to the SOME / IP message, then performs abnormal analysis according to the SOME / IP message and the corresponding data items to obtain an analysis result, and then stores the analysis result.

[0051] Since the embodiment of the present invention only stores the preset message record table and analysis results, and no longer stores all message data, the data processing amount is greatly reduced, which helps to reduce the amount of data to be processed, reduce the system load, and improve the system response speed. By querying the corresponding data items from the preset message record table, the abnormal message can be quickly located and further analyzed, which helps to quickly locate and solve communication anomalies, performance problems, etc. Only the preset message record table and analysis results need to be stored, and all message data do not need to be stored, which can reduce storage costs, which is particularly important for systems that need to store a large amount of data for a long time. By performing abnormal analysis based on SOME / IP messages and corresponding data items, the cause of the problem can be analyzed more accurately, which helps to improve the accuracy of problem analysis and reduce misjudgment and missed judgment. The analysis process is divided into two steps of table lookup and abnormal analysis, which makes the optimization of the system more convenient. The preset message record table and analysis method can be optimized to further improve the performance and efficiency of the system.

[0052] In summary, the message analysis solution provided by the embodiment of the present invention can significantly reduce the amount of data processing, quickly locate problems, reduce storage costs, improve analysis accuracy, and facilitate system optimization.

[0053] In an exemplary embodiment of the present invention, one implementation method of querying the corresponding data item from the preset message record table according to the SOME / IP message is to read the event identification information of the message event from the SOME / IP message; and query the data item corresponding to the event identification information in the message record table. In order to query the corresponding data item in the SOME / IP message, one implementation method is to read the event identification information in the SOME / IP message, and then search for the corresponding data item in the preset message record table. This implementation method can help analysts quickly and accurately find the corresponding data item in the SOME / IP message, so as to perform subsequent abnormal analysis and processing.

[0054] In the actual application process of this implementation method, it is necessary to define a message record table, which contains event identification information and corresponding data items of various possible SOME / IP message events. Then, when a SOME / IP message is captured, the event identification information of the message event can be read from the captured SOME / IP message. The event identification information is usually used to uniquely identify a message event for subsequent processing and analysis. According to the read event identification information, the corresponding data item is searched in the preset message record table. This message record table can contain various possible event identification information and corresponding data items, so as to quickly and accurately find the required data items.

[0055] For example: suppose there is an autonomous driving system that uses the SOME / IP protocol for communication. One communication scenario in the system is that the vehicle sends speed information to the control center. After the control center receives the speed information, it needs to perform an abnormal analysis on the speed. In order to achieve this function, a message record table can be defined, which contains the event identification information of the speed information and the corresponding data items, as shown below:

[0056] Event identification information: 01234;

[0057] Data item: Vehicle speed (km / h)

[0058] When the control center receives the SOME / IP message of vehicle speed information, it first reads the event identification information from the SOME / IP message, assuming that the event identification information is 01234. According to the read event identification information, the corresponding data item, i.e., vehicle speed (km / h), is searched in the message record table. Through the above steps, the vehicle speed information contained in the SOME / IP message can be found quickly and accurately, so as to perform subsequent abnormal analysis.

[0059] The embodiment of the present invention can realize the function of querying the data items corresponding to the SOME / IP message, thereby helping analysts to quickly and accurately find the corresponding data items in the SOME / IP message. Analysts can quickly and accurately find the required data items, saving the time of searching for data and improving the analysis efficiency. Through the corresponding relationship between event identification information and data items, the error rate of manual search is reduced and the accuracy of data query is improved. The event identification information and the data items are stored in correspondence, making it easier to manage and maintain the message record table. By maintaining a flexible message record table, new event identification information and corresponding data items can be easily added, thereby enhancing the scalability of the system.

[0060] In an exemplary embodiment of the present invention, an implementation method for performing anomaly analysis on a SOME / IP message and a corresponding data item to obtain an analysis result is to read the scheduling time information of the message event from the SOME / IP message, and read the scheduling period threshold information of the message event from the data item; calculate the scheduling period information according to the message scheduling time information; compare the scheduling period information with the scheduling period threshold information to obtain the scheduling period anomaly analysis result of the message event. One of the implementation methods for performing anomaly analysis on a SOME / IP message and a corresponding data item is to calculate the actual scheduling period of the message event by reading the scheduling time information in the SOME / IP message and the scheduling period threshold information in the data item, and compare it with the preset threshold, thereby performing anomaly analysis. This method can help identify message events with abnormal scheduling periods, and then perform subsequent processing and analysis.

[0061] In the actual application process of this implementation method, it is necessary to define a message record table to store the scheduling cycle threshold information of the message event. Then, when the SOME / IP message is captured, the scheduling time information of the message event is read from the captured SOME / IP message. This scheduling time information usually includes the sending time or receiving time of the message event. The scheduling cycle threshold information of the corresponding message event is read from the preset message record table. This information is used to determine the expected scheduling cycle of the message event. According to the scheduling time information read, the actual scheduling cycle of the message event is calculated. This actual cycle can be calculated by the difference between the current event scheduling time and the previous event scheduling time. The actual scheduling cycle is compared with the preset scheduling cycle threshold information to determine whether there is a scheduling cycle exception. If the actual scheduling cycle exceeds the scheduling cycle threshold, it can be considered that there is an exception. According to the comparison result, an abnormality analysis report is generated, which includes which message events have scheduling cycle exceptions and specific information of the exception.

[0062] For example: Assume there is an autonomous driving system that uses the SOME / IP protocol for communication. There is a sensor in the system that periodically sends data to the control center, and the expected scheduling period is 100ms. A SOME / IP message is captured, which contains the sensor data and sending time information. A message record table is defined, which contains the scheduling period threshold information of the sensor event, as shown below:

[0063] Sensor events: sensor data;

[0064] Scheduling period threshold (ms): 100

[0065] Read the scheduling time information of two adjacent schedulings of the sensor event from the captured SOME / IP message, and calculate the scheduling cycle information, that is, the actual scheduling cycle. Read the scheduling cycle threshold information (i.e., 100ms) of the sensor event from the defined message record table. Compare the actual scheduling cycle with the preset scheduling cycle threshold to determine whether there is a scheduling cycle anomaly. Based on the comparison results, generate an anomaly analysis report to indicate whether there is a scheduling cycle anomaly in the sensor event.

[0066] The embodiments of the present invention can help the system to timely discover and handle potential problems and improve the stability and reliability of the system by timely identifying abnormal message events in the scheduling cycle. The automated calculation and comparison process can help analysts quickly and accurately identify abnormal message events and improve the efficiency of analysis. The automated calculation and comparison process reduces the possibility of errors in manual operations and improves the accuracy of data analysis. By analyzing abnormal message events in the scheduling cycle, the system can be helped to optimize the scheduling strategy and improve the performance and efficiency of the system.

[0067] In an exemplary embodiment of the present invention, an implementation method for obtaining an analysis result by performing an abnormal analysis on a SOME / IP message and a corresponding data item is to perform protocol conversion on the SOME / IP message and send the message after protocol conversion; record the receiving time information of the SOME / IP message and the sending time information of the message after protocol conversion; generate the forwarding delay information of the message event according to the receiving time information and the sending time information; read the forwarding delay threshold information of the message event from the data item; compare the forwarding delay information with the forwarding delay threshold information to obtain the forwarding delay abnormal analysis result of the message event. This implementation method aims to analyze whether there is an abnormality in the forwarding delay of the message event by performing protocol conversion on the SOME / IP message and recording the receiving and sending time information of the message. The specific steps include performing protocol conversion on the SOME / IP message, recording the receiving and sending time information, calculating the forwarding delay, comparing the forwarding delay with the threshold, and generating the abnormal analysis result.

[0068] For example: Assume that there is an autonomous driving system that uses the SOME / IP protocol for communication. A control unit in the system periodically sends data to another control unit, and the expected forwarding delay is 10ms. Now a SOME / IP message is captured, which contains the data to be forwarded. The captured SOME / IP message is converted into a message of another protocol. At the same time, the time when the SOME / IP message is captured, that is, the receiving time information, is recorded. After the protocol conversion, the converted message is sent out, and the sending time information of the converted message is recorded. According to the recorded receiving time information and sending time information, the forwarding delay information of the message event is calculated. The forwarding delay threshold information (i.e., 10ms) of the message event is read from the preset message record table. The calculated forwarding delay information is compared with the preset forwarding delay threshold information to determine whether there is a forwarding delay anomaly. According to the comparison result, an abnormality analysis report is generated to indicate whether there is a forwarding delay anomaly in the message event.

[0069] The embodiments of the present invention can help the system to deal with problems in a timely manner and improve the stability and reliability of the system by timely discovering the abnormal forwarding delay. The automated calculation and comparison process reduces the need for manual intervention and reduces the possibility of errors. By analyzing the abnormal forwarding delay, the system can be helped to optimize the forwarding strategy and improve the performance and efficiency of the system. The automated process can help analysts quickly and accurately identify abnormal situations and improve the efficiency of analysis.

[0070] In an exemplary embodiment of the present invention, an implementation method for obtaining an analysis result by performing an abnormal analysis on a SOME / IP message and a corresponding data item is to read the timestamp information of the message event from an adjacent SOME / IP message, and read the period threshold information and period deviation threshold information of the message event from the data item; calculate the period information of the message event according to the timestamp information; calculate the period deviation information of the message event according to the period information and the period threshold information; compare the period deviation information and the period deviation threshold information to obtain the period deviation abnormal analysis result of the message event. This implementation method aims to identify possible period deviation abnormalities by analyzing adjacent SOME / IP messages and calculating the period information and period deviation information of the message event. The specific steps include reading the timestamp information from adjacent messages, reading the period threshold information and the period deviation threshold information from the data item, calculating the period information and the period deviation information, comparing the period deviation with the threshold, and generating an abnormal analysis result.

[0071] For example: Assume that there is an autonomous driving system that uses the SOME / IP protocol for communication. A control unit in the system periodically sends data to another control unit, with an expected period of 100ms and an allowable period deviation of 10ms. Now two adjacent SOME / IP messages are captured, each containing the data and timestamp information that need to be sent for the same message event. Read the respective timestamp information from the adjacent SOME / IP messages. Read the period threshold information (i.e. 100ms) and period deviation threshold information (i.e. 10ms) of the message event from the preset message record table. Calculate the period information of the message event based on the read timestamp information. It can be calculated by the difference in timestamps between two adjacent messages. Subtract the calculated period information from the preset period threshold to obtain the period deviation information. If the period deviation information exceeds the period deviation threshold information, it can be considered that there is an abnormality. Based on the comparison results, generate an abnormality analysis report to indicate whether there is a period deviation abnormality in the message event.

[0072] The embodiments of the present invention can help the system deal with problems in a timely manner and improve the stability and reliability of the system by timely discovering cycle deviation anomalies. The automated calculation and comparison process reduces the need for manual intervention and reduces the possibility of errors. By analyzing cycle deviation anomalies, the system can be helped to optimize the scheduling strategy and improve the performance and efficiency of the system. The automated process can help analysts quickly and accurately identify abnormal situations and improve analysis efficiency.

[0073] In an exemplary embodiment of the present invention, an implementation method of performing anomaly analysis on SOME / IP messages and corresponding data items to obtain an analysis result is to read the count information of the message event from adjacent SOME / IP messages, and read the count threshold information of the message event from the data item; compare the count information with the count threshold information to obtain the count anomaly analysis result of the message event. This implementation method aims to identify possible count anomalies by analyzing the count information in adjacent SOME / IP messages. The specific steps include reading the count information from adjacent messages, reading the count threshold information from the data item, comparing the count information with the count threshold information, and generating an anomaly analysis result.

[0074] For example: suppose there is an autonomous driving system that uses the SOME / IP protocol for communication. A control unit in the system periodically sends data to another control unit, and the expected number of transmissions is 100 times. Now two adjacent SOME / IP messages are captured, each containing the data to be sent and the counting information. Read the counting information, that is, the number of transmissions, from the adjacent SOME / IP messages. Read the counting threshold information of the message event from the preset data structure (that is, 100 times). Compare the read counting information with the preset counting threshold information to determine whether there is a counting anomaly. If the actual number of transmissions exceeds the threshold, or the counting information of adjacent SOME / IP messages is incoherent, it can be considered that there is an anomaly. Based on the comparison results, generate an anomaly analysis report to indicate whether there is a counting anomaly in the message event.

[0075] The embodiments of the present invention can help the system deal with problems in a timely manner and improve the stability and reliability of the system by timely discovering counting anomalies. The automated comparison process reduces the need for manual intervention and reduces the possibility of errors. By analyzing counting anomalies, the system can be helped to optimize the scheduling strategy and improve the performance and efficiency of the system. The automated process can help analysts quickly and accurately identify abnormal situations and improve analysis efficiency.

[0076] In an exemplary embodiment of the present invention, an implementation method for storing the analysis results is to obtain a storage instruction for the analysis results; and store the analysis results in a storage location corresponding to the storage instruction. This implementation method aims to record abnormal conditions and results during the analysis process by storing the analysis results in a specified storage location. The specific steps include obtaining a storage instruction and a storage location, and storing the analysis results in a specified location.

[0077] For example: suppose there is an autonomous driving system that uses the SOME / IP protocol for communication. A module in the system is responsible for analyzing the data items in the SOME / IP message and detecting whether there are any abnormalities. Now a SOME / IP message is captured and analyzed for abnormalities using the implementation method described earlier to obtain the analysis results. The analysis module generates storage instructions based on the analysis results, or receives storage instructions from other modules, which indicate where and how to store the analysis results. According to the storage instructions, the analysis results are stored in the specified storage location. This may involve writing the results to a file, database, or other data storage medium.

[0078] The embodiment of the present invention stores the analysis results as stored results, ensuring that even if the system is restarted or data is lost, the previous abnormal situation can be reviewed and analyzed again. The stored results can be used to establish historical records to help analysts understand the development of the system and the trend of abnormal situations. The stored results can be used for subsequent analysis by other modules or systems, such as for generating reports or performing data mining analysis. The stored results can help quickly locate and resolve abnormal situations that occur in the system, improving the reliability and stability of the system.

[0079] In an exemplary embodiment of the present invention, an implementation method before obtaining the SOME / IP message to be analyzed is to obtain an analysis instruction of the event message; and start an abnormal analysis operation on the SOME / IP message according to the analysis instruction. This implementation method aims to obtain an analysis instruction before performing an abnormal analysis on the SOME / IP message, and then start an abnormal analysis operation on the SOME / IP message according to the analysis instruction. The specific steps include obtaining an analysis instruction of the event message, and performing an abnormal analysis operation according to the analysis instruction.

[0080] For example: suppose there is an automotive electronic control system that uses the SOME / IP protocol for communication. A module in the system is responsible for analyzing the data items in the SOME / IP message and detecting whether there are any abnormalities. Now it is necessary to perform abnormal analysis on a specific SOME / IP message. The analysis module obtains the analysis instruction of a specific SOME / IP message from the management module or other control modules. The analysis instruction includes information such as the message type to be analyzed, the analysis method, and related parameters. According to the obtained analysis instruction, the abnormal analysis operation of the SOME / IP message is started. This may involve operations such as parsing the message, calculating the data items, and detecting abnormalities.

[0081] The embodiments of the present invention can obtain different analysis instructions according to specific needs, and flexibly select analysis methods and parameters to adapt to different analysis scenarios. The analysis instructions can be customized according to actual conditions to meet specific analysis needs and improve the accuracy and effectiveness of the analysis. The message is selectively analyzed according to the analysis instructions to avoid unnecessary analysis operations and save system resources and time. The analysis process can be finely managed, including the storage, review and monitoring of the analysis results, to improve the efficiency and convenience of management.

[0082] Based on the above description of an embodiment of a message analysis method, a message forwarding anomaly monitoring solution based on SOME / IP is introduced below. Figure 2 , shows a module schematic diagram of a message forwarding anomaly monitoring solution based on SOME / IP in an embodiment of the present invention. This message forwarding anomaly monitoring solution based on SOME / IP can be applied to an autonomous driving system. The autonomous driving system may involve a host computer, an MCU and a SOC. Among them, the host computer includes a forwarding anomaly monitoring module, the forwarding anomaly monitoring module runs the host computer monitoring service, the forwarding anomaly monitoring module establishes UDP communication with the protocol conversion bridge (AP Bridge) module in the SOC, and the forwarding anomaly monitoring module is responsible for receiving the log data of the SOME / IP message forwarding anomaly and issuing log monitoring instructions. The SOC includes a SOME / IP gateway, an AP Bridge module, a fusion module, a perception module, a radar module and a storage module. Among them, the AP Bridge module is responsible for the conversion between the SOME / IP protocol and the custom protocol of the self-driving module inside the SOC. It integrates the SOME / IP client and the custom client. As a key node of communication, it is necessary to record the abnormal log of SOME / IP forwarding for analyzing communication anomaly problems. The fusion module is responsible for receiving the sensor data of the perception module and the radar module, as well as the vehicle information transmitted from the MCU, such as vehicle speed, acceleration and other information. The fusion module uses the fusion algorithm to output control instructions and sends them to the control module of the MCU. The perception module uses the vehicle camera data and outputs the perception results to the fusion module. The radar module outputs the millimeter wave radar data to the perception module. The storage module stores log files. The MCU includes the control module, the vehicle information module and the SOME / IP interface.

[0083] The perception module, radar module, fusion module and AP Bridge module transmit data through a custom protocol, and the SOME / IP gateway, SOME / IP interface and AP Bridge module transmit data through SOME / IP.

[0084] Reference Figure 3 , shows a step flow chart of a message forwarding anomaly monitoring solution based on SOME / IP according to an embodiment of the present invention.

[0085] Step 301: The forwarding abnormality monitoring module of the host computer issues an instruction to start monitoring of SOME / IP message forwarding abnormality.

[0086] Step 302: The AP Bridge module receives the instruction from the host computer and starts monitoring the forwarding abnormality of the SOME / IP message.

[0087] Step 303: The AP Bridge module searches a custom event forwarding table and uses event identification information (such as Event ID) as an index to determine the scheduling threshold information for SOME / IP forwarding anomaly monitoring.

[0088] Step 304: The AP Bridge module records the time of this service scheduling and calculates it with the time of the last scheduling to obtain the current scheduling period.

[0089] Step 305 , compare the scheduling period calculated in step 304 with the scheduling period threshold obtained by table lookup.

[0090] Step 306: If the scheduling period exceeds the scheduling period threshold, it is considered that there is a scheduling anomaly in the AP Bridge module, and an anomaly record needs to be made.

[0091] After step 306 , or if the scheduling period does not exceed the scheduling period threshold, step 307 is executed.

[0092] Step 307, the AP Bridge module continues to calculate the forwarding delay of each SOME / IP Event. When the AP Bridge module receives an Event, it records the timestamp of receiving the Event, performs protocol conversion, and sends it using the custom protocol. It records the timestamp sent at this time. The difference between the two is the forwarding delay of the Event.

[0093] Step 308: compare the forwarding delay calculated in step 307 with the forwarding delay threshold obtained by table lookup.

[0094] Step 309: If the forwarding delay exceeds the forwarding delay threshold, it is considered that the forwarding delay of the AP Bridge module is abnormal, and an abnormal record needs to be made.

[0095] After step 309, or if the forwarding delay does not exceed the forwarding delay threshold, step 310 is executed.

[0096] Step 310, the AP Bridge module continues to calculate the period of each Event of SOME / IP. When an Event message is received, the timestamp carried in the message is taken out and saved. When an Event message with the same Event ID is received next time, the timestamp in the message is also taken out and subtracted from the timestamp of the message temporarily saved last time. The difference between the two is the actual Event period of the EventID message.

[0097] Step 311: Subtract the actual event period calculated in step 310 from the event period obtained by table lookup. The difference between the two is the event period deviation, which is compared with the event period deviation threshold preset in the table.

[0098] Step 312: If the period deviation exceeds the period deviation threshold, it is considered that the Event has a period anomaly and an anomaly record needs to be made.

[0099] After step 312 , or if the period deviation does not exceed the period deviation threshold, step 313 is performed.

[0100] Step 313, the AP Bridge module continues to calculate the message count. The SOME / IP Event message has a count field. Each time a message is sent, the sender automatically increases the message count by one. The AP Bridge module determines whether the message counts of the same Event ID received twice are continuous, and then determines whether it is abnormal.

[0101] Step 314: The AP Bridge module checks whether the count in each Event message is continuous.

[0102] In step 315, if it is not continuous, the event is considered to be a counting discontinuity exception and needs to be recorded.

[0103] After step 315, or if the count is continuous, step 316 is performed.

[0104] Step 316: According to the control instruction sent by the host computer, these temporarily recorded forwarding abnormal information are uploaded to the host computer or stored locally on the disk.

[0105] Step 317: the forwarding exception information recorded this time is directly saved on the device.

[0106] Step 318: the forwarding exception information recorded this time needs to be uploaded to the host computer for storage.

[0107] Reference Figure 4, shows a schematic diagram of the data structure of a message record table or an event forwarding table in an embodiment of the present invention. The message record table or the event forwarding table uses the event ID as an index. In the message record table or the event forwarding table:

[0108] Event ID: 4 bytes in length. Each SOME / IP message has a unique Event ID, which serves as an index.

[0109] AP Bridge Scheduling Cycle: Length 4 Bytes. The scheduling cycle of each event is triggered by the received event. It varies according to the sending cycle of the event. Some events are triggered by 10ms, and some events are triggered by 25ms.

[0110] AP Bridge scheduling cycle abnormal threshold: length 2Byte, it is the deviation of the normal scheduling cycle, for example, if the scheduling cycle is 25ms, if the actual scheduling cycle is 28ms or 21ms, its deviation is 3ms or 4ms. Here the threshold is set to 3ms, which can be adjusted according to the actual situation.

[0111] Event forwarding delay abnormal threshold: length is 4 bytes. If the event forwarding delay exceeds this threshold, it is considered abnormal. It is set to 500ms here and can be adjusted according to actual conditions.

[0112] Event cycle: 4 bytes in length, set the sending cycle of each event, which may be 10ms or 25ms, etc., depending on the project settings.

[0113] Event cycle abnormality threshold: Length 2 bytes. For example, for an event with a normal period of 25ms, if the actual calculated period is 30ms or 24ms, then the deviation is 5ms or 1ms respectively. If the threshold is set to 3ms, then 5ms is the abnormal event period.

[0114] Reference Figure 5 , shows a schematic diagram of the data structure of the log information of the AP Bridge module forwarding exception in an embodiment of the present invention.

[0115] Record timestamp: 8 bytes in length, the timestamp of each time a forwarding exception is found.

[0116] Event ID: 4 bytes in length. Each SOME / IP has a unique Event ID, which can be used as an index.

[0117] Message direction: Length 1 Byte, 0x01 represents input (in), 0x02 represents output (out).

[0118] AP Bridge Normal Scheduling Cycle: Length 4 Bytes, records the normal scheduling cycle of the Event when an exception occurs.

[0119] AP Bridge abnormal scheduling cycle: length 4Byte, records the abnormal scheduling cycle of the Event when an abnormality occurs.

[0120] Event forwarding delay threshold: 4 bytes in length, records the forwarding delay threshold of the event when an exception occurs.

[0121] Event abnormal forwarding delay: length 4 bytes, records the abnormal forwarding delay value of the event when an abnormality occurs.

[0122] Event normal cycle: length 4Byte, records the normal occurrence cycle of the Event when an exception occurs.

[0123] Event abnormal cycle: length 4Byte, records the abnormal sending cycle of the Event when an abnormality occurs.

[0124] Event exception count (Counter): Length 8Byte, records the exception counter of the Event when an exception occurs.

[0125] Event abnormal counter difference: length 8Byte, records the difference of the discontinuous counter of the event when an abnormality occurs.

[0126] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0127] Reference Figure 6 , shows a structural block diagram of a message analysis system according to an embodiment of the present invention. The message analysis system may specifically include the following modules.

[0128] The message acquisition module 61 is used to acquire the SOME / IP message to be analyzed;

[0129] A data item query module 62, configured to query a corresponding data item from a preset message record table according to the SOME / IP message;

[0130] A message anomaly analysis module 63, configured to perform an anomaly analysis on the SOME / IP message and the corresponding data item to obtain an analysis result;

[0131] The analysis result storage module 64 is used to store the analysis result.

[0132] In an exemplary embodiment of the present invention, the data item query module 62 includes:

[0133] An event identification information reading module, used to read the event identification information of the message event from the SOME / IP message;

[0134] The corresponding data item query module is used to query the data item corresponding to the event identification information in the message record table.

[0135] In an exemplary embodiment of the present invention, the message anomaly analysis module 63 includes:

[0136] A scheduling information reading module, used to read the scheduling time information of the message event from the SOME / IP message, and read the scheduling period threshold information of the message event from the data item;

[0137] A scheduling cycle calculation module, used to calculate scheduling cycle information according to the message scheduling time information;

[0138] The scheduling information comparison module is used to compare the scheduling period information with the scheduling period threshold information to obtain a scheduling period anomaly analysis result of the message event.

[0139] In an exemplary embodiment of the present invention, the message anomaly analysis module 63 includes:

[0140] A protocol conversion module, used for performing protocol conversion on the SOME / IP message and sending the message after protocol conversion;

[0141] A sending and receiving time recording module, used to record the receiving time information of the SOME / IP message and the sending time information of the message after protocol conversion;

[0142] A forwarding delay generating module, used to generate the forwarding delay information of the message event according to the receiving time information and the sending time information;

[0143] A delay threshold reading module, used to read the forwarding delay threshold information of the message event from the data item;

[0144] The delay information comparison module is used to compare the forwarding delay information with the forwarding delay threshold information to obtain a forwarding delay anomaly analysis result of the message event.

[0145] In an exemplary embodiment of the present invention, the message anomaly analysis module 63 includes:

[0146] A timestamp reading module, used to read the timestamp information of the message event from the adjacent SOME / IP message, and read the period threshold information and period deviation threshold information of the message event from the data item;

[0147] A period information calculation module, used to calculate the period information of the message event according to the timestamp information;

[0148] A period deviation calculation module, used to calculate the period deviation information of the message event according to the period information and the period threshold information;

[0149] The period deviation comparison module is used to compare the period deviation information with the period deviation threshold information to obtain a period deviation anomaly analysis result of the message event.

[0150] In an exemplary embodiment of the present invention, the message anomaly analysis module 63 includes:

[0151] A counting information reading module, used to read the counting information of the message event from the adjacent SOME / IP message, and read the counting threshold information of the message event from the data item;

[0152] The counting information comparison module is used to compare the counting information with the counting threshold information to obtain a counting anomaly analysis result of the message event.

[0153] In an exemplary embodiment of the present invention, the analysis result storage module 64 includes:

[0154] A storage instruction acquisition module, used to acquire the storage instruction of the analysis result;

[0155] The storage result storage module is used to store the analysis result to the storage location corresponding to the storage instruction.

[0156] In an exemplary embodiment of the present invention, the system further comprises:

[0157] An analysis instruction acquisition module, used for acquiring the analysis instruction of the event message before the message acquisition module 61 acquires the SOME / IP message to be analyzed;

[0158] The abnormality analysis starting module is used to start the abnormality analysis operation on the SOME / IP message according to the analysis instruction.

[0159] As for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same and similar parts between the embodiments can refer to each other.

[0160] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0161] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing terminal device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the functions specified in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device, so that a series of operation steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable terminal device provide for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0162] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0163] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0164] The above is a detailed introduction to a message analysis method and a message analysis system provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A method for analyzing a message, It is characterized in that The method comprises: Get the SOME / IP message to be analyzed; According to the SOME / IP message, a corresponding data item is searched from a preset message record table; Performing an abnormality analysis on the SOME / IP message and the corresponding data item to obtain an analysis result; The analysis result is stored.

2. The method according to claim 1, It is characterized in that The querying of corresponding data items from a preset message record table according to the SOME / IP message includes: Reading event identification information of a message event from the SOME / IP message; The data item corresponding to the event identification information is searched in the message record table.

3. The method according to claim 2, It is characterized in that The performing anomaly analysis on the SOME / IP message and the corresponding data item to obtain an analysis result includes: Reading the scheduling time information of the message event from the SOME / IP message, and reading the scheduling period threshold information of the message event from the data item; Calculate scheduling period information according to the message scheduling time information; The scheduling period information and the scheduling period threshold information are compared to obtain a scheduling period anomaly analysis result of the message event.

4. The method according to claim 2, It is characterized in that The performing anomaly analysis on the SOME / IP message and the corresponding data item to obtain an analysis result includes: Performing protocol conversion on the SOME / IP message, and sending the message after protocol conversion; Recording the receiving time information of the SOME / IP message and the sending time information of the message after protocol conversion; Generate forwarding delay information of the message event according to the receiving time information and the sending time information; Reading forwarding delay threshold information of the message event from the data item; The forwarding delay information is compared with the forwarding delay threshold information to obtain a forwarding delay anomaly analysis result of the message event.

5. The method according to claim 2, It is characterized in that The performing anomaly analysis on the SOME / IP message and the corresponding data item to obtain an analysis result includes: Reading the timestamp information of the message event from the adjacent SOME / IP message, and reading the period threshold information and the period deviation threshold information of the message event from the data item; Calculate the period information of the message event according to the timestamp information; Calculate the period deviation information of the message event according to the period information and the period threshold information; The period deviation information is compared with the period deviation threshold information to obtain a period deviation anomaly analysis result of the message event.

6. The method according to claim 2, It is characterized in that The performing abnormal analysis on the SOME / IP message and the corresponding data item to obtain an analysis result includes: Reading the count information of the message event from the adjacent SOME / IP message, and reading the count threshold information of the message event from the data item; The counting information is compared with the counting threshold information to obtain a counting anomaly analysis result of the message event.

7. The method according to claim 1, It is characterized in that The storing of the analysis result comprises: Obtaining storage instructions for the analysis results; The analysis result is stored in a storage location corresponding to the storage instruction.

8. The method according to claim 2, It is characterized in that Before obtaining the SOME / IP message to be analyzed, the method further includes: Obtaining an analysis instruction for the event message; The abnormality analysis operation on the SOME / IP message is started according to the analysis instruction.

9. A message analysis system, It is characterized in that The system comprises: A message acquisition module is used to acquire the SOME / IP message to be analyzed; A data item query module, used to query the corresponding data item from a preset message record table according to the SOME / IP message; A message anomaly analysis module, used for performing an anomaly analysis on the SOME / IP message and the corresponding data item to obtain an analysis result; The analysis result storage module is used to store the analysis result.

10. An electronic device, It is characterized in that include: one or more processors; and One or more machine-readable media having instructions stored thereon, when executed by the one or more processors, enable the electronic device to execute the message analysis method as described in any one of claims 1 to 8.

11. A computer-readable storage medium, It is characterized in that The computer program stored therein enables the processor to execute the message analysis method as described in any one of claims 1 to 8.