Diagnosis request message filtering method and system based on byte recognition

By identifying the addressing method and bytes of the diagnostic request message, obtaining diagnostic services and filtering the diagnostic request message, the problem of low security in the existing technology of automotive CAN communication is solved, and the attack on external diagnostic instruments is improved Protection capability.

CN119449462APending Publication Date: 2025-02-14SAIC GM WULING AUTOMOBILE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411762389.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-03
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

The prior art fails to effectively reduce the security threat from external diagnostic instruments in automotive CAN communication, resulting in low security of automotive CAN communication and vulnerability to external attacks.

Method used

By identifying the addressing method of the diagnostic request message and identifying the bytes of the diagnostic request message based on different addressing methods, the diagnostic service in the diagnostic request message is obtained, and the filtering of the diagnostic request message is realized.

Benefits of technology

When using the gateway for physical isolation in existing automotive CAN communications, accurately locate the diagnostic services in the diagnostic messages sent by the external diagnostics to realize interception and filtering of the diagnostic messages and prevent the external diagnostics from replaying the old ones The diagnostic message attacks the automotive CAN communication, ensuring that the diagnostic services that meet the automotive CAN communication requirements can be successfully executed and improving the security of automotive CAN communication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119449462A_ABST
    Figure CN119449462A_ABST
Patent Text Reader

Abstract

The invention discloses a diagnosis request message filtering method and system based on byte recognition, and particularly relates to the technical field of message filtering. According to the method and the device, the addressing mode of the diagnosis request message is identified, and the bytes of the diagnosis request message are identified based on different addressing modes, so that the diagnosis service in the diagnosis request message is acquired, and the diagnosis request message is filtered by the diagnosis service. Through the identification of the addressing mode and bytes in the diagnosis request message, the diagnosis service in the diagnosis message sent by the external diagnosis instrument can be accurately positioned under the condition that the existing automobile CAN communication uses the gateway to carry out physical isolation, so that the diagnosis message is intercepted and filtered, and the diagnosis efficiency is improved. According to the invention, an external diagnostic instrument is prevented from attacking automobile CAN communication by replaying an old diagnostic message, it is ensured that diagnostic services meeting automobile CAN communication requirements can be successfully executed, and the safety of automobile CAN communication is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of message filtering, and in particular relates to a method and system for filtering diagnosis request messages based on byte recognition. Background Art

[0002] The automotive CAN (Controller Area Network) bus is a communication protocol widely used in the automotive industry. In automotive CAN communication, various electronic devices in the vehicle are connected mainly through diagnostic request messages. With the increasing level of automotive intelligence, the number of electronic control modules on the automotive CAN bus and the functions they implement have also increased significantly. The security of the vehicle CAN network communication will also directly affect the safety of the vehicle. Among them, external diagnostic instruments without identity authentication (illegal diagnostic instruments) are one of the major sources of security threats.

[0003] At present, in the process of automobile CAN communication, the main method is to use a gateway to physically isolate the external diagnostic instrument from the vehicle network. However, this method does not really effectively reduce the security threat from the external diagnostic instrument. For example, isolation is only performed through the gateway, and there is a lack of data verification, which leads to low security of automobile CAN communication and is vulnerable to external attacks. Therefore, there is an urgent need for a diagnostic request message filtering method and system based on byte recognition to solve the defects of the existing technology. Summary of the invention

[0004] The present invention aims to provide a diagnostic request message filtering method and system based on byte recognition to solve the above technical problems, realize the identification of diagnostic services based on the addressing mode and byte recognition of the diagnostic request message, and improve the security of automobile CAN communication.

[0005] In order to solve the above technical problems, an embodiment of the present invention provides a diagnostic request message filtering method based on byte recognition, comprising:

[0006] Obtaining a diagnosis request message, and identifying an addressing mode corresponding to the diagnosis request message;

[0007] According to the byte detection strategy corresponding to the addressing mode, the bytes of the diagnosis request message are identified to obtain the diagnosis service of the diagnosis request message;

