A message automatic segmentation filtering method and system
By automatically configuring the message filtering parameters and integrating the message ID for filtering and mask calculation, the problem of not being able to automatically filter multiple received messages in the prior art is solved, and the automatic segmentation filtering of messages is realized and the effect of improving vehicle security is achieved.
Patent Information
- Application Number
- CN202411903104.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-04-08
AI Technical Summary
Existing message filters cannot automatically filter multiple received messages, resulting in ECU misjudgment and reduced vehicle security.
By determining the message filtering parameters based on the current device and configuring the message filtering parameters, integrating all message IDs to obtain the message sequence, filtering out the target message ID segment, and performing mask calculation to realize the reception and filtering of the message.
Automatic segmented filtering of packets is realized, reducing the time of manual operation and the computing pressure of the ECU, and improving the safety and working efficiency of the car.
Smart Images

Figure CN119788363A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of digital communication technology, and in particular to a message automatic segmentation filtering method and system. Background Art
[0002] As the unit of network transmission, messages play an extremely important role in the increasingly intelligent automobile communication system. There are various ECUs in a vehicle, each of which performs its own duties and maintains frequent data exchanges with other ECUs through the CAN bus. The data information of these exchanges is stored in the message, so if you want to know the real situation of a car, you can get it by reading the corresponding message. After getting the message, you can accurately know the real situation of the car body by parsing it. This purpose is often used in automobile R&D debugging and fault analysis. Therefore, the accuracy of the message is self-evident, and it takes a lot of time and manpower to ensure the accuracy of the message.
[0003] There are a lot of messages transmitted between every two ECUs. Each ECU is mounted on the CAN bus. Facing a large amount of frequent data, it is easy to have data reception errors. The most intuitive manifestation is that when two ECUs are transmitting data normally, multiple receptions will occur. This will increase the computing pressure of the ECU, reduce the effective time, and cause information reception errors, which will cause a series of safety issues. In order to avoid this problem, message filtering is extremely important.
[0004] The current filter is designed manually for existing messages. After the OEM updates the signal matrix table, the filter needs to be redesigned. Due to its non-portability, it is difficult to apply it to updated vehicle computers. Summary of the invention
[0005] The present invention provides a method and system for automatic segmentation filtering of messages, which solves the technical problems that the existing message filter cannot automatically filter multiple received messages according to real-time requirements, the filtering means are cumbersome, and ECU misjudgment is caused, thereby reducing the safety of the vehicle.
[0006] In order to solve the above technical problems, the present invention provides a method for automatic segmentation filtering of messages, comprising:
[0007] Determine and configure message filtering parameters based on the current device;
[0008] Integrate all message IDs to obtain a message sequence, and filter out a first target message ID segment from the message sequence based on the message filtering parameter and the adjustable interval;
[0009] Filtering a second target message ID segment from the message sequence according to the message filtering parameter, the first target message ID segment and the adjustable interval;
[0010] According to the message type of the input message, a mask calculation is performed on the message ID in the first target message ID segment and the second target message ID segment, and the mask result is output to perform reception filtering of the message.
[0011] In a further implementation scheme, the message filtering parameters are determined and configured based on the current device, specifically:
[0012] Obtain the maximum number of global masks and the maximum number of independent masks of the current device; obtain all message IDs from the signal matrix; determine the length of the received message, and obtain and configure the message filtering parameters based on the maximum number of global masks and the maximum number of independent masks mentioned above.
[0013] In view of the inherent limitations of different CAN chips and the differences in the maximum number of global masks and independent masks of the corresponding chips, this scheme takes the number of global masks and the number of independent masks as input variables, so that it can adapt to more CAN chips and achieve the portability of the message filtering scheme; at the same time, by predetermining the length of the received message, data dislocation can be effectively prevented.
[0014] In a further implementation scheme, all message IDs are integrated to obtain a message sequence as follows: all message IDs are obtained from the message filtering parameters, all message IDs are sequentially stored in an array according to a rule from small to large, and the array subscript is used as a new name for the corresponding message ID.
[0015] In a further embodiment, filtering out a first target message ID segment from the message sequence based on the message filtering parameter and the adjustable interval includes:
[0016] Traversing the message sequence, screening out continuous message ID segments whose message ID values are not greater than the current adjustable interval, and determining the total number of screened message ID segments;
[0017] Obtaining a maximum number of independent masks from the message filtering parameters as a first threshold;
[0018] Determine whether the total number of screening is greater than a first threshold, if so, adjust the adjustable interval and return to re-screen the message sequence, if not, use the screened message ID segment as the first target message ID segment and record it as a screening set;
[0019] All message ID segments in the screening set are put into a multidimensional array, and the dimension of the array is equal to the number of message ID segments.
[0020] In a further implementation scheme, adjusting the adjustable interval specifically includes: performing incremental adjustment, increasing the interval value by a preset amplitude based on the current value of the adjustable interval, to obtain the adjusted adjustable interval.
[0021] This scheme is based on the maximum number of independent masks. By comparing the total number of filtered message ID segments, it can intuitively determine whether there are multiple received messages, and provide a solution to perform incremental adjustments. On the basis of the current adjustable interval value, the interval value is increased by a preset amplitude, thereby limiting the number of message ID segments of multiple message ID combinations to not exceed the number of independent masks, discarding untrusted messages and preventing security risks. Setting an adjustable interval can improve the applicability of the segmented filtering scheme.
[0022] In a further embodiment, the filtering out the second target message ID segment from the message sequence according to the message filtering parameter, the first target message ID segment and the adjustable interval comprises:
[0023] Obtaining other message IDs other than the first target message ID segment from the message sequence, and recording the remaining total number of the other message IDs;
[0024] Obtaining a maximum number of global masks from the message filtering parameters as a second threshold;
[0025] Determine whether the remaining total is greater than a second threshold value, if so, adjust the adjustable interval and return to re-screen the message sequence; if not, divide each of the other message IDs into a segment separately, and store them in a one-dimensional array to obtain a second target message ID segment for calculating the global mask.
[0026] This solution uses the maximum number of global masks as the second threshold, and compares it with the total number of other message IDs after screening to limit the number of single message IDs to not exceed the maximum number of global masks, and further performs message filtering to improve the efficiency and security of network transmission.
[0027] In a further implementation scheme, according to the message type of the input message, a mask calculation is performed on the message ID in the first target message ID segment, specifically:
[0028] When it is identified that the number of message IDs in the first target message ID segment is 1, the independent mask is calculated as follows;
[0029] When it is determined that the message type of the input message is a standard message,
[0030] Standard frame mask Mask1 = 0xFFFFFFFF & reference mask of standard message 0x7FF;
[0031] When it is determined that the message type of the input message is an extended message,
[0032] Extended frame mask Mask2 = 0xFFFFFFFF & extended message reference mask 0x1FFFFFFF;
[0033] In the formula, & represents the AND operation.
[0034] In a further embodiment, according to the message type of the input message, a mask calculation is performed on the message ID in the second target message ID segment, including:
[0035] When it is identified that the number of message IDs in the second target message ID segment is 2, the global mask is calculated as follows;
[0036] Mask3 = ~(ID[0]^ID[1]);
[0037] When it is determined that the message type of the input message is a standard message,
[0038] Standard frame mask Mask = Mask3 & reference mask of standard message 0x7FF;
[0039] When it is determined that the message type of the input message is an extended message,
[0040] The extended frame mask Mask = Mask3 & the reference mask of the extended message 0x1FFFFFFF.
[0041] In the formula, ~ represents a negation operation, ^ represents an exclusive-OR operation, ID[0] represents the first message ID, ID[1] represents the second message, and & represents an AND operation.
[0042] In a further embodiment, according to the message type of the input message, a mask calculation is performed on the message ID in the second target message ID segment, including:
[0043] When it is identified that the number of message IDs in the second target message ID segment is greater than 2, the global mask calculation is specifically as follows: all message IDs in the second target message ID segment are converted into binary values, and the corresponding bits are XORed by comparing each pair of adjacent message IDs in turn, and the result of the XOR is inverted, and then the inverted result is ANDed with the reference mask to obtain the final mask.
[0044] The present invention also provides a message automatic segmentation filtering system, which is applied to implement the above-mentioned message automatic segmentation filtering method, comprising:
[0045] Parameter setting module: used to set the maximum number of global masks and the maximum number of independent masks, so as to limit the number of single message IDs to not exceed the maximum number of global masks, and the number of message ID segments of multiple message ID combinations to not exceed the maximum number of independent masks; also used to set the length of message ID;
[0046] Message ID input module: used to input the message ID for which the mask is to be calculated;
[0047] A message ID segmentation module connected to the parameter setting module and the message ID input module: used to segment all input message IDs, integrate all message IDs to obtain a message sequence, and filter out a first target message ID segment from the message sequence based on the maximum number of independent masks and the adjustable interval; and filter out a second target message ID segment from the message sequence based on the maximum number of global masks, the first target message ID segment and the adjustable interval;
[0048] Message type determination module: used to determine the input message type, the message type includes standard message and extended message;
[0049] A mask calculation module connected to the message ID segmentation module and the message type determination module: according to the message type of the input message, a mask calculation is performed on the message ID in the segmented first target message ID segment and the second target message ID segment to generate corresponding independent masks and global masks.
[0050] Based on the message filtering parameters and adjustable intervals, the present invention sequentially selects the first target message ID segment and the second target message ID segment from all message IDs (in the message sequence); then, according to the message type of the input message, the message ID in the first target message ID segment and the second target message ID segment is masked, and the mask result is output to receive and filter the message. The present invention packages the entire segmented filtering process to realize automated design, and serves as a joint connected to the CAN bus at one end and the ECU at the other end. The process of manually segmenting the message ID is omitted, and the process of manually calculating the mask is reduced, thereby greatly reducing the time required for cumbersome and repetitive operations, reducing the computing pressure of the ECU, and reducing the problem of ECU misjudgment. At the same time, the message filtering of all CAN nodes on the vehicle can be connected using this joint, which further improves work efficiency, reduces human errors, and effectively improves the safety of the vehicle. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 This is a workflow diagram of a method for automatic segmentation filtering of messages provided by an embodiment of the present invention;
[0052] Figure 2It is a system framework diagram of a message automatic segmentation filtering system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0053] The following specifically illustrates the implementation mode of the present invention in conjunction with the accompanying drawings. The embodiments are provided for illustrative purposes only and cannot be understood as limiting the present invention. The accompanying drawings are provided for reference and illustration only and do not constitute a limitation on the scope of patent protection of the present invention, because many changes can be made to the present invention without departing from the spirit and scope of the present invention.
[0054] Example 1
[0055] An embodiment of the present invention provides a method for automatic segmentation filtering of messages, such as Figure 1 As shown, in this embodiment,
[0056] In order to solve the above technical problems, the present invention provides a method for automatic segmentation filtering of messages, comprising:
[0057] S1. Determine and configure the message filtering parameters based on the current device, specifically:
[0058] Obtain the maximum number of global masks and the maximum number of independent masks of the current device; obtain all message IDs from the signal matrix; determine the length of the received message, and obtain and configure the message filtering parameters based on the maximum number of global masks and the maximum number of independent masks mentioned above.
[0059] Among them, the global mask only allows a specific message to pass, and the independent mask can set a filter range, allowing messages within the range to pass. The message ID is input based on the signal matrix fed back by the OEM, and is expressed in the form of a table.
[0060] In view of the inherent limitations of different CAN chips and the differences in the maximum number of global masks and independent masks of the corresponding chips, this scheme takes the number of global masks and the number of independent masks as input variables, so that it can adapt to more CAN chips and achieve the portability of the message filtering scheme; at the same time, by predetermining the length of the received message, data dislocation can be effectively prevented.
[0061] S2. Integrate all message IDs to obtain a message sequence, and filter out a first target message ID segment from the message sequence based on the message filtering parameter and the adjustable interval;
[0062] In this embodiment, all message IDs are integrated to obtain a message sequence as follows: all message IDs are obtained from the message filtering parameters, all message IDs are sequentially stored in an array according to a rule from small to large, and the array subscript is used as a new name for the corresponding message ID.
[0063] In this embodiment, filtering out the first target message ID segment from the message sequence based on the message filtering parameter and the adjustable interval includes:
[0064] Using a for loop function to traverse the message sequence, filter out continuous message ID segments whose message ID values are not greater than the current adjustable interval, and determine the total number of filtered message ID segments;
[0065] Obtaining a maximum number of independent masks from the message filtering parameters as a first threshold;
[0066] Determine whether the total number of screening is greater than a first threshold, if so, adjust the adjustable interval and return to re-screen the message sequence, if not, use the screened message ID segment as the first target message ID segment and record it as a screening set;
[0067] All message ID segments in the screening set are put into a multidimensional array, and the dimension of the array is equal to the number of message ID segments.
[0068] The message ID segment refers to a message ID range, such as (0x35, 0x39).
[0069] In this embodiment, adjusting the adjustable interval specifically includes: performing incremental adjustment, increasing the interval value according to a preset amplitude based on the current value of the adjustable interval, and obtaining the adjusted adjustable interval. The preset amplitude can be set according to actual needs, such as 1 or 2.
[0070] This embodiment is based on the maximum number of independent masks and compares the total number of filtered message ID segments to intuitively determine whether there are multiple received messages. It provides a solution to perform incremental adjustments, increasing the interval value by a preset amplitude based on the current adjustable interval value, thereby limiting the number of message ID segments of multiple message ID combinations to not exceed the number of independent masks, discarding untrusted messages, and preventing security risks. Setting an adjustable interval can improve the applicability of the segmented filtering solution.
[0071] S3, filtering out a second target message ID segment from the message sequence according to the message filtering parameter, the first target message ID segment and the adjustable interval, comprising:
[0072] Obtaining other message IDs other than the first target message ID segment from the message sequence, and recording the remaining total number of the other message IDs;
[0073] Obtaining a maximum number of global masks from the message filtering parameters as a second threshold;
[0074] Determine whether the remaining total is greater than a second threshold value, if so, adjust the adjustable interval and return to re-screen the message sequence; if not, divide each of the other message IDs into a segment separately, and store them in a one-dimensional array to obtain a second target message ID segment, which is used to calculate the global mask. The length of the array is equal to the number of the remaining message IDs.
[0075] The message ID refers to a single message ID, such as 0x011.
[0076] For example, all message IDs are 0x11, 0x33, 0x45, 0x35, 0x39. According to the above rules, 0x33, 0x35, 0x39 are divided into one message ID segment, and 0x11 and 0x45 are each divided into a separate segment.
[0077] This embodiment uses the maximum number of global masks as the second threshold value, and compares it with the remaining total number of other message IDs after screening to limit the number of single message IDs to not exceed the maximum number of global masks, and further performs message filtering to improve the efficiency and security of network transmission.
[0078] The specific steps of message segmentation are as follows:
[0079] ① Store all message IDs in an array from small to large, and use the array subscript as their new name.
[0080] ② Use the for loop function to filter out the message ID segments that are continuous and whose message ID value interval is not greater than the interval value of the current adjustable interval (for example, 5, or other values, such as 3).
[0081] ③ Determine whether the number of the above-screened message ID segments exceeds the maximum number of independent masks. If so, proceed to step ④; otherwise, record the screened message ID segments as the message ID segment set to obtain the first target message ID segment, and record the number of message ID segments before proceeding to step ⑤.
[0082] ④ Increase the interval value of the adjustable interval by 2 and return to step ②.
[0083] ⑤ Put all the message ID segments in the message ID segment set into a multidimensional array, and the dimension of the array is equal to the number of message ID segments.
[0084] ⑥ Record the number of remaining message IDs outside the message ID segment set, and determine whether the number of other message IDs exceeds the maximum number of the global mask. If so, return to step ④, otherwise divide each of the remaining message IDs into a segment and store them in a one-dimensional array to obtain the second target message ID segment.
[0085] S4. Perform mask calculation on the message IDs in the first target message ID segment and the second target message ID segment according to the message type of the input message;
[0086] Specific:
[0087] There are two types of messages: one is a standard message and the other is an extended message. The reference mask of the standard message is 0x7FF and the length is 11 bits. The reference mask of the extended message is 0x1FFFFFFF and the length is 29 bits. The reference mask is fixed inside the chip.
[0088] In this embodiment, according to the message type of the input message, a mask calculation is performed on the message ID in the first target message ID segment, specifically:
[0089] When it is identified that the number of message IDs in the first target message ID segment is 1, the independent mask is calculated as follows;
[0090] When it is determined that the message type of the input message is a standard message,
[0091] Standard frame mask Mask1 = 0xFFFFFFFF & reference mask of standard message 0x7FF;
[0092] When it is determined that the message type of the input message is an extended message,
[0093] Extended frame mask Mask2 = 0xFFFFFFFF & reference mask of extended message 0x1FFFFFFF.
[0094] In the formula, & represents the AND operation.
[0095] In this embodiment, according to the message type of the input message, a mask calculation is performed on the message ID in the second target message ID segment, including:
[0096] (1) When it is identified that the number of message IDs in the second target message ID segment is 2, the global mask is calculated as follows;
[0097] Mask3 = ~(ID[0]^ID[1]);
[0098] When it is determined that the message type of the input message is a standard message,
[0099] Standard frame mask Mask = Mask3 & reference mask of standard message 0x7FF;
[0100] When it is determined that the message type of the input message is an extended message,
[0101] The extended frame mask Mask = Mask3 & the reference mask of the extended message 0x1FFFFFFF.
[0102] In the formula, ~ represents a negation operation, ^ represents an exclusive-OR operation, ID[0] represents the first message ID, ID[1] represents the second message, and & represents an AND operation.
[0103] (2) When it is identified that the number of message IDs in the second target message ID segment is greater than 2, the global mask calculation is specifically as follows: all message IDs in the second target message ID segment are converted into binary values, and the corresponding bits are XORed by comparing the two adjacent message IDs in turn, and the XOR result is inverted, and the inverted result is ANDed with the reference mask to obtain the final mask.
[0104] For example:
[0105] 0x111 corresponds to 000100010001 in binary;
[0106] 0x115 corresponds to 000100010101 in binary;
[0107] 0x113 corresponds to 000100010011 in binary;
[0108] Then, first, the lowest bits of the three messages (i.e., 1, 1) are XORed in sequence to obtain an operation result (1), and the second to last bits (0, 0, 1) of the three messages are XORed in sequence to obtain an operation result (0), and so on, in this order until the highest bit is completed. The calculation of each bit is then concatenated in order from the lowest bit to the highest bit, and the concatenated value is bitwise inverted, and the inverted result is then ANDed with the reference mask to obtain the final mask.
[0109] S5. Output the mask result corresponding to each message ID segment and perform message reception filtering.
[0110] The calculated mask result is used as the final output of the whole process and is used for message reception of the CAN node to achieve receiving only the required messages.
[0111] Example 2
[0112] The reference numerals in the accompanying drawings of the embodiments of the present invention include: parameter setting module 1, message ID input module 2, message ID segmentation module 3, message type determination module 4, mask calculation module 5;
[0113] The embodiment of the present invention also provides a message automatic segmentation filtering system, which is used to implement the message automatic segmentation filtering method described in the above embodiment 1, see Figure 2 ,include:
[0114] Parameter setting module 1: used to set the maximum number of global masks and the maximum number of independent masks, so as to limit the number of single message IDs to not exceed the maximum number of global masks, and the number of message ID segments of multiple message ID combinations to not exceed the maximum number of independent masks; it is also used to set the length of the message ID;
[0115] Message ID input module 2: used to input the message ID of the mask to be calculated;
[0116] The message ID segmentation module 3 connected to the parameter setting module 1 and the message ID input module 2 is used to segment all the input message IDs, integrate all the message IDs to obtain a message sequence, and filter out a first target message ID segment from the message sequence based on the maximum number of independent masks and the adjustable interval; filter out a second target message ID segment from the message sequence based on the maximum number of global masks, the first target message ID segment and the adjustable interval;
[0117] Message type determination module 4: used to determine the input message type, the message type includes a standard message and an extended message;
[0118] The mask calculation module 5 connected to the message ID segmentation module 3 and the message type determination module 4 performs mask calculation on the message ID in the segmented first target message ID segment and the second target message ID segment according to the message type of the input message, and generates corresponding independent masks and global masks.
[0119] The embodiment of the present invention sequentially selects the first target message ID segment and the second target message ID segment from all message IDs (in the message sequence) based on the message filtering parameters and the adjustable interval; then, according to the message type of the input message, the message ID in the first target message ID segment and the second target message ID segment is masked and the mask result is output to perform message reception filtering. The present invention packages the entire segmented filtering process to realize automated design, and serves as a joint connected to the CAN bus at one end and the ECU at the other end. The process of manually segmenting the message ID is omitted, and the process of manually calculating the mask is reduced, thereby greatly reducing the time required for cumbersome and repetitive operations, reducing the computing pressure of the ECU, and reducing the problem of ECU misjudgment. At the same time, the message filtering for all CAN nodes on the vehicle can be connected using this joint, which further improves work efficiency, reduces human errors, and effectively improves the safety of the vehicle.
[0120] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.
Claims
1. A method for automatic segmentation filtering of messages, characterized in that: include: Determine and configure message filtering parameters based on the current device; Integrate all message IDs to obtain a message sequence, and filter out a first target message ID segment from the message sequence based on the message filtering parameter and the adjustable interval; Filtering a second target message ID segment from the message sequence according to the message filtering parameter, the first target message ID segment and the adjustable interval; According to the message type of the input message, a mask calculation is performed on the message ID in the first target message ID segment and the second target message ID segment, and the mask result is output to perform reception filtering of the message.
2. A method for automatic segmentation filtering of messages as claimed in claim 1, characterized in that: Determine and configure the packet filtering parameters based on the current device, specifically: Obtain the maximum number of global masks and the maximum number of independent masks of the current device; obtain all message IDs from the signal matrix; determine the length of the received message, and obtain and configure the message filtering parameters based on the maximum number of global masks and the maximum number of independent masks mentioned above.
3. A method for automatic segmentation filtering of messages as claimed in claim 2, characterized in that: Integrating all message IDs to obtain a message sequence specifically includes: obtaining all message IDs from the message filtering parameters, storing all message IDs in an array in sequence according to a rule from small to large, and using the array subscript as a new name for the corresponding message ID.
4. A method for automatic segmentation filtering of messages as claimed in claim 1, characterized in that: Filtering a first target message ID segment from the message sequence based on the message filtering parameter and the adjustable interval includes: Traversing the message sequence, screening out continuous message ID segments whose message ID values are not greater than the current adjustable interval, and determining the total number of screened message ID segments; Obtaining a maximum number of independent masks from the message filtering parameters as a first threshold; Determine whether the total number of screening is greater than a first threshold, if so, adjust the adjustable interval and return to re-screen the message sequence, if not, use the screened message ID segment as the first target message ID segment and record it as a screening set; All message ID segments in the screening set are put into a multidimensional array, and the dimension of the array is equal to the number of message ID segments.
5. A method for automatic segmentation filtering of messages as claimed in claim 4, characterized in that: Adjusting the adjustable interval specifically includes: performing incremental adjustment, increasing the interval value according to a preset amplitude based on the current value of the adjustable interval, and obtaining the adjusted adjustable interval.
6. A method for automatic segmentation filtering of messages as claimed in claim 4, characterized in that: The step of selecting a second target message ID segment from the message sequence according to the message filtering parameter, the first target message ID segment and the adjustable interval includes: Obtaining other message IDs other than the first target message ID segment from the message sequence, and recording the remaining total number of the other message IDs; Obtaining a maximum number of global masks from the message filtering parameters as a second threshold; Determine whether the remaining total is greater than a second threshold value, if so, adjust the adjustable interval and return to re-screen the message sequence; if not, divide each of the other message IDs into a segment separately, and store them in a one-dimensional array to obtain a second target message ID segment for calculating the global mask.
7. A method for automatic segmentation filtering of messages as claimed in claim 1, characterized in that: According to the message type of the input message, a mask calculation is performed on the message ID in the first target message ID segment, specifically: When it is identified that the number of message IDs in the first target message ID segment is 1, the independent mask is calculated as follows; When it is determined that the message type of the input message is a standard message, Standard frame mask Mask1 = 0xFFFFFFFF & reference mask of standard message 0x7FF; When it is determined that the message type of the input message is an extended message, Extended frame mask Mask2 = 0xFFFFFFFF & extended message reference mask 0x1FFFFFFF; In the formula, & represents the AND operation.
8. A method for automatic segmentation filtering of messages as claimed in claim 1, characterized in that: According to the message type of the input message, a mask calculation is performed on the message ID in the second target message ID segment, including: When it is identified that the number of message IDs in the second target message ID segment is 2, the global mask is calculated as follows; Mask3 = ~(ID[0]^ID[1]); When it is determined that the message type of the input message is a standard message, Standard frame mask Mask = Mask3 & reference mask of standard message 0x7FF; When it is determined that the message type of the input message is an extended message, Extended frame mask Mask = Mask3 & extended message reference mask 0x1FFFFFFF; In the formula, ~ represents a negation operation, ^ represents an exclusive-OR operation, ID[0] represents the first message ID, ID[1] represents the second message, and & represents an AND operation.
9. A method for automatic segmentation filtering of messages as claimed in claim 1, characterized in that: According to the message type of the input message, a mask calculation is performed on the message ID in the second target message ID segment, including: When it is identified that the number of message IDs in the second target message ID segment is greater than 2, the global mask calculation is specifically as follows: all message IDs in the second target message ID segment are converted into binary values, and the corresponding bits are XORed by comparing each pair of adjacent message IDs in turn, and the result of the XOR is inverted, and then the inverted result is ANDed with the reference mask to obtain the final mask.
10. A message automatic segmentation filtering system, used to implement a message automatic segmentation filtering method as claimed in any one of claims 1 to 9, characterized in that: include: Parameter setting module: used to set the maximum number of global masks and the maximum number of independent masks, so as to limit the number of single message IDs to not exceed the maximum number of global masks, and the number of message ID segments of multiple message ID combinations to not exceed the maximum number of independent masks; also used to set the length of message ID; Message ID input module: used to input the message ID for which the mask is to be calculated; A message ID segmentation module connected to the parameter setting module and the message ID input module: used to segment all input message IDs, integrate all message IDs to obtain a message sequence, and filter out a first target message ID segment from the message sequence based on the maximum number of independent masks and the adjustable interval; and filter out a second target message ID segment from the message sequence based on the maximum number of global masks, the first target message ID segment and the adjustable interval; Message type determination module: used to determine the input message type, the message type includes standard message and extended message; A mask calculation module connected to the message ID segmentation module and the message type determination module: according to the message type of the input message, a mask calculation is performed on the message ID in the segmented first target message ID segment and the second target message ID segment to generate corresponding independent masks and global masks.