[0008] The diagnostic request message is filtered according to the diagnostic service of the diagnostic request message.

[0009] It can be understood that, compared with the prior art, the present invention obtains the diagnostic service in the diagnostic request message by identifying the addressing mode of the diagnostic request message and identifying the bytes of the diagnostic request message based on different addressing modes, and implements the filtering of the diagnostic request message with the diagnostic service. By identifying the addressing mode and bytes in the diagnostic request message, it is possible to accurately locate the diagnostic service in the diagnostic message sent by the external diagnostic instrument when the existing automobile CAN communication uses a gateway for physical isolation, implement the interception and filtering of the diagnostic message, prevent the external diagnostic instrument from attacking the automobile CAN communication by replaying the old diagnostic message, ensure that the diagnostic service that meets the requirements of the automobile CAN communication can be successfully executed, and improve the security of the automobile CAN communication.

[0010] As a preferred solution, the bytes of the diagnosis request message are identified according to the byte detection strategy corresponding to the addressing mode, and the diagnosis service of the diagnosis request message is obtained, which specifically includes:

[0011] The addressing modes include: conventional addressing, extended addressing and mixed addressing;

[0012] When the addressing mode is conventional addressing, identifying bytes in the diagnostic request message that are within a preset first length interval to obtain a first identification result;

[0013] When the addressing mode is extended addressing or mixed addressing, identifying bytes in the diagnostic request message that are in a preset second length interval to obtain a first identification result;

[0014] When the first identification result is within a preset first range, the diagnostic service in the diagnostic request message is identified based on the addressing mode.

[0015] This preferred solution identifies bytes of different length ranges through different addressing methods, can quickly and accurately locate the diagnostic service in the diagnostic message sent by the external diagnostic instrument, and improves the security of automobile CAN communication.

[0016] As a preferred solution, when the first identification result is within the preset first range, identifying the diagnostic service in the diagnostic request message based on the addressing mode specifically includes:

[0017] The first range includes: a first character and a second character;

[0018] When the first recognition result is the first character, identifying the bytes of the diagnosis request message based on the addressing mode, and obtaining the diagnosis service in the diagnosis request message;

[0019] When the first recognition result is the second character, the bytes of the diagnosis request message are recognized based on the addressing mode to obtain the diagnosis service in the diagnosis request message.

[0020] As a preferred solution, when the first recognition result is the first character, identifying the bytes of the diagnosis request message based on the addressing mode to obtain the diagnosis service in the diagnosis request message specifically includes:

[0021] When the first recognition result is the first character and the addressing mode is conventional addressing, identifying bytes in a preset third length interval in the diagnosis request message, and obtaining a diagnosis service in the diagnosis request message;

[0022] When the first recognition result is the first character, and the addressing mode is extended addressing or mixed addressing, the bytes in the preset fourth length interval in the diagnosis request message are identified to obtain the diagnosis service in the diagnosis request message.

[0023] As a preferred solution, when the first recognition result is the second character, identifying the bytes of the diagnosis request message based on the addressing mode to obtain the diagnosis service in the diagnosis request message specifically includes:

[0024] When the first recognition result is the second character and the addressing mode is conventional addressing, identifying bytes in a preset fifth length interval in the diagnosis request message, and obtaining a diagnosis service in the diagnosis request message;

[0025] When the first recognition result is the second character, and the addressing mode is extended addressing or mixed addressing, the bytes in the preset sixth length interval in the diagnosis request message are identified to obtain the diagnosis service in the diagnosis request message.

[0026] This preferred solution accurately locates the diagnostic service in the diagnostic message sent by the external diagnostic instrument through the addressing mode and byte recognition in the diagnostic request message, thereby improving the security of the automobile CAN communication.

[0027] As a preferred solution, the diagnostic service according to the diagnostic request message filters the diagnostic request message, specifically including:

[0028] Determining the diagnostic service of the diagnostic request message according to a preset filtering strategy;

[0029] It is determined whether to intercept the diagnosis request message according to the determination result to complete the filtering of the diagnosis request message.

[0030] This preferred solution determines the diagnostic service of the diagnostic request message through a filtering strategy, thereby filtering the diagnostic request message, ensuring that the diagnostic service that meets the automobile CAN communication requirements can be successfully executed, and improving the security of automobile CAN communication.

[0031] Accordingly, an embodiment of the present invention provides a diagnostic request message filtering system based on byte recognition, comprising: an addressing mode recognition module, a diagnostic service recognition module and a message filtering module;

[0032] Wherein, the addressing mode identification module is used to obtain a diagnostic request message and identify the addressing mode corresponding to the diagnostic request message;

[0033] The diagnostic service identification module is used to identify the bytes of the diagnostic request message according to the byte detection strategy corresponding to the addressing mode, and obtain the diagnostic service of the diagnostic request message;

[0034] The message filtering module is used to filter the diagnosis request message according to the diagnosis service of the diagnosis request message.

[0035] As a preferred solution, the diagnostic service identification module includes: a diagnostic service identification unit;

[0036] In the diagnostic service identification unit, the addressing mode includes: conventional addressing, extended addressing and mixed addressing;

[0037] The diagnostic service identification unit is used for identifying bytes in the diagnostic request message that are in a preset first length interval when the addressing mode is conventional addressing, and obtaining a first identification result;

[0038] When the addressing mode is extended addressing or mixed addressing, identifying bytes in the diagnostic request message that are in a preset second length interval to obtain a first identification result;

[0039] When the first identification result is within a preset first range, the diagnostic service in the diagnostic request message is identified based on the addressing mode.

[0040] As a preferred solution, the diagnostic service identification unit includes: a diagnostic service identification subunit;

[0041] In the diagnostic service identification subunit, the first range includes: a first character and a second character;

[0042] The diagnostic service identification subunit is used for identifying the bytes of the diagnostic request message based on the addressing mode to obtain the diagnostic service in the diagnostic request message when the first identification result is the first character;

[0043] When the first recognition result is the second character, the bytes of the diagnosis request message are recognized based on the addressing mode to obtain the diagnosis service in the diagnosis request message.

[0044] As a preferred solution, the message filtering module includes: a message filtering unit;

[0045] The message filtering unit is used to judge the diagnostic service of the diagnostic request message according to a preset filtering strategy;

[0046] It is determined whether to intercept the diagnosis request message according to the determination result to complete the filtering of the diagnosis request message.

[0047] It can be understood that, compared with the prior art, this system obtains the diagnostic service in the diagnostic request message by identifying the addressing mode of the diagnostic request message and identifying the bytes of the diagnostic request message based on different addressing modes, and implements the filtering of the diagnostic request message with the diagnostic service. By identifying the addressing mode and bytes in the diagnostic request message, it is possible to accurately locate the diagnostic service in the diagnostic message sent by the external diagnostic instrument when the existing automobile CAN communication uses a gateway for physical isolation, implement the interception and filtering of the diagnostic message, prevent the external diagnostic instrument from attacking the automobile CAN communication by replaying the old diagnostic message, ensure that the diagnostic service that meets the requirements of the automobile CAN communication can be successfully executed, and improve the security of the automobile CAN communication. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 : A flowchart of a method for filtering diagnostic request messages based on byte recognition provided by an embodiment of the present invention;

[0049] Figure 2 : A structural diagram of a diagnostic request message filtering system based on byte recognition provided by an embodiment of the present invention;

[0050] Among them, 201: addressing mode identification module 201; 202: diagnostic service identification module 202; 203: message filtering module 203. DETAILED DESCRIPTION

[0051] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0052] As the level of automobile intelligence continues to improve, the number of electronic control modules installed on the automobile CAN bus and their functions have increased significantly, making the security of the vehicle's CAN network communication a key factor that directly affects the overall safety of the vehicle. Among them, unauthorized external diagnostic equipment (i.e., illegal diagnostic instruments) poses a major security risk. Currently, although gateways are used to physically isolate external diagnostic instruments from the vehicle's internal network, this simple measure has not really effectively reduced the security risks from illegal diagnostic instruments.

[0053] Malicious instructions that may be sent by external diagnostic devices mainly come from specific diagnostic services in their diagnostic requests. These services correspond to specific functional operations, such as sensitive operations such as writing key configuration and calibration parameters of the vehicle. Therefore, identifying and verifying the diagnostic services contained in the instructions sent by the diagnostic device has become a key technical challenge for the gateway to ensure the security of the entire vehicle system. Therefore, there is an urgent need for a diagnostic request message filtering method and system based on byte recognition to improve the security of automotive CAN communication.

[0054] It should be noted that, in automobile CAN communication, the gateway is used to filter the diagnostic request message, and is also used to receive and forward the diagnostic request message. Therefore, the diagnostic request message filtering method and system based on byte recognition described in the embodiment of the present invention are implemented based on the gateway. Similarly, for the diagnostic request message sent to the gateway itself, the gateway can also filter the diagnostic request message through the diagnostic request message filtering method based on byte recognition, and determine whether to transmit the diagnostic request message to the diagnostic processing module inside the gateway itself.

[0055] Embodiment 1

[0056] Please refer to Figure 1 , is a step flow chart of a diagnostic request message filtering method based on byte recognition provided by an embodiment of the present invention, including steps S101 to S103.

[0057] Step S101: Obtain a diagnosis request message, and identify an addressing mode corresponding to the diagnosis request message.

[0058] In an optional embodiment, the obtaining of the diagnosis request message and identifying the addressing mode corresponding to the diagnosis request message specifically includes:

[0059] Obtaining a diagnosis request message, and extracting a message identifier in the diagnosis request message;

[0060] The message identifier is matched with the preset database to obtain the addressing mode corresponding to the diagnosis request message.

[0061] It should be noted that in this embodiment, the diagnostic request message with a message identifier of 0x701 is set as conventional addressing, and the diagnostic request message with a message identifier of 0x702 is set as extended search. Since the identification of the addressing method of the diagnostic request message is different in different vehicle communication environments, this embodiment will not be described in detail here. The relationship between the message identifier and the addressing method of the specific diagnostic request message can be formulated by technicians according to actual needs.

[0062] Step S102: according to the byte detection strategy corresponding to the addressing mode, the bytes of the diagnosis request message are identified to obtain the diagnosis service of the diagnosis request message.

[0063] In this embodiment, the bytes of the diagnosis request message are identified according to the byte detection strategy corresponding to the addressing mode, and the diagnosis service of the diagnosis request message is obtained, which specifically includes:

[0064] The addressing modes include: conventional addressing, extended addressing and mixed addressing;

[0065] When the addressing mode is conventional addressing, identifying bytes in the diagnostic request message that are within a preset first length interval to obtain a first identification result;

[0066] When the addressing mode is extended addressing or mixed addressing, identifying bytes in the diagnostic request message that are in a preset second length interval to obtain a first identification result;

[0067] When the first identification result is within a preset first range, the diagnostic service in the diagnostic request message is identified based on the addressing mode.

[0068] It should be noted that normal addressing, extended addressing and mixed addressing are commonly used addressing methods in automotive CAN communication.

[0069] This embodiment identifies bytes of different length ranges through different addressing modes, and can quickly and accurately locate the diagnostic service in the diagnostic message sent by the external diagnostic instrument, thereby improving the security of automobile CAN communication.

[0070] In this embodiment, when the first identification result is within the preset first range, identifying the diagnostic service in the diagnostic request message based on the addressing mode specifically includes:

[0071] The first range includes: a first character and a second character;

[0072] When the first recognition result is the first character, identifying the bytes of the diagnosis request message based on the addressing mode, and obtaining the diagnosis service in the diagnosis request message;

[0073] When the first recognition result is the second character, the bytes of the diagnosis request message are recognized based on the addressing mode to obtain the diagnosis service in the diagnosis request message.

[0074] In this embodiment, when the first recognition result is the first character, identifying the bytes of the diagnosis request message based on the addressing mode to obtain the diagnosis service in the diagnosis request message specifically includes:

[0075] When the first recognition result is the first character and the addressing mode is conventional addressing, identifying bytes in a preset third length interval in the diagnosis request message, and obtaining a diagnosis service in the diagnosis request message;

[0076] When the first recognition result is the first character, and the addressing mode is extended addressing or mixed addressing, the bytes in the preset fourth length interval in the diagnosis request message are identified to obtain the diagnosis service in the diagnosis request message.

[0077] In this embodiment, when the first recognition result is the second character, identifying the bytes of the diagnosis request message based on the addressing mode to obtain the diagnosis service in the diagnosis request message specifically includes:

[0078] When the first recognition result is the second character and the addressing mode is conventional addressing, identifying bytes in a preset fifth length interval in the diagnosis request message, and obtaining a diagnosis service in the diagnosis request message;

[0079] When the first recognition result is the second character, and the addressing mode is extended addressing or mixed addressing, the bytes in the preset sixth length interval in the diagnosis request message are identified to obtain the diagnosis service in the diagnosis request message.

[0080] This embodiment accurately locates the diagnostic service in the diagnostic message sent by the external diagnostic instrument through the addressing mode and byte recognition in the diagnostic request message, thereby improving the security of the automobile CAN communication.

[0081] In an optional embodiment, when the addressing mode is conventional addressing, the high four bits of the first byte in the diagnosis request message are identified (i.e., the preset first length interval), and a first identification result is obtained. If the first identification result is 0x2 or 0x3, the gateway directly forwards the message to the vehicle. If the first identification result is 0x0 or 0x1 (i.e., the preset first range is 0x0 and 0x1, the first character is 0x0, and the second character is 0x1), further judgment is required.

[0082] When the first identification result is 0x0 and the addressing mode is conventional addressing, the second byte (ie, the preset third length interval) in the diagnosis request message is identified to obtain the diagnosis service in the diagnosis request message.

[0083] When the first identification result is 0x1 and the addressing mode is conventional addressing, the third byte (ie, the preset fifth length interval) in the diagnosis request message is identified to obtain the diagnosis service in the diagnosis request message.

[0084] In an optional embodiment, when the addressing mode is extended addressing or mixed addressing, the high four bits of the second byte in the diagnostic request message (i.e., the preset second length interval) are identified to obtain a first identification result. If the first identification result is 0x2 or 0x3, the gateway directly forwards the message to the vehicle. If the first identification result is 0x0 or 0x1 (i.e., the preset first range is 0x0 and 0x1, the first character is 0x0, and the second character is 0x1), further judgment is required.

[0085] When the first identification result is 0x0, and the addressing mode is extended addressing or mixed addressing, the third byte (ie, the preset fourth length interval) in the diagnosis request message is identified to obtain the diagnosis service in the diagnosis request message.

[0086] When the first identification result is 0x1, and the addressing mode is extended addressing or mixed addressing, the fourth byte (ie, the preset sixth length interval) in the diagnosis request message is identified to obtain the diagnosis service in the diagnosis request message.

[0087] Step S103: filtering the diagnosis request message according to the diagnosis service of the diagnosis request message.

[0088] In this embodiment, the filtering of the diagnostic request message according to the diagnostic service of the diagnostic request message specifically includes:

[0089] Determining the diagnostic service of the diagnostic request message according to a preset filtering strategy;

[0090] It is determined whether to intercept the diagnosis request message according to the determination result to complete the filtering of the diagnosis request message.

[0091] In an optional embodiment, the diagnostic service of the diagnostic request message is judged according to a preset filtering strategy, and a release operation is performed on the diagnostic request message of the whole vehicle without risk, and an interception operation is performed on the diagnostic request message of the whole vehicle with risk.

[0092] In an optional embodiment, the gateway filters the diagnosis request message sent to itself by the diagnosis request message filtering method of this embodiment, and determines whether to allow the diagnosis request message to be transmitted to the diagnosis processing module inside the gateway.

[0093] This embodiment determines the diagnostic service of the diagnostic request message through the filtering strategy, realizes the filtering of the diagnostic request message, ensures that the diagnostic service that meets the automobile CAN communication requirements can be successfully executed, and improves the security of the automobile CAN communication.

[0094] This embodiment obtains the diagnostic service in the diagnostic request message by identifying the addressing mode of the diagnostic request message and identifying the bytes of the diagnostic request message based on different addressing modes, and implements the filtering of the diagnostic request message with the diagnostic service. By identifying the addressing mode and bytes in the diagnostic request message, it is possible to accurately locate the diagnostic service in the diagnostic message sent by the external diagnostic instrument when the existing automobile CAN communication is physically isolated using a gateway, implement the interception and filtering of the diagnostic message, prevent the external diagnostic instrument from attacking the automobile CAN communication by replaying the old diagnostic message, ensure that the diagnostic service that meets the automobile CAN communication requirements can be successfully executed, and improve the security of the automobile CAN communication.

[0095] Embodiment 2

[0096] Please refer to Figure 2 , is a structural diagram of a diagnostic request message filtering system based on byte recognition provided by an embodiment of the present invention, comprising: an addressing mode identification module 201, a diagnostic service identification module 202 and a message filtering module 203.

[0097] The addressing mode identification module 201 is used to obtain a diagnosis request message and identify an addressing mode corresponding to the diagnosis request message.

[0098] The diagnostic service identification module 202 is used to identify the bytes of the diagnostic request message according to the byte detection strategy corresponding to the addressing mode, and obtain the diagnostic service of the diagnostic request message.

[0099] In this embodiment, the diagnostic service identification module 202 includes: a diagnostic service identification unit;

[0100] In the diagnostic service identification unit, the addressing mode includes: conventional addressing, extended addressing and mixed addressing;

[0101] The diagnostic service identification unit is used for identifying bytes in the diagnostic request message that are in a preset first length interval when the addressing mode is conventional addressing, and obtaining a first identification result;

[0102] When the addressing mode is extended addressing or mixed addressing, identifying bytes in the diagnostic request message that are in a preset second length interval to obtain a first identification result;

[0103] When the first identification result is within a preset first range, the diagnostic service in the diagnostic request message is identified based on the addressing mode.

[0104] In this embodiment, the diagnostic service identification unit includes: a diagnostic service identification subunit;

[0105] In the diagnostic service identification subunit, the first range includes: a first character and a second character;

[0106] The diagnostic service identification subunit is used for identifying the bytes of the diagnostic request message based on the addressing mode to obtain the diagnostic service in the diagnostic request message when the first identification result is the first character;

[0107] When the first recognition result is the second character, the bytes of the diagnosis request message are recognized based on the addressing mode to obtain the diagnosis service in the diagnosis request message.

[0108] In this embodiment, the diagnostic service identification subunit includes: a first character diagnostic component;

[0109] The first character diagnosis component is used to identify bytes in a preset third length interval in the diagnosis request message when the first recognition result is the first character and the addressing mode is conventional addressing, and obtain the diagnosis service in the diagnosis request message;

[0110] When the first recognition result is the first character, and the addressing mode is extended addressing or mixed addressing, the bytes in the preset fourth length interval in the diagnosis request message are identified to obtain the diagnosis service in the diagnosis request message.

[0111] In this embodiment, the diagnostic service identification subunit includes: a second character diagnostic component;

[0112] The second character diagnosis component is used to identify the bytes of the preset fifth length interval in the diagnosis request message when the first recognition result is the second character and the addressing mode is conventional addressing, and obtain the diagnosis service in the diagnosis request message;

[0113] When the first recognition result is the second character, and the addressing mode is extended addressing or mixed addressing, the bytes in the preset sixth length interval in the diagnosis request message are identified to obtain the diagnosis service in the diagnosis request message.

[0114] The message filtering module 203 is used to filter the diagnosis request message according to the diagnosis service of the diagnosis request message.

[0115] In this embodiment, the message filtering module 203 includes: a message filtering unit;

[0116] The message filtering unit is used to judge the diagnostic service of the diagnostic request message according to a preset filtering strategy;

[0117] It is determined whether to intercept the diagnosis request message according to the determination result to complete the filtering of the diagnosis request message.

[0118] This embodiment obtains the diagnostic service in the diagnostic request message by identifying the addressing mode of the diagnostic request message and identifying the bytes of the diagnostic request message based on different addressing modes, and implements the filtering of the diagnostic request message with the diagnostic service. By identifying the addressing mode and bytes in the diagnostic request message, it is possible to accurately locate the diagnostic service in the diagnostic message sent by the external diagnostic instrument when the existing automobile CAN communication is physically isolated using a gateway, implement the interception and filtering of the diagnostic message, prevent the external diagnostic instrument from attacking the automobile CAN communication by replaying the old diagnostic message, ensure that the diagnostic service that meets the automobile CAN communication requirements can be successfully executed, and improve the security of the automobile CAN communication.

[0119] In summary, the embodiment of the present invention obtains the diagnostic service in the diagnostic request message by identifying the addressing mode of the diagnostic request message and identifying the bytes of the diagnostic request message based on different addressing modes, and implements the filtering of the diagnostic request message with the diagnostic service. By identifying the addressing mode and bytes in the diagnostic request message, it is possible to accurately locate the diagnostic service in the diagnostic message sent by the external diagnostic instrument when the existing automobile CAN communication uses a gateway for physical isolation, implement the interception and filtering of the diagnostic message, prevent the external diagnostic instrument from attacking the automobile CAN communication by replaying the old diagnostic message, ensure that the diagnostic service that meets the requirements of the automobile CAN communication can be successfully executed, and improve the security of the automobile CAN communication.

[0120] The specific embodiments described above further describe the purpose, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.

Claims

1. A diagnostic request message filtering method based on byte recognition, characterized in that: include: Obtaining a diagnosis request message, and identifying an addressing mode corresponding to the diagnosis request message; According to the byte detection strategy corresponding to the addressing mode, the bytes of the diagnosis request message are identified to obtain the diagnosis service of the diagnosis request message; The diagnostic request message is filtered according to the diagnostic service of the diagnostic request message.

2. A diagnostic request message filtering method based on byte recognition as claimed in claim 1, characterized in that: The byte detection strategy corresponding to the addressing mode is used to identify the bytes of the diagnosis request message and obtain the diagnosis service of the diagnosis request message, specifically including: The addressing modes include: conventional addressing, extended addressing and mixed addressing; When the addressing mode is conventional addressing, identifying bytes in the diagnostic request message that are within a preset first length interval to obtain a first identification result; When the addressing mode is extended addressing or mixed addressing, identifying bytes in the diagnostic request message that are in a preset second length interval to obtain a first identification result; When the first identification result is within a preset first range, the diagnostic service in the diagnostic request message is identified based on the addressing mode.

3. A diagnostic request message filtering method based on byte recognition as claimed in claim 2, characterized in that: When the first identification result is within the preset first range, identifying the diagnostic service in the diagnostic request message based on the addressing mode specifically includes: The first range includes: a first character and a second character; When the first recognition result is the first character, identifying the bytes of the diagnosis request message based on the addressing mode, and obtaining the diagnosis service in the diagnosis request message; When the first recognition result is the second character, the bytes of the diagnosis request message are recognized based on the addressing mode to obtain the diagnosis service in the diagnosis request message.

4. A diagnostic request message filtering method based on byte recognition as claimed in claim 3, characterized in that: When the first recognition result is the first character, identifying the bytes of the diagnosis request message based on the addressing mode to obtain the diagnosis service in the diagnosis request message specifically includes: When the first recognition result is the first character and the addressing mode is conventional addressing, identifying bytes in a preset third length interval in the diagnosis request message, and obtaining a diagnosis service in the diagnosis request message; When the first recognition result is the first character, and the addressing mode is extended addressing or mixed addressing, the bytes in the preset fourth length interval in the diagnosis request message are identified to obtain the diagnosis service in the diagnosis request message.

5. A method for filtering diagnostic request messages based on byte recognition as claimed in claim 3, characterized in that: When the first recognition result is the second character, identifying the bytes of the diagnosis request message based on the addressing mode to obtain the diagnosis service in the diagnosis request message specifically includes: When the first recognition result is the second character and the addressing mode is conventional addressing, identifying bytes in a preset fifth length interval in the diagnosis request message, and obtaining a diagnosis service in the diagnosis request message; When the first recognition result is the second character, and the addressing mode is extended addressing or mixed addressing, the bytes in the preset sixth length interval in the diagnosis request message are identified to obtain the diagnosis service in the diagnosis request message.

6. A diagnostic request message filtering method based on byte recognition as claimed in claim 1 or 3, characterized in that: The filtering of the diagnostic request message according to the diagnostic service of the diagnostic request message specifically includes: Determining the diagnostic service of the diagnostic request message according to a preset filtering strategy; It is determined whether to intercept the diagnosis request message according to the determination result to complete the filtering of the diagnosis request message.

7. A diagnostic request message filtering system based on byte recognition, characterized in that: include: Addressing mode identification module, diagnostic service identification module and message filtering module; Wherein, the addressing mode identification module is used to obtain a diagnostic request message and identify the addressing mode corresponding to the diagnostic request message; The diagnostic service identification module is used to identify the bytes of the diagnostic request message according to the byte detection strategy corresponding to the addressing mode, and obtain the diagnostic service of the diagnostic request message; The message filtering module is used to filter the diagnosis request message according to the diagnosis service of the diagnosis request message.

8. A diagnostic request message filtering system based on byte recognition as claimed in claim 7, characterized in that: The diagnostic service identification module includes: a diagnostic service identification unit; In the diagnostic service identification unit, the addressing mode includes: conventional addressing, extended addressing and mixed addressing; The diagnostic service identification unit is used for identifying bytes in the diagnostic request message that are in a preset first length interval when the addressing mode is conventional addressing, and obtaining a first identification result; When the addressing mode is extended addressing or mixed addressing, identifying bytes in the diagnostic request message that are in a preset second length interval to obtain a first identification result; When the first identification result is within a preset first range, the diagnostic service in the diagnostic request message is identified based on the addressing mode.

9. A diagnostic request message filtering system based on byte recognition as claimed in claim 8, characterized in that: The diagnostic service identification unit comprises: a diagnostic service identification subunit; In the diagnostic service identification subunit, the first range includes: a first character and a second character; The diagnostic service identification subunit is used for identifying the bytes of the diagnostic request message based on the addressing mode to obtain the diagnostic service in the diagnostic request message when the first identification result is the first character; When the first recognition result is the second character, the bytes of the diagnosis request message are recognized based on the addressing mode to obtain the diagnosis service in the diagnosis request message.

10. A diagnostic request message filtering system based on byte recognition as claimed in claim 7 or 9, characterized in that: The message filtering module comprises: a message filtering unit; The message filtering unit is used to judge the diagnostic service of the diagnostic request message according to a preset filtering strategy; It is determined whether to intercept the diagnosis request message according to the determination result to complete the filtering of the diagnosis request message.