Traffic redirection method and intelligent device

By configuring a parser director to redirect the data transmission path in the vehicle's internal ECU diagnosis, the DoIP gateway traffic bottleneck and security issues are resolved, achieving efficient and secure data transmission.

CN119135748BActive Publication Date: 2025-09-26NIO TECH ANHUI CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411311587.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-18
Publication Date
2025-09-26
Estimated Expiration
2044-09-18

AI Technical Summary

Technical Problem

In vehicle DoIP diagnosis, the DoIP gateway suffers from extended service time and security risks due to high traffic load. Existing solutions expose the internal topology of the vehicle, increasing the risk of attacks.

Method used

A resolution director is configured between the initiator and the target receiver through the traffic redirection device to redirect the service request data transmission path, avoiding direct transmission through the DoIP gateway to ensure security.

Benefits of technology

It reduces the traffic burden of the DoIP gateway, avoids the exposure of the target receiving end address, and improves security and transmission efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119135748B_ABST
    Figure CN119135748B_ABST
Patent Text Reader

Abstract

The present application provides a traffic redirection method and intelligent device. The method includes: a traffic redirection device receives a service request message and determines whether traffic redirection of the service request data is required; if traffic redirection is required, a confirmation message including a first destination address is sent to the initiator, and a resolution director is configured at at least one network node between the initiator of the service request message and the target receiving end; the resolution director is used to convert the destination address of the transmission message from the first destination address to the real address of the target receiving end, and the source address is converted from the address of the initiator to the first destination address, so as to transmit the transmission message to the target receiving end, thereby reducing the traffic burden of the DoIP gateway and ensuring higher security without exposing the real address of the target receiving end.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and specifically provides a traffic redirection method and an intelligent device. Background Art

[0002] Ethernet technology is becoming a major component of in-vehicle networks, with UDS / DoIP widely used for vehicle diagnostics in both factory production and after-sales service. During manufacturing, after-sales diagnostics, or repairs, DoIP gateways facilitate communication and data transmission between the initiator and the target receiver of service request messages. Vehicle systems typically contain over 100 ECUs, at least 10 of which support DoIP diagnostics. When performing DoIP diagnostics on these ECUs, a single DoIP gateway typically connects the diagnostic client and the vehicle's internal ECUs. This gateway is responsible for proxying all diagnostic requests and responses for all ECUs, including the transmission of the relevant diagnostic request and response data. The DoIP gateway parses DoIP diagnostic packets at the application layer and determines how to route them to the various ECUs within the vehicle. However, the firmware packages for some ECUs (such as smart cockpit center consoles and autonomous driving systems) can be as large as 10GB, and some ECUs require large amounts of data and files to be uploaded for offline analysis. The downloading, uploading, and transmission of these firmware packages / data usually require the use of the UDS / DoIP protocol. The transmission of this data often causes a high traffic load on the DoIP gateway, making a single DoIP gateway a bottleneck for vehicle diagnostic traffic, resulting in extended service times, slow repair and diagnostic responses, and lower efficiency. For example, some vehicle software upgrades may take more than 7 hours.

[0003] There are several alternative solutions currently available in the industry. For example, exposing the IP addresses of all ECUs within a vehicle to an external DoIP diagnostic client allows the client to establish direct communication connections with the vehicle's internal ECUs for data transmission, thereby reducing the burden on the DoIP gateway. However, this approach has many drawbacks, particularly in terms of security. Since the vehicle's internal topology is visible to the outside world, it increases the risk of ECU attacks.

[0004] Accordingly, a new traffic redirection solution is needed in this field to solve the above problems. Summary of the Invention

[0005] In order to overcome the above-mentioned defects, the present application is proposed to solve or at least partially solve the technical problem of how to reduce the traffic burden of the DoIP gateway while ensuring security.

[0006] In a first aspect, a traffic redirection method is provided, which is applied to a traffic redirection device, wherein the traffic redirection device includes a DoIP gateway, and the method includes:

[0007] In response to a service request message received by the traffic redirection device, determining whether traffic redirection of the service request data to be transmitted is required, an initiator and a target receiver of the service request message are both communicatively connected to the traffic redirection device, and the initiator and the target receiver are communicatively connected via the traffic redirection device;

[0008] In response to determining that the traffic redirection is required, determining a confirmation message for the service request message, and sending the confirmation message to the initiator using the traffic redirection device, wherein the confirmation message includes a first destination address, so that the initiator sends a service request data transmission message to the first destination address, wherein the service request data transmission message corresponds to the service request message and is used to transmit the service request data to be transmitted;

[0009] In response to determining that the traffic redirection is required, configuring a parsing director at at least one network node between the initiating end and the target receiving end, the parsing director being configured to parse the service request data transmission message and redirect a communication path of the service request data transmission message;

[0010] In response to obtaining, at the at least one network node where the resolution director is configured, the service request data transmission message sent by the initiator to the first destination address, redirecting the communication path of the service request data transmission message using the resolution director, including: translating the destination address of the service request data transmission message from the first destination address to the real address of the target receiving end, and translating the source address of the service request data transmission message from the address of the initiator to the first destination address;

[0011] The service request data transmission message is transmitted to the target receiving end based on the redirected communication path of the service request data transmission message.

[0012] In one technical solution of the above traffic redirection method, the method further includes:

[0013] Determining that the path conversion type corresponding to the service request data transmission message is a transparent mode;

[0014] Based on the determined path conversion type, determining that the first destination address in the confirmation message is an address of the DoIP gateway;

[0015] Redirecting the communication path of the service request data transmission message by using the resolution director includes:

[0016] Utilizing the resolution director, converting the destination address of the service request data transmission message from the address of the DoIP gateway to the real address of the target receiving end;

[0017] The resolution director is used to convert the source address of the service request data transmission message from the address of the initiating end to the address of the DoIP gateway.

[0018] In one technical solution of the above-mentioned traffic redirection method, it is determined that the path conversion type corresponding to the service request data transmission message is a semi-transparent mode;

[0019] Determine a mapping address of the target receiving end, and use the mapping address of the target receiving end as the first destination address in the confirmation message;

[0020] Redirecting the communication path of the service request data transmission message by using the resolution director includes:

[0021] Utilizing the resolution director, converting the destination address of the service request data transmission message from the mapped address of the target receiving end to the real address of the target receiving end;

[0022] The resolution director is used to convert the source address of the service request data transmission message from the address of the initiating end to the mapping address of the target receiving end.

[0023] In one technical solution of the above-mentioned traffic redirection method, determining the path conversion type corresponding to the service request data transmission message includes:

[0024] Based on the security level of the initiator and / or the communication mode type of the service request message, a path conversion type corresponding to the service request data transmission message is determined, where the communication mode type includes encrypted communication and non-encrypted communication.

[0025] In one technical solution of the above traffic redirection method, the method further includes:

[0026] In response to determining that the path conversion type is a semi-transparent mode, creating a virtual communication path identifier, wherein the virtual communication path identifier represents a virtual communication path from the mapped address of the target receiving end to the real address of the target receiving end;

[0027] The virtual communication path identifier is sent to the initiating end, so that the initiating end initiates the service request data transmission message to the mapping address corresponding to the virtual communication path identifier.

[0028] In a technical solution of the above-mentioned traffic redirection method, in the transparent mode, converting the destination address of the service request data transmission message from the address of the DoIP gateway to the real address of the target receiving end includes:

[0029] Based on the network IP protocol layer, transport layer and application layer, the destination address of the service request data transmission message is converted from the address of the DoIP gateway to the real address of the target receiving end.

[0030] In one technical solution of the above-mentioned traffic redirection method, the parsing director is further configured to parse a response data transmission message and redirect a communication path of the response data transmission message, wherein the response data transmission message corresponds to the service request data transmission message and is used to transmit the response data, wherein the response data is data returned by the target receiving end to the initiating end in response to the service request data received from the first destination address; the method further includes:

[0031] In response to obtaining, at the at least one network node where the resolution director is configured, the response data transmission message sent by the target receiving end to the first destination address, redirecting the communication path of the response data transmission message based on the resolution director, including: translating the destination address of the response data transmission message from the first destination address to the address of the originating end, and translating the source address of the response data transmission message from the real address of the target receiving end to the first destination address;

[0032] The response data transmission message is transmitted to the initiating end based on the redirected communication path of the response data transmission message.

[0033] In one technical solution of the above-mentioned traffic redirection method, the method further includes:

[0034] Determining that the path conversion type corresponding to the service request data transmission message is a transparent mode;

[0035] Based on the determined path conversion type, determining that the first destination address in the confirmation message is an address of the DoIP gateway;

[0036] Redirecting the communication path of the response data transmission message by using the parsing director includes:

[0037] Utilizing the resolution director, converting the destination address of the response data transmission message from the address of the DoIP gateway to the address of the initiating end;

[0038] The resolution director is used to convert the source address of the response data transmission message from the real address of the target receiving end to the address of the DoIP gateway.

[0039] In one technical solution of the above traffic redirection method, the method further includes:

[0040] Determining that the path conversion type corresponding to the service request data transmission message is a semi-transparent mode;

[0041] Determine a mapping address of the target receiving end, and use the mapping address of the target receiving end as the first destination address in the confirmation message;

[0042] Redirecting the communication path of the response data transmission message by using the parsing director includes:

[0043] Utilizing the parsing director, converting the destination address of the response data transmission message from the mapping address of the target receiving end to the address of the initiating end;

[0044] The parsing director is used to convert the source address of the response data transmission message from the real address of the target receiving end to the mapped address of the target receiving end.

[0045] In one technical solution of the above-mentioned traffic redirection method, configuring a resolution director at at least one network node between the initiating end and the target receiving end includes:

[0046] A parser director is configured at at least one network node location among the Ethernet switch between the initiator and the target receiving end, at least one protocol layer of the DoIP gateway, the NIC network card, and the network node location where the driver of the DoIP gateway is located.

[0047] In a technical solution of the upstream traffic redirection method, the method further includes:

[0048] The network node location for configuring the parser director is determined based on the function of each network node location between the initiator and the target receiving end, the number of service request messages received by the traffic redirection device, the data type, priority, importance level, data volume of the service request data corresponding to each service request message, and at least one of the type of the target receiving end.

[0049] In one technical solution of the above traffic redirection method, the method further includes:

[0050] In response to the traffic redirection device receiving a plurality of service request messages, and determining that traffic redirection is required for the service request data corresponding to the plurality of service request messages, a plurality of parsing directors are configured at a plurality of network node positions between the initiating end and the target receiving end, the plurality of parsing directors are configured to respectively parse the service request data transmission messages corresponding to different service request messages, and redirect the communication paths of the service request data transmission messages;

[0051] Among them, for each service request data transmission message, in response to the network node location where the service request data transmission message currently arrives being configured with the resolution director, it is determined whether to redirect the communication path of the service request data transmission message based on the resolution director of the currently arrived network node location.

[0052] In one technical solution of the above-mentioned traffic redirection method, determining whether to redirect the communication path of the service request data transmission message based on the resolution director of the currently reached network node location includes:

[0053] Parsing the service request data transmission message based on the parsing director to obtain the destination address of the service request data transmission message;

[0054] The destination address obtained by the resolution is matched with the first destination address in the path conversion rule pre-stored in the resolution director. If the match is the same, a communication path for redirecting the service request data transmission message based on the resolution director is determined.

[0055] In one technical solution of the above-mentioned traffic redirection method, the method includes:

[0056] In response to transmitting the response data to the initiator based on the redirected communication path of the response data transmission message, releasing the redirected communication path of the response data transmission message and the redirected communication path of the service request data transmission message.

[0057] In one technical solution of the above-mentioned traffic redirection method, the service request message includes data information of the service request data to be transmitted, and the data information includes data size and data type. In response to the service request message received by the traffic redirection device, determining whether traffic redirection of the service request data to be transmitted is required includes:

[0058] Based on at least one of the data information, the transmission duration of the service request data and the load of the traffic redirection device, determine whether traffic redirection of the service request data is required, and the transmission duration of the service request data is determined based on the data information and the load of the traffic redirection device.

[0059] In a second aspect, a traffic redirection method is provided, which is applied to a terminal. The method includes:

[0060] Sending a service request message to the traffic redirection device, wherein the service request message includes data information of the service request data to be transmitted, and a target receiving end of the service request message is communicatively connected to the terminal through the traffic redirection device;

[0061] receiving a confirmation message for the service request message sent by the traffic redirection device, the confirmation message including a first destination address, the first destination address being an initial destination address of the service request data transmission message determined by the traffic redirection device in response to traffic redirection being required for the service request data to be transmitted, the service request data transmission message corresponding to the service request message and being used to transmit the service request data to be transmitted;

[0062] Initiate the service request data transmission message to the first destination address, so that the traffic redirection device redirects the communication path of the service request data transmission message, and transmits the service request data to be transmitted to the target receiving end based on the redirected communication path.

[0063] In a technical solution of the above-mentioned traffic redirection method, response data sent by the target receiving end is obtained, and the response data is the data returned by the target receiving end to the terminal in response to the received service request data, and the response data is transmitted to the terminal based on the response data transmission message communication path redirected by the traffic redirection device, and the response data transmission message corresponds to the service request data transmission message and is used to transmit the response data.

[0064] In a third aspect, a smart device is provided, which includes a traffic redirection device, the traffic redirection device including at least one processor; and a memory communicatively connected to the at least one processor; wherein a computer program is stored in the memory, and when the computer program is executed by the at least one processor, the method described in any one of the technical solutions of the above-mentioned traffic redirection method is implemented.

[0065] Solution 1. A traffic redirection method, applied to a traffic redirection device, characterized in that the traffic redirection device includes a DoIP gateway, and the method includes:

[0066] In response to the traffic redirection device receiving the service request message, determining whether traffic redirection is required for service request data to be transmitted, the service request data to be transmitted being data corresponding to the service request message, an initiator and a target receiver of the service request message both being communicatively connected to the traffic redirection device, and the initiator and the target receiver being communicatively connected via the traffic redirection device;

[0067] In response to determining that the traffic redirection is required, determining a confirmation message for the service request message, and sending the confirmation message to the initiator using the traffic redirection device, wherein the confirmation message includes a first destination address, so that the initiator sends a service request data transmission message to the first destination address, wherein the service request data transmission message corresponds to the service request message and is used to transmit the service request data to be transmitted;

[0068] In response to determining that the traffic redirection is required, configuring a parsing director at at least one network node between the initiating end and the target receiving end, the parsing director being configured to parse the service request data transmission message and redirect a communication path of the service request data transmission message;

[0069] In response to obtaining, at the at least one network node where the resolution director is configured, the service request data transmission message sent by the initiator to the first destination address, redirecting the communication path of the service request data transmission message using the resolution director, including: translating the destination address of the service request data transmission message from the first destination address to the real address of the target receiving end, and translating the source address of the service request data transmission message from the address of the initiator to the first destination address;

[0070] The service request data transmission message is transmitted to the target receiving end based on the redirected communication path of the service request data transmission message.

[0071] Solution 2. The traffic redirection method according to Solution 1, further comprising:

[0072] Determining that the path conversion type corresponding to the service request data transmission message is a transparent mode;

[0073] Based on the determined path conversion type, determining that the first destination address in the confirmation message is an address of the DoIP gateway;

[0074] Redirecting the communication path of the service request data transmission message by using the resolution director includes:

[0075] Utilizing the resolution director, converting the destination address of the service request data transmission message from the address of the DoIP gateway to the real address of the target receiving end;

[0076] The resolution director is used to convert the source address of the service request data transmission message from the address of the initiating end to the address of the DoIP gateway.

[0077] Solution 3. The traffic redirection method according to Solution 1, further comprising:

[0078] Determining that the path conversion type corresponding to the service request data transmission message is a semi-transparent mode;

[0079] Determine a mapping address of the target receiving end, and use the mapping address of the target receiving end as the first destination address in the confirmation message;

[0080] Redirecting the communication path of the service request data transmission message by using the resolution director includes:

[0081] Utilizing the resolution director, converting the destination address of the service request data transmission message from the mapped address of the target receiving end to the real address of the target receiving end;

[0082] The resolution director is used to convert the source address of the service request data transmission message from the address of the initiating end to the mapping address of the target receiving end.

[0083] Solution 4. The traffic redirection method according to Solution 2, wherein determining the path conversion type corresponding to the service request data transmission message comprises:

[0084] Based on the security level of the initiator and / or the communication mode type of the service request message, a path conversion type corresponding to the service request data transmission message is determined, where the communication mode type includes encrypted communication and non-encrypted communication.

[0085] Solution 5. The traffic redirection method according to Solution 3, further comprising:

[0086] In response to determining that the path conversion type is a semi-transparent mode, creating a virtual communication path identifier, wherein the virtual communication path identifier represents a virtual communication path from the mapped address of the target receiving end to the real address of the target receiving end;

[0087] The virtual communication path identifier is sent to the initiating end, so that the initiating end sends the service request data transmission message to the mapping address corresponding to the virtual communication path identifier.

[0088] Solution 6. The traffic redirection method according to Solution 2 is characterized in that:

[0089] The converting the destination address of the service request data transmission message from the address of the DoIP gateway to the real address of the target receiving end includes:

[0090] Based on the network IP protocol layer, transport layer and application layer, the destination address of the service request data transmission message is converted from the address of the DoIP gateway to the real address of the target receiving end.

[0091] Solution 7. The traffic redirection method according to Solution 1, characterized in that the parsing director is further configured to parse a response data transmission message and redirect a communication path of the response data transmission message, wherein the response data transmission message corresponds to the service request data transmission message and is used to transmit response data, wherein the response data is data returned by the target receiving end to the initiating end in response to the service request data received from the first destination address; and the method further comprises:

[0092] In response to obtaining, at the at least one network node where the resolution director is configured, the response data transmission message sent by the target receiving end to the first destination address, redirecting the communication path of the response data transmission message using the resolution director, including: translating the destination address of the response data transmission message from the first destination address to the address of the originating end, and translating the source address of the response data transmission message from the real address of the target receiving end to the first destination address;

[0093] The response data transmission message is transmitted to the initiating end based on the redirected communication path of the response data transmission message.

[0094] Solution 8. The traffic redirection method according to Solution 7, further comprising:

[0095] Determining that the path conversion type corresponding to the service request data transmission message is a transparent mode;

[0096] Based on the determined path conversion type, determining that the first destination address in the confirmation message is an address of the DoIP gateway;

[0097] Redirecting the communication path of the response data transmission message by using the parsing director includes:

[0098] Using the resolution director, converting the destination address of the response data transmission message from the address of the DoIP gateway to the address of the initiator;

[0099] The resolution director is used to convert the source address of the response data transmission message from the real address of the target receiving end to the address of the DoIP gateway.

[0100] Solution 9. The traffic redirection method according to Solution 7, further comprising:

[0101] Determining that the path conversion type corresponding to the service request data transmission message is a semi-transparent mode;

[0102] Determine a mapping address of the target receiving end, and use the mapping address of the target receiving end as the first destination address in the confirmation message;

[0103] Redirecting the communication path of the response data transmission message by using the parsing director includes:

[0104] Utilizing the parsing director, converting the destination address of the response data transmission message from the mapping address of the target receiving end to the address of the initiating end;

[0105] The parsing director is used to convert the source address of the response data transmission message from the real address of the target receiving end to the mapped address of the target receiving end.

[0106] Solution 10. The traffic redirection method according to Solution 1, wherein configuring a resolution director at at least one network node between the initiating end and the target receiving end comprises:

[0107] A parser director is configured at at least one network node location among the Ethernet switch between the initiator and the target receiving end, at least one protocol layer of the DoIP gateway, the NIC network card, and the network node location where the driver of the DoIP gateway is located.

[0108] Solution 11. The traffic redirection method according to Solution 10 is characterized in that:

[0109] The method further comprises:

[0110] The network node location for configuring the parser director is determined based on the function of each network node location between the initiator and the target receiving end, the number of service request messages received by the traffic redirection device, the data type, priority, importance level, data volume of the service request data corresponding to each service request message, and at least one of the type of the target receiving end.

[0111] Solution 12. The traffic redirection method according to Solution 1 is characterized in that:

[0112] The method further comprises:

[0113] In response to the traffic redirection device receiving a plurality of service request messages, and determining that traffic redirection is required for the service request data corresponding to the plurality of service request messages, a plurality of parsing directors are configured at a plurality of network node positions between the initiating end and the target receiving end, the plurality of parsing directors are configured to respectively parse the service request data transmission messages corresponding to different service request messages, and redirect the communication paths of the service request data transmission messages;

[0114] Among them, for each service request data transmission message, in response to the network node location where the service request data transmission message currently arrives being configured with the resolution director, it is determined whether to redirect the communication path of the service request data transmission message based on the resolution director of the currently arrived network node location.

[0115] Solution 13. The traffic redirection method according to Solution 12 is characterized in that:

[0116] Determining whether to redirect the communication path of the service request data transmission message based on the resolution director of the currently arrived network node location includes:

[0117] Parsing the service request data transmission message based on the parsing director to obtain the destination address of the service request data transmission message;

[0118] The destination address obtained by the resolution is matched with the first destination address in the path conversion rule pre-stored in the resolution director. If the match is the same, a communication path for redirecting the service request data transmission message based on the resolution director is determined.

[0119] Solution 14. The traffic redirection method according to Solution 7, characterized in that the method includes:

[0120] In response to transmitting the response data to the initiator based on the redirected communication path of the response data transmission message, releasing the redirected communication path of the response data transmission message and the redirected communication path of the service request data transmission message.

[0121] Solution 15. The traffic redirection method according to Solution 1, wherein the service request message includes data information of the service request data to be transmitted, the data information including data size and data type, and the determining, in response to the service request message received by the traffic redirection device, whether traffic redirection of the service request data to be transmitted is required, comprises:

[0122] Based on at least one of the data information, the transmission duration of the service request data and the load of the traffic redirection device, determine whether traffic redirection of the service request data is required, and the transmission duration of the service request data is determined based on the data information and the load of the traffic redirection device.

[0123] Solution 16. A traffic redirection method, applied to a terminal, wherein the terminal is in communication with a traffic redirection device, wherein the traffic redirection device includes a DoIP gateway, wherein the method comprises:

[0124] Sending a service request message to the traffic redirection device, wherein the service request message includes data information of the service request data to be transmitted, and a target receiving end of the service request message is communicatively connected to the terminal through the traffic redirection device;

[0125] receiving a confirmation message for the service request message sent by the traffic redirection device, the confirmation message including a first destination address, the first destination address being an initial destination address of the service request data transmission message determined by the traffic redirection device in response to traffic redirection being required for the service request data to be transmitted, the service request data transmission message corresponding to the service request message and being used to transmit the service request data to be transmitted;

[0126] Initiate the service request data transmission message to the first destination address, so that the traffic redirection device redirects the communication path of the service request data transmission message, and transmits the service request data to be transmitted to the target receiving end based on the redirected communication path.

[0127] Solution 17. The traffic redirection method according to Solution 16, further comprising:

[0128] Obtain response data sent by the target receiving end, wherein the response data is data returned by the target receiving end to the terminal in response to the received service request data, and the response data is transmitted to the terminal based on the response data transmission message communication path redirected by the traffic redirection device, and the response data transmission message corresponds to the service request data transmission message and is used to transmit the response data.

[0129] Solution 18. An intelligent device, characterized in that it includes: a traffic redirection device, the traffic redirection device includes at least one processor, and a memory communicatively connected to the at least one processor; wherein a computer program is stored in the memory, and when the computer program is executed by the at least one processor, it implements the traffic redirection method described in any one of Solutions 1 to 15.

[0130] The above one or more technical solutions of this application have at least one or more of the following beneficial effects:

[0131] In implementing the technical solution of the traffic redirection method provided by the present application, the present application can determine whether traffic redirection is required for the service request data to be transmitted based on the service request message received by the traffic redirection device. When it is determined that traffic redirection is required, the service request message is confirmed, and the traffic redirection device is used to send a confirmation message to the initiator. The confirmation message includes a first destination address, so that the initiator sends a service request data transmission message to the first destination address, and configures a resolution director at at least one network node position between the initiator and the target receiving end corresponding to the service request message. Then, after receiving the service request data transmission message initiated by the initiator to the first destination address, the communication path of the service request data transmission message is redirected based on the resolution director, including: converting the destination address of the service request data transmission message from the first destination address to the real address of the target receiving end, and converting the source address of the service request data transmission message from the address of the initiator to the first destination address; and transmitting the service request data to the target receiving end based on the redirected communication path. Through the above-mentioned traffic redirection method, the present application can determine whether the corresponding service request data to be transmitted needs to be redirected according to the service request message received by the traffic redirection device without human intervention, and redirect the communication path of the service request data transmission message when it is determined that traffic redirection is required, and transmit the service request data to the target receiving end through the redirected communication path, so that the service request data does not need to be transmitted through the DoIP gateway, which reduces the traffic burden of the DoIP gateway and solves the bottleneck problem in the data transmission process of the DoIP gateway as a service request data. Data transmission can be achieved without exposing the address of the target receiving end to the initiator, which can effectively avoid exposing the target receiving end, thereby reducing the risk of the target receiving end being attacked and ensuring higher security. BRIEF DESCRIPTION OF THE DRAWINGS

[0132] The disclosure of this application will become more easily understood with reference to the accompanying drawings. Those skilled in the art will readily appreciate that these drawings are for illustrative purposes only and are not intended to limit the scope of protection of this application. Among them:

[0133] Figure 1 This is a schematic diagram of the main connection components of the UDS / DoIP diagnostic network in the prior art;

[0134] Figure 2 This is a flow chart of the main steps of a traffic redirection method for a traffic redirection device according to an embodiment of the present application;

[0135] Figure 3 is a schematic diagram of a communication system including a communication path between a diagnostic client and an electronic control unit according to an example of an embodiment of the present application;

[0136] Figure 4 is a schematic diagram of a communication system including a communication path between a diagnostic client and an electronic control unit according to another example of an embodiment of the present application;

[0137] Figure 5 This is a schematic diagram of the deployment network location of a resolution director according to an implementation of an embodiment of the present application;

[0138] Figure 6 This is a flow chart of the main steps of a traffic redirection process according to an example of an embodiment of the present application;

[0139] Figure 7 1 is a flow chart of main steps of a method for redirecting traffic for a terminal according to another embodiment of the present application;

[0140] Figure 8 It is a schematic diagram of the main structure of a smart device according to an embodiment of the present application.

[0141] Reference numerals:

[0142] 11: Memory; 12: Processor. DETAILED DESCRIPTION

[0143] Some embodiments of the present application are described below with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are only used to explain the technical principles of the present application and are not intended to limit the scope of protection of the present application.

[0144] In the description of this application, "module" and "processor" may include hardware, software, or a combination of both. A module may include hardware circuitry, various suitable sensors, communication ports, and memory. It may also include software components, such as program code, or a combination of software and hardware. A processor may be a central processing unit (CPU), a microprocessor, an image processor, a digital signal processor, or any other suitable processor. A processor has data and / or signal processing capabilities. A processor may be implemented in software, hardware, or a combination of both. Computer-readable storage media include any suitable medium capable of storing program code, such as magnetic disks, hard disks, optical disks, flash memory, read-only memory, random access memory, etc. The term "A and / or B" refers to all possible combinations of A and B, such as only A, only B, or both A and B. The terms "at least one of A or B" or "at least one of A and B" have similar meanings to "A and / or B" and may include only A, only B, or both A and B. The singular forms "a" and "the" may also include the plural forms.

[0145] Also, unless otherwise specified, ordinal numbers such as "first" and "second" mentioned in the embodiments of this application are used to distinguish multiple objects, and are not used to limit the priority or importance of multiple objects. For example, the first destination address only represents the initial destination address of the transmission message of the service request data. The relevant user personal information that may be involved in the various embodiments of this application shall be processed in strict accordance with the requirements of laws and regulations, follow the principles of legality, legitimacy and necessity, and based on the reasonable purposes of business scenarios, and process the personal information that users actively provide during the use of products / services or generated due to the use of products / services, as well as the personal information obtained with the authorization of the user.

[0146] The user personal information processed by this application will vary depending on the specific product / service scenario and must be based on the specific scenario in which the user uses the product / service. This may involve the user's account information, device information, driving information, vehicle information, or other related information. This application will treat the user's personal information and its processing with a high degree of diligence.

[0147] This application attaches great importance to the security of user personal information and has taken reasonable and feasible security protection measures that comply with industry standards to protect user information and prevent personal information from being accessed, disclosed, used, modified, damaged or lost without authorization.

[0148] Here we first explain some terms involved in this application.

[0149] ECU (Electronic Control Unit), an electronic control unit, is a hardware component inside the vehicle that is responsible for various control and communication functions of the vehicle. Multiple ECUs can transmit information based on the vehicle bus to form a local area network inside the vehicle.

[0150] The UDS (Unified Diagnostic Services) diagnostic protocol is a diagnostic communication protocol in the automotive electronic ECU environment.

[0151] DoIP stands for Diagnostic communication over Internet Protocol, which is a diagnostic communication protocol based on the Internet Protocol. The corresponding ISO standard number is 13400. It is a protocol used for vehicle diagnosis and communication. It allows communication with the ECU inside the vehicle through the IP network and encapsulates and transmits UDS protocol data in the form of Ethernet communication, thereby realizing remote diagnosis, programming and configuration of the vehicle.

[0152] DoIP Gateway: A vehicle internal gateway that implements the DoIP protocol host node and routes messages between the vehicle subnets to which it is connected (each subnet includes at least one ECU) and external devices.

[0153] DoIP entity: a vehicle ECU that supports the DoIP protocol.

[0154] Diagnostic client: A device that initiates fault diagnostic communication to a target ECU on a vehicle according to a diagnostic task. The diagnostic client may include but is not limited to a remote diagnostic device and / or an on-board diagnostic device (OBD).

[0155] TCAM (ternary content addressable memory) is a special type of CAM (content addressable memory) that allows one or more bits of stored data to be in a third state. It also completes the entire search task within a single clock cycle. Due to its flexibility, TCAM is used to store IP addresses, allowing the entire IP address range to be searched at once.

[0156] NIC (Network Interface Controller): Responsible for the electrical connection between the computer and the network medium.

[0157] Unified Diagnostic Services (UDS) is a communication protocol used for automotive diagnostics and communication. UDS is typically used to communicate and perform diagnostic tasks with the vehicle's electronic control unit (ECU) via a vehicle's diagnostic interface, such as On-Board Diagnostics II (OBD-II).

[0158] ACK (Acknowledge character) is a transmission control character sent by the receiving station to the sending station in data communication.

[0159] OSI (Open Systems Interconnect) is an initiative initiated by ISO to develop international computer communication standards, particularly to facilitate interconnection between incompatible systems. The OSI model divides computer communication protocols into seven layers: physical, data link, network, transport, session, presentation, and application.

[0160] TLS (Transport Layer Security), secure transport layer protocol.

[0161] BPF (Berkeley Packet Filter), Berkeley Packet Filter, is a kernel-implemented network packet filtering technology.

[0162] Encrypted communication is a data communication method in which the data originator performs special processing on the data to conceal the original data. The originator encrypts the data using an encryption algorithm and transmits it to the target receiver. The target receiver then decrypts the data using a decryption algorithm.

[0163] Unencrypted communication: A data communication method in which the data initiator does not encrypt the data.

[0164] Currently, when performing DoIP diagnosis on the vehicle's internal ECUs, a single DOIP gateway is usually responsible for proxying all diagnostic requests and responses for all vehicle's internal ECUs. Figure 1 , Figure 1 This is a schematic diagram of the main connection components of the UDS / DoIP diagnostic network in the prior art. Figure 1 As shown, the diagnostic network includes the external network and the internal network (the internal network is Figure 1 As shown in the black rectangle on the right of the figure, the diagnostic client is located in the off-vehicle network, while the DoIP gateway and multiple DoIP entities (i.e., the vehicle's internal ECU) are located in the on-vehicle network. Figure 1 As shown, the multiple DoIP entities may include smart cockpit function domain CDF, smart antenna domain function domain SAF, automatic driving control domain ADF, domain controller Zone R, Zone FL, radar domain RAD, etc. The diagnostic client is connected to the wireless network (such as Figure 1The WiFi or Bluetooth shown in the figure realizes the communication connection with the in-vehicle network, wherein the diagnostic client realizes the communication connection with each DoIP entity through the DoIP gateway. The DoIP gateway proxies the UDS service between the diagnostic client and each ECU inside the vehicle. Data entering and leaving the in-vehicle network can only be sent through the DoIP gateway. Specifically, after the diagnostic client establishes a DoIP connection with the vehicle, it sends a service request message (such as a UDS request encapsulated in a DoIP message) to the DoIP gateway. After the DoIP gateway parses the service request message, it determines the ECU corresponding to the service request message, routes and forwards the parsed service request message and service request data to the ECU; and then transmits the diagnostic UDS response data returned by the ECU to the diagnostic client. All ECU diagnostic sessions and data transmissions between the DoIP diagnostic client and each ECU in the vehicle are realized through a DoIP gateway, which will cause the DoIP gateway to have a higher traffic load, making the DoIP gateway a traffic bottleneck in the data transmission process, resulting in low transmission efficiency, low diagnostic efficiency and other problems.

[0165] As described in the background technology, the industry currently Figure 1 There are some alternative solutions to existing technical solutions. For example, the IP addresses of all ECUs inside the vehicle are exposed to a diagnostic client outside the vehicle. Based on the received ECU diagnostic dialogue, the diagnostic client can directly establish a communication connection with the corresponding internal ECU of the vehicle. Data can be transmitted based on this connection, eliminating the need for a DoIP gateway for data transmission, thereby reducing the burden on the DoIP gateway. However, this approach has many drawbacks, especially in terms of security. Since the internal topology of the vehicle is visible to the outside world, it increases the risk of potential attacks on the internal ECUs.

[0166] To overcome the above-mentioned drawbacks, the present application provides a traffic redirection method for a traffic redirection device, wherein the traffic redirection device includes a DoIP gateway, and the initiator and the target receiver of the service request message are connected to each other through the traffic redirection device. In this method, when the initiator sends a service request message to the traffic redirection device, it only knows the address of the DoIP gateway and does not know the address of the target receiver of the service request message. After the traffic redirection device receives the service request message, the traffic redirection device determines whether it is necessary to redirect the service request data to be transmitted. When it is determined that traffic redirection is required, a confirmation message of the service request message is determined, the confirmation message includes a first destination address, and the traffic redirection device is used to send the confirmation message to the initiator, and a resolution director is configured at at least one network node position between the initiator and the target receiving end. In response to obtaining a service request data transmission message initiated by the initiator to the address at the at least one network node position configured with the resolution director, the resolution director redirects the communication path of the service request data transmission message based on the service request data transmission message, changes the destination address of the service request data transmission message from the first destination address to the real address of the target receiving end, and converts the source address of the service request data transmission message from the address of the initiator to the first destination address, and then transmits the service request data transmission message to the target receiving end based on the changed communication path without being transmitted through the DoIP gateway, thereby achieving unloading of DoIP gateway traffic and helping to reduce the burden on the DoIP gateway. Moreover, when the initiator is an external client and the target receiving end is the in-vehicle ECU, this method can also avoid the risk of the in-vehicle ECU being attacked due to the address of the in-vehicle ECU being exposed to the external client.

[0167] For ease of understanding, the technical solution of the present application is introduced below in conjunction with the accompanying drawings and embodiments. It should be noted that the traffic redirection solution in the embodiment of the present application can be applied to vehicles, such as vehicles with driving and moving functions, and can also be used for devices with driving and moving functions in vehicles, which devices include but are not limited to: on-board terminals, on-board controllers, on-board modules, on-board modules, on-board components, on-board chips, on-board units, etc. The vehicle can implement the traffic redirection method provided in the embodiment of the present application through the above-mentioned devices. Of course, the traffic redirection solution in the embodiment of the present application can also be used for other smart terminals with control functions other than vehicles, or be set in other smart terminals with control functions other than vehicles, or be set in components of the smart terminal. The smart terminal can be an intelligent transportation equipment, a robot, etc., for example, including but not limited to a smart terminal or a controller, chip or other components in a smart terminal.

[0168] In the embodiments of the present application, the traffic redirection device for implementing the traffic redirection solution may be a DoIP gateway, or a module or component of a DoIP gateway. The traffic redirection device described in the present application may also be, but is not limited to, a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), an augmented reality (AR), a virtual reality (VR) device, an in-vehicle device, a wearable device, an in-vehicle controller, an in-vehicle module, an in-vehicle module, an in-vehicle component, etc., as long as the traffic redirection device can implement the traffic redirection method described in any of the above embodiments. The embodiments of the present application are not limited to this.

[0169] See attached Figure 2 , Figure 2 This is a flow chart of the main steps of a traffic redirection method for a traffic redirection device according to an embodiment of the present application. Figure 2 As shown, the DoIP gateway traffic redirection method in the embodiment of the present application mainly includes the following steps S101 to S105.

[0170] Step S101: In response to the traffic redirection device receiving a service request message, it is determined whether traffic redirection is required for the service request data to be transmitted, the service request data to be transmitted is the data corresponding to the service request message, the initiator and the target receiving end of the service request message are both communicatively connected to the traffic redirection device, and the initiator and the target receiving end are communicatively connected through the traffic redirection device.

[0171] In this embodiment, the service request data to be transmitted is data corresponding to a service request message. The service request message includes data information about the service request data to be transmitted, such as the data size and data type. The initiator first sends a service request message containing the service request data to be transmitted to the traffic redirection device. After receiving the service request message, the traffic redirection device sends an acknowledgment message for the service request message to the initiator. In response to the acknowledgment message, the initiator sends a service request data transmission message, which transmits the service request data to the target receiving end based on the service request data transmission message. The service request data transmission message corresponds to the service request message and is used to transmit the service request data.

[0172] Taking the initiator as the diagnostic client and the target receiving end as the ECU as an example: the diagnostic client first sends a service request message with a service number of 0x34 to the ECU through the DoIP gateway of the traffic redirection device. The service number 0x34 indicates a request for download (Request Download). The service request message contains information such as the data size and data type of the corresponding service request data. Then, based on the service request message received by the DoIP gateway, the traffic redirection device confirms whether it is necessary to redirect the traffic of the service request data to be transmitted corresponding to the service request message. If the traffic redirection device confirms that the service request data needs to be redirected, the DoIP gateway of the traffic redirection device is used to return a confirmation message for the service request message to the diagnostic client. After receiving the confirmation message, the diagnostic client initiates a service request data transmission message with a service number of 0x36 to transmit the service request data to the target receiving end. The service number 0x36 indicates data transmission (Transfer Data).

[0173] In one implementation, the initiator of the service request message may be an external client, which may be a terminal device, such as a desktop computer, a portable computer, a handheld device, etc.

[0174] In one embodiment, the initiator of the service request message can also be the in-vehicle ECU. That is, if the external client does not actively initiate the service request message, the ECU can proactively initiate the service request message to the external client based on business needs. For example, if the business need is that the ECU needs to perform data analysis services through the client (e.g., the ECU's operating data or other related data needs to be analyzed by the external client), the ECU can act as the initiator and send the service request message to the client.

[0175] In one embodiment, the traffic redirection device may determine whether it is necessary to redirect the traffic of the service request data based on the data information of the service request data contained in the service request message, such as the data volume and data type. The traffic redirection device may also determine whether it is necessary to redirect the traffic of the service request data based on the size of the load of the traffic redirection device. The traffic redirection device may also determine the transmission duration of the service request data based on the data information of the service request data and the load of the traffic redirection device, and then determine whether it is necessary to redirect the traffic of the service request data based on the transmission duration. The traffic redirection device may also determine whether it is necessary to redirect the traffic of the service request data based on a combination of factors such as the data volume of the service request data, the transmission duration, and the load of the traffic redirection device.

[0176] In one embodiment, when determining whether it is necessary to perform traffic redirection on the service request data corresponding to the service request message based on at least one of the data volume of the service request data, the transmission duration of the service request data, and the load of the traffic redirection device, the data volume, the transmission duration, and the load of the traffic redirection device can be compared with their corresponding preset thresholds respectively. If they exceed their corresponding preset thresholds, it is determined that it is necessary to perform traffic redirection on the service request data corresponding to the service request message.

[0177] Step S102: In response to determining that traffic redirection is required, a confirmation message for the service request message is determined, and the traffic redirection device is used to send the confirmation message to the initiator, wherein the confirmation message includes a first destination address, so that the initiator sends a service request data transmission message to the first destination address, and the service request data transmission message corresponds to the service request message and is used to transmit service request data.

[0178] In one embodiment, the path conversion type corresponding to the service request data transmission message can be determined based on the service request message; and the first destination address can be determined based on the determined path conversion type. The path conversion type includes a transparent mode and a semi-transparent mode. In this application, it should be understood by those skilled in the art that "transparent" refers to the professional meaning in the field of communications and computer technology (i.e., "completely invisible"), and does not refer to the broad daily meaning (i.e., "completely open"). In this application, "semi-transparent" is relative to "transparent", and means that relative to being completely invisible, "semi-transparent" means that part is visible and part is invisible. Specifically in this embodiment, whether it is transparent mode or semi-transparent mode, when the initiator initiates a service request message to the DoIP gateway of the traffic redirection device, it only knows the address of the DoIP gateway, and does not know the address of the target receiving end of the service request message. After the initiator receives the confirmation message for the service request message returned by the DoIP gateway of the traffic redirection device, when preparing to send the service request data transmission message, in transparent mode, the initiator only knows the address of the DoIP gateway when sending the service request data transmission message, and does not know the real or virtual mapping address of the target receiving end. In other words, the real or virtual mapping address of the target receiving end is transparent to the initiator (that is, completely invisible). Therefore, the initiator can only send the service request data transmission message to the address of the DoIP gateway. In semi-transparent mode, compared with transparent mode, when sending the service request data transmission message, the initiator not only knows the address of the DoIP gateway, but also knows the virtual mapping address of the target receiving end. In other words, the real address of the target receiving end is invisible to the initiator, but the virtual mapping address is visible to the initiator. Therefore, the initiator can directly send the service request data transmission message to the virtual mapping address to realize service request data transmission. The virtual mapping address is not the real address of the target receiving end, but a temporary address dynamically allocated to the target receiving end by the traffic redirection device to implement the traffic redirection process after determining that the service request data traffic needs to be redirected.

[0179] In one embodiment, the traffic redirection device can determine the path conversion type corresponding to the service request data transmission message based on the communication mode type of the service request message. The communication mode type may include encrypted communication and non-encrypted communication. If the communication mode type of the service request message received by the traffic redirection device is non-encrypted communication, that is, the message is an unencrypted message, then it can be considered that the initiator belongs to a trustworthy device, and the initiator can be allowed to know the virtual mapping address of the target receiving end and directly send the service request data transmission message to the virtual mapping address. At this time, the path conversion type corresponding to the service request data transmission message can be determined as a semi-transparent mode; conversely, if the communication mode type of the service request message is encrypted communication, that is, the message is an encrypted message, then it is considered that the initiator belongs to an untrustworthy device, and the path conversion type corresponding to the service request data transmission message is determined as a transparent mode.

[0180] In one embodiment, the traffic redirection device may also determine the path conversion type corresponding to the service request data transmission message based on the security level of the initiating end. If the security level of the initiating end is high, such as higher than a preset security level threshold, or within the allowed security level range preset by the target receiving end, or within the security whitelist preset by the target receiving end, then the initiating end may be considered a trustworthy device, and the initiating end may be allowed to know the virtual mapping address of the target receiving end and directly send the service request data transmission message to the virtual mapping address. At this time, the path conversion type corresponding to the service request data transmission message may be determined as a semi-transparent mode; otherwise, the initiating end is considered an untrustworthy device, and the path conversion type corresponding to the service request data transmission message may be determined as a transparent mode. The security level of the initiating end may be determined by the traffic redirection device based on a security level table pre-stored by the target receiving end and constructed based on historical security data.

[0181] In one embodiment, the traffic redirection device may also determine the path conversion type corresponding to the service request data transmission message based on the security level of the initiating end and the communication mode type of the service request message. When the security level of the initiating end is high, such as above a preset security level threshold, or within the allowable security level range preset by the target receiving end, or within the security whitelist preset by the target receiving end, and the communication mode type of the service request message is unencrypted communication, the path conversion type corresponding to the service request data transmission message is determined to be semi-transparent mode; otherwise, it is determined to be transparent mode.

[0182] In one embodiment, determining the first destination address in the confirmation message based on the determined path switching type includes:

[0183] If the path conversion type corresponding to the service request data transmission message is determined to be transparent mode, the address of the DoIP gateway is used as the first destination address;

[0184] If the communication path conversion type corresponding to the service request data is determined to be semi-transparent mode, the virtual mapped address of the target receiving end is used as the first destination address. The mapped address is a unique temporary address dynamically allocated by the traffic redirection device to the target receiving end in response to the service request data requiring traffic redirection, for use in implementing traffic redirection.

[0185] In one embodiment of the present application, in response to determining that the path conversion type is a semi-transparent mode, the traffic redirection device dynamically allocates a mapping address for the target receiving end and creates a virtual communication path identifier, wherein the virtual communication path identifier represents a virtual communication path from the mapping address of the target receiving end to the real address of the target receiving end; and when the traffic redirection device sends a confirmation message of the service request message to the initiator, the virtual communication path identifier is sent to the initiator through the confirmation message, so that the initiator initiates a service request data transmission message to the mapping address corresponding to the virtual communication path identifier.

[0186] Step S103: In response to determining that traffic redirection is required, a resolution director is configured at at least one network node location between the initiator and the target receiver of the service request message, and the resolution director is configured to resolve the service request data transmission message and redirect the communication path of the service request data transmission message.

[0187] In this embodiment, if the traffic redirection device determines that traffic redirection of the service request data is required, a path conversion rule and a resolution program corresponding to the service request data transmission message can be constructed, wherein the path conversion rule is used to redirect the communication path of the service request data transmission message, and the path conversion rule corresponds to the path conversion type; the constructed path conversion rule and the resolution program are pre-stored in the resolution director, and the resolution director is deployed at at least one network node position between the service request message initiator and the target receiving end, so that when the service request data transmission message arrives at the network node position where the resolution director is located, the service request data transmission message is parsed based on the resolution director, and the communication path of the service request data transmission message is redirected based on the path conversion rule pre-stored in the resolution director, and the destination address of the communication path is converted from the first destination address to the real address of the target receiving end, and the source address is converted from the address of the initiator to the first destination address.

[0188] In one embodiment, in response to determining that traffic redirection is required, configuring a resolution director at at least one of the network node locations between the service request message initiator and the target receiver includes:

[0189] A parsing director is configured at at least one network node position between the service request message initiator and the target receiver, including an Ethernet switch, at least one protocol layer of a DoIP gateway, a NIC network card, and a driver of a DoIP gateway.

[0190] Please refer to the attached Figure 5 , Figure 5 1 is a schematic diagram of a deployment network location of a resolution director according to an embodiment of the present application. Figure 5 The dashed box in the middle represents the vehicle intranet, which includes the TCAM engine, DoIP gateway and ECU (only one ECU is shown in the figure, and other ECUs in the vehicle intranet are in the figure). Figure 5 not shown).

[0191] like Figure 5 As shown, the diagnostic client located in the external network is connected to the vehicle's internal network via WiFi or Bluetooth wireless communication. This is only an example of a communication connection method. The diagnostic client can also achieve communication connection with the vehicle's internal network through wired communication. In this embodiment, the initiator of the service request message is the diagnostic client, and the target receiving end is the vehicle ECU. There are multiple network node locations between the initiator and the target receiving end, such as Figure 5 E, F, C / D, B in the vehicle network (the location of other network nodes in the vehicle network is Figure 5 Not shown). Wherein, E is a TCAM engine deployed in an Ethernet switch, F is a port of the Ethernet switch, C / D is a NIC network card, and B is a network protocol processing layer of the DoIP gateway. In response to determining that traffic redirection is required, the traffic redirection device can deploy a resolution director at at least one network node position among E, F, C / D, and B, or it can be arranged at other network node positions between the initiator and the target receiving end, such as the TCP layer or TLS layer of the DoIP gateway. As long as the resolution director configured at the network node position can redirect the service request data transmission message before it is transmitted to the application layer of the DoIP gateway, it can ensure that the service request data transmission message does not need to be transmitted to the target receiving end via the DoIP gateway, that is, it can achieve traffic offloading to the DoIP gateway.

[0192] In this embodiment, the efficiency of DoIP gateway traffic offloading varies when the resolver is deployed at different network node locations. The closer the network node where the resolver is deployed is to the initiator, the more conducive it is to DoIP gateway traffic offloading. This is because after the service request data transmission message is transmitted from the initiator, it does not need to reach the DoIP gateway. Traffic redirection can be achieved at the resolver, and then the service request data is transmitted to the target receiving end based on the redirected communication path. The data transmission does not need to pass through the DoIP gateway and does not occupy the DoIP gateway's traffic resources.

[0193] At network nodes located far from the DoIP gateway, the efficiency of traffic offloading to the DoIP gateway varies depending on the functionality of each node, such as the configured computing power and traffic resources. For example, network node E, located at the Ethernet switch, is the most efficient network node for traffic transmission between the initiator and the client. This is because it is the closest network node to the initiator, service request data transmission messages do not need to reach the DoIP gateway, and the TCAM engine has high traffic resources and computing power. Therefore, if the resolver is deployed at E, traffic offloading to the DoIP gateway is most effective.

[0194] Although Figure 5 The resolution director is deployed in the network protocol processing layer of the DoIP gateway, but this is just an example. The resolution director can be deployed in any protocol layer of the DoIP gateway except the application layer. However, the lower the protocol layer is, the higher the efficiency of unloading the DoIP gateway traffic is, because once the service request data transmission message is transmitted to the protocol layer where the resolution director is deployed on the DoIP gateway, Figure 5 At the network protocol processing layer (B) shown in the figure, the transmission message is redirected by traffic at B, and then directly transmitted to the target receiving end based on the redirected communication path, without having to continue to be transmitted in the TCP, TLS, and UDS layers of the DoIP gateway, thereby effectively reducing the traffic resources occupied by the DoIP gateway.

[0195] In one embodiment, the network node location of the configuration parser director can be determined based on at least one of the functions of each network node location between the initiator and the target receiving end, the number of service request messages received by the traffic redirection device, the data type of the service request data corresponding to each service request message, the priority, the importance level, the data volume of the service request data, and the type of the target receiving end. The functions of each network node location may include the traffic transmission capacity, computing power, etc. of the network node location, as well as other additional functions. For example, for an Ethernet switch, the function of its network node location may include whether a TCAM engine is set. The data type of the service request data may be diagnostic data, FOTA service upgrade data, etc. The business requirement of the diagnostic data is to perform UDS diagnosis on the electronic control unit, and the business requirement of the FOTA service upgrade data is to perform program upgrades on the electronic control unit. It can also be service request data of other data types determined based on other business requirements, which is not limited in this application.

[0196] In one embodiment, the location of a network node for configuring a resolution director is determined based on the data type of the service request data. The priority and / or importance level of the service request data can be determined based on the data type of the service request data, and the location of the network node for the resolution director is further determined based on the priority and / or importance level. The priority and / or importance level of the service request data can be pre-set, or can be determined based on the data type of the service request data corresponding to all service request messages received by the DoIP gateway of the traffic redirection device within the current or preset time period to determine the priority and / or importance level of each service request data.

[0197] Taking the data type of the service request data as FOTA upgrade data as an example, if the FOTA upgrade data is pre-set with a higher priority and / or importance level, the parser director corresponding to the service request data can be deployed at the network node location that is most efficient for offloading DoIP gateway traffic, such as Figure 5At the TCAM engine of the Ethernet switch. If the FOTA upgrade data does not have a preset priority and / or importance level, but the service request message received by the DoIP gateway of the traffic redirection device in the current or preset time period also includes other service request data with preset priority and / or importance levels, or, although the FOTA upgrade data is set with a higher priority and / or importance level, the service request message received by the DoIP gateway in the current or preset time period also includes service request data with a higher priority and / or importance level than the FOTA upgrade data, then when configuring the network node position of the resolution director corresponding to each service request data, the resolution director of the service request data with a higher priority and / or importance level can be set at a network node position that is more efficient for unloading traffic to the DoIP gateway. The difference in traffic unloading efficiency of each network node position can be found in the above description and will not be repeated here. If the service request data of all service request messages received by the DoIP gateway in the current or preset time period are of preset priority and / or importance levels, the priority and / or importance level of each service request data is determined according to the current business needs, and then the network node position of the resolution director corresponding to each service request data is determined according to the priority and / or importance level. Among them, business needs may include UDS diagnosis of electronic control units, program upgrade of electronic control units, uploading data and files of electronic control units to diagnostic clients for offline analysis, etc.

[0198] In one embodiment, the network node location of the resolution director is determined based on the functions of each network node location between the initiator and the target receiving end, such as traffic transmission capacity, computing power capacity, or other additional functions. The traffic transmission capacity and computing power capacity can be preset capabilities, or they can be traffic transmission capacity and computing power capacity determined based on the current traffic resource conditions and computing power resource conditions. For example, if the Ethernet switch is a network node location with a TCAM engine, the resolution director can be deployed at this node location. However, if the Ethernet switch is a network node location without a TCAM engine, or if other resolution directors already exist at the TCAM engine of the Ethernet switch, or if the traffic resources at the TCAM engine of the Ethernet switch are relatively scarce, the resolution director can be deployed at other network node locations. When selecting other network node locations to deploy the resolution director, the traffic transmission capacity and computing power capacity of each network node location and the efficiency of each network node location for DoIP gateway traffic offloading as described above can also be comprehensively considered.

[0199] In one embodiment, the network node position of the resolution director can also be determined by comprehensively considering the data type of the service request data and the functional configuration of each network node position between the initiator and the target receiving end. For example, based on the data type of the service request data, the service request data with higher priority and / or importance level is determined. If a TCAM engine is provided in the Ethernet switch, the resolution director corresponding to the service request data with higher priority and / or importance level can be deployed on the Ethernet switch; for the service request data with lower priority and / or importance level, the resolution director corresponding to the service request data with lower priority and / or importance level can be deployed on a network node position with lower efficiency in unloading DoIP gateway traffic, such as a NIC network card, a network protocol processing layer of a DoIP gateway, etc. For example, if the Ethernet switch does not have a TCAM engine, or there are already other resolution directors at the TCAM engine of the Ethernet switch, or the traffic resources at the TCAM engine of the Ethernet switch are relatively tight, the resolution director corresponding to the service request data with higher priority and / or importance level can be deployed on the NIC network card (i.e. Figure 5 C / D), followed by the DoIP gateway internal protocol layer, such as the network protocol processing layer (i.e. Figure 5 B), when selecting the network node location, the deployment of other resolution directors at the network node location (for example, multiple resolution directors have been deployed at the network node location) and the usage of the network node's traffic resources and computing power resources can also be comprehensively considered.

[0200] The network node location of the resolution director can also be determined based on the data volume of the service request data and in combination with the functions of different network node locations, such as traffic transmission capacity and / or computing power. For example, for service request data with a large data volume, when the traffic resources of the TCAM engine of the Ethernet switch are relatively sufficient, the resolution director is preferentially deployed in the TCAM engine of the Ethernet switch. Similarly, if the Ethernet switch does not have a TCAM engine, or other resolution directors already exist at the TCAM engine of the Ethernet switch, deploying a new resolution director will cause the traffic resources of the TCAM engine to be tight, or the traffic resources at the TCAM engine of the Ethernet switch itself are relatively tight, then the resolution director can be deployed in the NIC network card (i.e. Figure 5 The resolution director is deployed at the C / D of the DoIP gateway, followed by the network protocol processing layer (i.e. Figure 5 Deploy the parsing director at B).

[0201] The following describes a method for configuring a resolution director when a DoIP gateway receives multiple service request messages sent by at least one initiator and determines that traffic redirection is required for all service request data corresponding to these service request messages.

[0202] When the DoIP gateway receives multiple service request messages sent by at least one initiator, if it is determined that traffic redirection is required for the service request data corresponding to these service request messages, communication path conversion rules and resolution programs for the corresponding service request data transmission messages are respectively constructed for the multiple service request messages, and the communication path conversion rules and resolution programs for the multiple service request data transmission messages are pre-stored in multiple different resolution directors, and the multiple resolution directors are respectively configured at at least one network node position between the initiator and the target receiving end. The multiple service request messages can be different service request messages from the same initiator within a time range, or different service request messages from different initiators.

[0203] In one embodiment, in the case where multiple resolution directors need to be configured, multiple resolution directors corresponding to multiple service request messages respectively can be deployed at different network node positions between the initiator and the target receiver.

[0204] In one embodiment, in case that multiple resolution directors need to be configured, multiple resolution directors corresponding to multiple service request messages may be deployed at the same network node location.

[0205] In one embodiment, in the case where traffic redirection is required for service request data corresponding to multiple service request messages, this can also be achieved by configuring a resolution director at a network node location. Path conversion rules and resolution programs for multiple service request data transmission messages are pre-stored in the resolution director, and resolution and traffic redirection of multiple different service request data transmission messages are achieved based on the resolution director. Wherein, when path conversion rules and resolution programs for multiple service request data transmission messages are pre-stored in the same resolution director, the priority of parsing and redirecting multiple service request data transmission messages can be pre-stored in the resolution director to clarify the priority of parsing and traffic redirecting multiple service request data transmission messages when multiple service request data transmission messages arrive at the resolution director at the same time.

[0206] In one embodiment, after the configuration position of the resolution director is determined according to the aforementioned embodiment, the configuration position can also be dynamically adjusted based on at least one of the functional changes in the positions of each network node between the initiator and the target receiving end, the changes in the number of service request messages received by the traffic redirection device, and the priority changes, importance level changes, and data size changes of the service request data corresponding to each service request message. For example, the current TCAM engine has deployed a first resolution director based on the first service request message, and redirects the traffic of the service request data transmission message corresponding to the first service request message. However, if the second service request message received by the DoIP gateway later contains service request data with a higher priority or importance level that needs to be redirected, then the first resolution director currently deployed at the TCAM engine can be adjusted to other network node locations (such as the NIC network card), and a second resolution director is configured at the network node location of the current TCAM engine. The second resolution director is used to parse and redirect the second service request data transmission message corresponding to the second service request message, so that the second service request data transmission message with a higher priority or importance level corresponding to the second service request message can be parsed and the communication path redirected preferentially at the TCAM engine. In this way, the dynamic adjustment of the network node location configured by the resolution director can be achieved to meet the traffic redirection requirements of different service data and improve data transmission efficiency.

[0207] It should be noted that there is no order between step S102 and step S103. Step S102 and S103 can be executed in any order or simultaneously. The scope of protection of the present invention should not be limited by the above specific implementation methods.

[0208] Step S104: In response to obtaining the service request data transmission message sent by the initiator to the first destination address at the at least one network node location configured with the resolution director, the communication path of the service request data transmission message is redirected using the resolution director, including: converting the destination address of the service request data transmission message from the first destination address to the real address of the target receiving end, and converting the source address of the service request data transmission message from the address of the initiator to the first destination address.

[0209] In one implementation of this embodiment, a service request data transmission message includes a destination address and a source address. Based on a path conversion rule pre-stored in the resolution director, the communication path of the service request data transmission message is redirected, including converting the destination address and source address of the transmission message communication path, wherein the destination address is converted from the first destination address before the redirection of the communication path to the real address of the target receiving end, and the source address is converted from the address of the initiator before the redirection of the communication path to the first destination address. For example, taking the initiator as a diagnostic client and the target receiving end as an in-vehicle ECU, after the initiator receives the first destination address sent by the traffic redirection device, the initiator sends a service request data transmission message to the first destination address. In this case, the source address of the service request data transmission message is the address of the diagnostic client, and the destination address is the first destination address sent by the traffic redirection device. After the communication path of the service request data transmission message is redirected based on the path conversion rule pre-stored in the resolution director, the source address of the redirected service request data transmission message is converted to the first destination address, and the destination address of the message is converted to the real address of the ECU.

[0210] In one implementation of this embodiment, if it is determined that the path conversion type corresponding to the service request data transmission message is a transparent mode, redirecting the communication path of the service request data transmission message by using the resolution director includes:

[0211] Utilizing the resolution director, converting the destination address of the service request data transmission message from the address of the DoIP gateway to the real address of the target receiving end;

[0212] The resolution director is used to convert the source address of the service request data transmission message from the address of the initiating end to the address of the DoIP gateway.

[0213] In one implementation of this embodiment, if it is determined that the path conversion type corresponding to the service request data transmission message is a semi-transparent mode, redirecting the communication path of the service request data transmission message by using the resolution director includes:

[0214] Utilizing the resolution director, converting the destination address of the service request data transmission message from the mapped address of the target receiving end to the real address of the target receiving end;

[0215] The resolution director is used to convert the source address of the service request data transmission message from the address of the initiating end to the mapping address of the target receiving end.

[0216] The following describes how to use the resolver director to redirect the communication path of the service request data transmission message when multiple network node locations between the initiator and the target receiver are configured with multiple resolvers.

[0217] As described in the aforementioned embodiment, if the traffic redirection device receives multiple service request messages, and the service request data corresponding to the multiple service request messages are all determined to require traffic redirection, multiple parsing directors for parsing and redirecting different service request data transmission messages can be configured at multiple network node locations between the initiator and the target receiving end, wherein the multiple service request data transmission messages correspond to the multiple service request messages, respectively, and the multiple parsing directors are pre-stored with parsing programs and first path conversion rules, respectively, and the parsing programs and first path conversion rules pre-stored in each parsing director are different. That is, the multiple parsing directors are configured to respectively parse the service request data transmission messages corresponding to different service request messages and redirect the communication paths of the service request data transmission messages.

[0218] At this time, for each service request data transmission message, when it is transmitted in the communication path between the corresponding initiator and the first destination address, if the network node position it currently arrives at is configured with a resolution director, it is necessary to determine whether the communication path of the service request data transmission message can be redirected based on the resolution director of the network node position it currently arrives at.

[0219] In one embodiment, a parsing program built into a resolution director at the network node location can parse the service request data transmission message to obtain the destination address of the transmission message. The parsed destination address is then matched with the first destination address in a first path conversion rule pre-stored in the resolution director. If the match is identical, it is determined that the communication path of the service request data can be redirected based on the resolution director at the network node location. If the match is different, it means that the first path conversion rule pre-stored in the resolution director of the network node position is not applicable to the service request data transmission message currently arriving at the network node position, and the communication path of the transmission message cannot be redirected by the resolution director of the current network node position. At this time, the service request data transmission message can be transmitted along the current communication path between the initiator and the destination address obtained by parsing the transmission message, and when it is transmitted to the next network node position with a resolution director configured on the current communication path, continue to determine whether the resolution director configured at the next network node position can redirect the service request data transmission message based on the aforementioned determination method of this embodiment. If so, redirect the service request data transmission message based on the resolution director configured at the next network node position. Otherwise, continue the aforementioned method of this embodiment and continue to transmit on the current communication path until the communication path of the transmission message can be redirected based on the resolution director configured at a network node position on the current communication path.

[0220] Step S105: transmitting the service request data transmission message to the target receiving end based on the redirected communication path of the service request data transmission message.

[0221] Based on the method described in steps S101 to S105 above, the present application can determine whether the service request data to be transmitted corresponding to the service request message received by the DoIP gateway requires traffic redirection without manual intervention. When it is determined that traffic redirection is required, the traffic redirection device returns a first destination address to the initiator, so that the initiator sends the service request data transmission message to the first destination address, and configures a resolver at at least one network node position between the initiator and the target receiving end of the service request message. The resolver is used to redirect the communication path of the service request data transmission message, so that the service request data does not need to be transmitted through the DoIP gateway, thereby reducing the traffic burden of the DoIP gateway and solving the bottleneck problem in the data transmission process of the DoIP gateway. Moreover, since the initiator initiates the service request data transmission message to the first destination address, data transmission from the initiator to the target receiving end can be achieved without exposing the address of the target receiving end to the initiator, which can effectively avoid exposing the real address of the target receiving end, thereby reducing the risk of attack on the target receiving end and ensuring higher security. The following is a further explanation of the path conversion rules constructed by the traffic redirection device and pre-stored in the resolver in conjunction with the embodiment.

[0222] In one implementation of this embodiment, in response to determining that traffic redirection of service request data is required, the traffic redirection device constructs and pre-stores a path conversion rule in the resolution director as a first path conversion rule, which includes a destination address conversion rule and a source address conversion rule, wherein the destination address conversion rule is used to convert the destination address of the service request data transmission message from the first destination address to the real address of the target receiving end, and the source address conversion rule is used to convert the source address of the service request data transmission message from the address of the initiating end to the first destination address.

[0223] In one embodiment, the first path conversion rule can be determined according to the path conversion type corresponding to the service request data transmission message, and the first destination address of the first path conversion rule corresponding to different path conversion types is different. Among them, the path conversion type corresponding to the service request data transmission message includes a transparent mode and a semi-transparent mode, and the path conversion type can be determined based on at least one of the security level of the initiating end and the communication mode type of the service request message. Please refer to the aforementioned embodiment for details and will not be repeated here. As described in the aforementioned embodiment, in transparent mode, the real or virtual mapping address of the target receiving end is transparent (i.e., completely invisible) to the initiating end, and the initiating end can only send a service request data transmission message to the address of the DoIP gateway. In semi-transparent mode, the real address of the target receiving end is invisible to the initiating end, but the virtual mapping address is visible to the initiating end, and the initiating end can directly send a service request data transmission message to the virtual mapping address. Therefore, the first destination address of the first path conversion rule determined in transparent mode is the address of the DoIP gateway, and the first destination address of the first path conversion rule determined in semi-transparent mode is the virtual mapping address of the target receiving end.

[0224] The following describes a specific process of constructing a first path conversion rule and redirecting a communication path of a service request data transmission message based on the first path conversion rule in the semi-transparent mode.

[0225] In semi-transparent mode, as described in the aforementioned embodiment, after determining that the service request data corresponding to the service request message needs to be redirected, the traffic redirection device will dynamically allocate a mapping address for implementing traffic redirection to the target receiving end, and create a virtual communication path identifier. The virtual communication path identifier represents the virtual communication path from the mapping address of the target receiving end to the real address of the target receiving end. The traffic redirection device uses the DoIP gateway to feed back the mapping address of the target receiving end as the first destination address to the initiator of the service request message, and constructs a first path conversion rule. The first path conversion rule includes a destination address conversion rule that converts the mapping address of the target receiving end corresponding to the virtual communication path identifier as the first destination address at this time into the real address of the target receiving end, and may also include a source address conversion rule that converts the address of the initiator of the service request data transmission message into the service request data transmission message of the first destination address. The destination address and the source address both include an IP address, a link address, and a port address.

[0226] The traffic redirection device pre-stores the first path conversion rule in the resolution director, and configures the resolution director at at least one network node position between the initiator and the target receiving end. After the initiator obtains the mapping address of the target receiving end, it will use the mapping address of the target receiving end as the destination address of the initial communication path of the service request data transmission message, and send the service request data transmission message to the mapping address. When the service request data transmission message arrives at the network node position where the resolution director is deployed, the resolution director can redirect the initial communication path of the service request data transmission message according to the pre-stored first path conversion rule, convert the destination address of the initial communication path from the mapping address of the target receiving end (at this time, the mapping address is used as the first destination address) to the real address of the target receiving end, and can also convert the source address of the initial communication path from the address of the initiator to the mapping address of the target receiving end (because at this time the mapping address is used as the first destination address, and the source address conversion rule in the first path conversion rule can convert the source address of the service request data transmission message from the address of the initiator to the first destination address), and transmit the service request data to the real address of the target receiving end based on the redirected communication path.

[0227] In one implementation, a temporary address, ie, a mapped address, may be dynamically allocated to the target receiving end through the Dynamic Host Configuration Protocol (DHCP).

[0228] In semi-transparent mode, the communication path of the service request data transmission message is redirected based on the first path conversion rule pre-stored in the resolver director, which not only helps to unload the data traffic of the DoIP gateway, but also because the initiator does not know the real address of the target receiving end, and the mapped address of the target receiving end is only a temporary address, this can reduce the risk of the target receiving end being attacked and improve security.

[0229] Furthermore, in semi-transparent mode, the service request data in the service request data transmission message sent by the initiator can be either encrypted or unencrypted. This is because in semi-transparent mode, the destination address of the service request data transmission message sent by the initiator is a temporary virtual mapping address dynamically assigned by the traffic redirection device to the target receiving end as the first destination address. The service request data transmission message is transmitted directly from the initiator to this dynamically assigned temporary virtual mapping address, which is an end-to-end transmission. In this case, the communication path of the service request data transmission message can be considered secure, and the service request data sent by the initiator can be unencrypted.

[0230] Furthermore, in semi-transparent mode, if the initiator sends encrypted service request data, then the parser director can only parse the service request data transmission message and redirect the communication path, and the encrypted service request data in the transmission message will not be decrypted. The decryption of the service request data can wait until the service request data is transmitted to the target receiving end via the redirected service request data transmission message communication path, and the target receiving end will implement the decryption of the service request data. This can effectively reduce the computing power load of the parser director in the decryption process.

[0231] The following describes a specific process of constructing a first path conversion rule and redirecting a communication path of a service request data transmission message based on the first path conversion rule in transparent mode.

[0232] In transparent mode, a first path conversion rule can be constructed based on the network IP protocol layer (L3), transport layer (L4), and application layer (L7) to convert the DoIP gateway address to the real address of the target receiving end. This allows the destination address of the initial communication path of the resolved service request data transmission message to be modified from the DoIP gateway address to the real address of the target receiving end based on the network IP protocol layer, transport layer, and application layer. The destination address conversion includes IP address conversion, link conversion, and interface address conversion.

[0233] Specifically, as described in the aforementioned embodiment, in transparent mode, the destination address of the initial communication path of the service request data transmission message is the address of the DoIP gateway as the first destination address. After receiving the service request message, it is determined that it needs to redirect traffic, then a first path conversion rule can be constructed based on L3, L4 and L7 information, and the first path conversion rule and the resolution program are pre-stored in the resolution director, and the resolution director is deployed at a network node position between the initiator and the target receiving end. The initiator sends a service request data transmission message to the DoIP gateway. When the service request data transmission message arrives at the network node position where the resolution director is deployed, the resolution director is used to parse the service request data transmission message, and based on the first path conversion rule, the destination address of the resolved service request data transmission message communication path is converted from the address of the DoIP gateway to the real address of the target receiving end, and the source address of the resolved service request data transmission message communication path is converted from the address of the initiator to the address of the DoIP gateway. Among them, the conversion of the destination address and the source address includes the conversion of the IP address, link address and interface address. Specifically, the destination address of the service request data transmission path is converted from the IP address, link, and interface addresses of the DoIP gateway to the IP address, link, and interface addresses of the target receiving end, and the source address is converted from the IP address, link, and interface addresses of the initiating end to the IP address, link, and interface addresses of the DoIP gateway. This allows the service request data to be accurately transmitted to the target receiving end without passing through the DoIP gateway, effectively reducing the traffic burden on the DoIP gateway.

[0234] In transparent mode, as described in the aforementioned implementation, the real address of the target receiving end is transparent to the initiator. The initiator does not know the real address of the target receiving end, nor does it know the mapped address of the target receiving end. The destination address (i.e., the first destination address) of the initial communication path for the service request data transmission message initiated by the initiator is the DoIP gateway. The initiator actually only communicates with the DoIP gateway during the service request data transmission. This eliminates the need to expose the real address of the target receiving end to the initiator, and maintains a common and consistent DoIP gateway as the external interface of the target receiving end, facilitating unified security management and risk control, and effectively ensuring the security of the target receiving end.

[0235] After the target receiving end receives the service request data, the target receiving end can return a response data transmission message to the initiator of the service request message, wherein the response data is the data returned by the target receiving end to the initiator in response to the received service request data, and the response data transmission message corresponds to the service request data transmission message and is used to transmit the response data.

[0236] The redirection of the response data transmission message is described below with reference to an embodiment.

[0237] As described in the aforementioned embodiment, before the communication path of the service request data transmission message is redirected, the source address of the service request data transmission message sent by the initiator is the address of the initiator, and the destination address is the first destination address, which is determined by the traffic redirection device and sent to the initiator; after the redirection, the source address of the service request data transmission message is converted to the first destination address, and the destination address is converted from the first destination address to the real address of the target receiving end (for the redirection of the communication path of the service request data transmission message, please refer to the aforementioned embodiment and will not be repeated here). Therefore, when the target receiving end receives the service request data based on the communication path of the service request data transmission message after the redirection, and returns the response data corresponding to the service request data, the initial destination address of the response data transmission message it initiates is the first destination address of the service request data transmission message sent at this time after the communication path of the service request data transmission message is redirected.

[0238] In order to avoid the DoIP gateway traffic burden caused by transmitting response data and to promptly unload the DoIP gateway traffic, the traffic redirection device of the present application is further configured to parse the response data transmission message and redirect the communication path of the response data transmission message for the response data transmission message. The traffic redirection device constructs a second path conversion rule for redirecting the communication path of the response data transmission message and pre-stores the second path conversion rule in the resolution director. The resolution director is the resolution director in the aforementioned embodiment that pre-stores the first path conversion rule, and the first path conversion rule is used to redirect the communication path of the service request data transmission message corresponding to the response data.

[0239] If the traffic redirection device obtains a response data transmission message sent by the target receiving end to the first destination address at the at least one network node location configured with the resolution director, the communication path of the response data transmission message is redirected based on the second path conversion rule pre-stored in the resolution director of the network node location, including: converting the destination address of the response data transmission message from the first destination address to the address of the initiating end, and converting the source address of the response data transmission message from the real address of the target receiving end to the first destination address; and based on the communication path of the redirected response data transmission message, transmitting the response data to the initiating end.

[0240] In one embodiment, the second path conversion rule includes a destination address conversion rule and a source address conversion rule, wherein the destination address conversion rule is used to convert the destination address of the response data transmission message from the first destination address to the destination address of the initiator, and the source address conversion rule is used to convert the source address of the response data transmission message from the real address of the target receiving end to the first destination address. By converting the source address and destination address of the response data transmission message through the second path conversion rule, not only can the data transmission not pass through the DoIP gateway, thereby reducing the DoIP gateway traffic; but also when the response data is transmitted to the initiator based on the response data transmission message after the communication path is changed, the initiator only knows the changed source address of the response data transmission message, that is, the first destination address, and does not know the real address of the target receiving end that initiated the response data transmission message, thereby avoiding the exposure of the target receiving end address and reducing the risk of the target receiving end being attacked.

[0241] Like the first path conversion rule applied to the service request data, the second path conversion rule applied to the response data transmission message is also determined based on the path conversion rule type (semi-transparent mode and transparent mode) corresponding to the service request data.

[0242] The following describes the specific processes of constructing the second path conversion rule and redirecting the communication path of the response data transmission message based on the second path conversion rule in the semi-transparent mode and the transparent mode respectively.

[0243] In semi-transparent mode, the destination address of the response data transmission message (i.e., the first destination address) is the mapping address corresponding to the target receiving end, and in response to the received service request data, the target receiving end sends a response data transmission message to the mapping address. In response to obtaining the response data transmission message sent by the target receiving end to the mapping address at the network node position configured with the resolution director, based on the second path conversion rule pre-stored by the resolution director, the destination address of the response data transmission message is converted from the mapping address to the address of the initiator (i.e., from the first destination address to the destination address of the initiator); and the source address of the response data transmission message is converted from the real address of the target receiving end to the mapping address (i.e., from the real address of the target receiving end to the first destination address) to avoid the real address of the target receiving end from being exposed during the transmission of the response data, thereby improving security. At the same time, in semi-transparent mode, the response data can be encrypted or unencrypted. If it is encrypted response data, the decryption process of the response data can be completed by the initiator. For semi-transparent mode, after the response data is transmitted to the initiator based on the redirected communication path, the mapping address corresponding to the virtual communication path identifier can be discarded to release the redirected communication path. Among them, releasing the communication path after redirection means that the path conversion rules and resolution programs for the response data, as well as the path conversion rules and resolution programs for the service request message are removed, and the resolution director pre-stored with the above-mentioned path conversion rules and resolution programs is released, and the functions of redirecting the service request data transmission message communication path and redirecting the response data transmission message communication path are no longer implemented. If a service request message of the same type of service request data appears, it is necessary to re-determine whether to redirect the traffic of the service request data based on the method described in the above embodiment, and in response to the need for traffic redirection, reconstruct the corresponding path conversion rules and resolution programs, and reconfigure the resolution director, and redirect the communication path based on the resolver.

[0244] The following describes a specific process of constructing a second path conversion rule and redirecting a communication path of a response data transmission message based on the second path conversion rule in transparent mode.

[0245] In transparent mode, the destination address of the response data transmission message (i.e., the first destination address) is the address of the DoIP gateway. In response to the received service request data, the target receiving end sends a response data transmission message to the DoIP gateway address. In response to obtaining the response data transmission message sent by the target receiving end to the DoIP gateway address at the network node location configured with the resolution director, based on the second path conversion rule pre-stored by the resolution director, the destination address of the response data transmission message is converted from the DoIP gateway address to the address of the initiating end (i.e., from the first destination address to the destination address of the initiating end); and the source address of the response data transmission message is converted from the real address of the target receiving end to the DoIP gateway address (i.e., from the real address of the target receiving end to the first destination address), so as to avoid the real address of the target receiving end from being exposed during the transmission of the response data and improve security.

[0246] In one embodiment, after the response data is transmitted to the initiator based on the redirected communication path of the response data transmission message, the redirected communication path of the response data transmission message may be released.

[0247] The following combination Figure 3 、 Figure 4 and Figure 6 , taking the initiator as the diagnostic client, the target receiving end as the vehicle's electronic control unit (ECU), and the service request message as the diagnostic service request message as an example, the traffic redirection method of this application is further explained. Figure 3 and Figure 4 It is used to illustrate the method of implementing traffic redirection based on a resolution director when there are multiple diagnostic service request messages. Figure 6 It is used to illustrate that when there is a diagnostic service request message, a traffic redirection method is implemented based on a resolution director.

[0248] like Figure 3 and Figure 4 As shown, the diagnostic client is located in the vehicle's external network and communicates with the vehicle's internal network ( Figure 3 and Figure 4 The DoIP gateway, multiple DoIP entities (in-vehicle ECUs), and the resolver are located in the in-vehicle network. Multiple ECUs form the vehicle-mounted system. The diagnostic client and ECUs communicate with the DoIP gateway separately. The diagnostic client connects to the vehicle-mounted system (each ECU) through the DoIP gateway, and service request messages are transmitted along the communication path between the diagnostic client and the DoIP gateway.

[0249] When it is determined that traffic redirection of multiple service request data is required, the communication path of the service request data transmission message is redirected through a resolution director deployed at a network node between the diagnostic client and the ECU corresponding to the diagnostic service request, and the service request data is transmitted to the corresponding ECU based on the redirected communication path.

[0250] It should be noted that Figure 3 and 4 The number of resolvers and the configured network node locations are only examples and not limitations. As described in the aforementioned embodiment, the configuration location of the resolver can be determined based on the functions of the positions of the various network nodes between the initiator and the target receiving end of the service request message, the number of service request messages received by the DoIP gateway, the data type of the service request data corresponding to each of the service request messages, the priority, importance level, data size, and at least one of the type of the target receiving end of the service request data.

[0251] In the case where a resolution director redirects the service request data transmission message communication paths corresponding to multiple different service request messages, the service request data corresponding to the multiple different service request messages can realize the redirection of the service request data transmission message communication paths through a multiple-channel demultiplexing method, and then be transmitted to their corresponding target receiving ends respectively through multiple different redirected communication paths. The response data corresponding to multiple different service request messages can also realize the redirection of the response data transmission message communication paths through a multiplexed method, and then be transmitted to their corresponding initiating ends based on multiple different redirected communication paths. Specifically, in transparent mode, the resolution director is responsible for modifying the destination address of each service request data transmission message from the address of the DoIP gateway to the real address of the ECU, and the source address from the address of the initiating end to the address of the DoIP gateway according to the first path conversion rule, and then sending the service request data transmission message to the corresponding ECU, thereby realizing the demultiplexing of the service request data corresponding to multiple service request messages.

[0252] In semi-transparent mode, the parser director is responsible for converting the destination address of each service request data transmission message from the mapping address corresponding to the virtual communication path identifier to the real address of the ECU according to the first path conversion rule, and after modifying the source address from the address of the initiator to the mapping address, sending the service request data transmission message to the corresponding ECU, thereby realizing demultiplexing of the service request data corresponding to multiple service request messages.

[0253] For the response data corresponding to multiple service request messages, in transparent mode, multiple ECUs send the response data to the DoIP gateway address. When the response data arrives at the network node location where the resolution director is deployed, the resolution director converts the destination addresses of the multiple response data from the DoIP gateway address to the address of the diagnostic client according to the second path conversion rule, and converts the source address from the real address of the ECU to the DoIP gateway address, thereby realizing the multiplexing of multiple response data.

[0254] In semi-transparent mode, when the response data arrives at the network node location where the resolver director is deployed, the resolver director converts the destination addresses of multiple response data from the mapping addresses corresponding to the virtual communication path identifiers to the addresses of the diagnostic client according to the second path conversion rule, and converts the source addresses from the real addresses of the ECU to the mapping addresses, thereby realizing multiplexing of multiple response data.

[0255] The following is combined with Figure 3 For explanation. Figure 3 As shown, the CDF DoIP entity, the ADF DoIP entity, and the ZONE FL DoIP entity are all connected to the DoIP gateway for communication. Figure 3There are three service request messages, namely diagnostic service request messages for the three ECUs ADF, CDF, and ZONE. The path conversion type of the service request data transmission messages corresponding to the three service request messages is all in semi-transparent mode (the determination of the path conversion type corresponding to the service request data transmission message is described in the previous embodiment and will not be repeated here). Multiple service request messages can reach the diagnostic client through different communication paths. That is, each service request message reaches the diagnostic client through a communication path that is different from other service request messages. The three service request messages are sent to the DoIP gateway through the diagnostic client. Since the path conversion types of the service request data transmission messages corresponding to the three service request messages are all in semi-transparent mode, when it is determined that the service request data corresponding to the three service request messages need to be redirected, multiple virtual communication path identifiers are created. The multiple virtual communication path identifiers respectively represent the virtual communication paths from the mapping addresses of ADF, CDF, and ZONE to their real addresses; and a first path conversion rule and a resolution program are constructed to convert the mapping addresses of the virtual communication path identifiers into the real addresses of ADF, CDF, and ZONE. A resolution director is configured at the network node position between the diagnostic client and the above-mentioned ECU, and the mapping address of the virtual communication path identifier is sent to the diagnostic client using the DoIP gateway. The diagnostic client uses the mapping address as the destination address of the initial communication path of the service request data transmission message and sends the service request data transmission message to the DoIP gateway. When the service request data transmission message arrives at the network node position where the resolution director is located, the resolution director can convert the destination address of the service request data transmission message that needs to be redirected from the mapping address of the virtual communication path identifier to the corresponding ECU (that is, Figure 3 The source address is converted from the diagnostic client address to the mapping address constructed for each service request data transmission message, thereby realizing the communication path redirection of each service request data transmission message (such as Figure 3 As shown by the dotted lines in the middle, the virtual communication paths from the resolution director to the CDF DoIP entity, the ADF DoIP entity, and the ZONE FL DoIP entity are used to transmit the service request data to the corresponding ECU based on each redirected virtual communication path.

[0256] The following is combined with Figure 4 For explanation. Figure 4As shown, the CDF DoIP entity, the ADF DoIP entity, and the ZONE FLDoIP entity are all connected to the DoIP gateway. The service request messages of CDF and ZONE reach the diagnostic client through the same communication path, and the service request message of ADF reaches the diagnostic client through another communication path. The diagnostic client sends diagnostic service request messages for the three ECUs, ADF, CDF, and ZONE, to the DoIP gateway. Because the path conversion type corresponding to the service request data transmission messages of CDF and ZONE is transparent mode, and the path conversion type corresponding to the service request data of ADF is semi-transparent mode (the determination of the path conversion type corresponding to the service request data transmission message refers to the aforementioned embodiment and will not be repeated here), the initial destination address of the service request data transmission message sent by the diagnostic client corresponding to the service request messages of CDF and ZONE is the DoIP gateway, and the initial destination address of the service request data transmission message sent by the diagnostic client corresponding to the service request message of ADF is the mapping address of the ADF DoIP entity. When the diagnostic client sends a service request data transmission message corresponding to the service request message of ADF, CDF and ZONE to the DoIP gateway, when the service request data transmission message is transmitted to the network node where the resolution director is located, the resolution director converts the destination address of the service request data transmission message corresponding to the service request message of CDF and ZONE that needs to be redirected from the DoIP gateway address to the corresponding ECU real address (that is, Figure 4 The source address is converted from the diagnostic client address to the DoIP gateway address; the destination address of the service request data transmission message corresponding to the ADF service request message that needs to be redirected is converted from the mapped address of the ADF DoIP entity to the real address of the ADF DoIP entity, and the source address is converted from the diagnostic client address to the mapped address of the ADF DoIP entity, thereby realizing the communication path redirection of each service request data transmission message (such as Figure 4 As shown by the dotted lines in the middle, the virtual communication paths from the resolution director to the CDF DoIP entity, the ADF DoIP entity, and the ZONE FL DoIP entity are used to transmit the service request data to the corresponding ECU based on each redirected virtual communication path.

[0257] The following combination Figure 6 , when the traffic redirection device is a DOIP gateway, the process of traffic redirection performed by the DoIP gateway is exemplified.

[0258] Figure 6 The figure shows the process of DoIP gateway redirecting traffic in semi-transparent mode. Figure 6The diagnostic client is the initiator, the in-vehicle ECU Z is the target receiver, and the traffic redirection device is the DoIP gateway. Figure 6 As shown, the diagnostic client needs to transmit service request data TAZ to ECU Z. First, the diagnostic client can send a service request message corresponding to TAZ to the DoIP gateway. The service request message includes the address IPX of the DoIP gateway and the service port (TCP Port) Service Y. The DoIP gateway determines whether it is necessary to redirect the service request data (i.e., TAZ) corresponding to the service request message based on the service request message. After determining that traffic redirection is required, the DoIP gateway will create a mapping address (i.e., IPY') of the target receiving end ECU Z; at the same time, the DoIP gateway will create a path conversion rule (including a first path conversion rule for the service request data transmission message and a second path conversion rule for the response data transmission message) and a resolution program. The DoIP gateway pre-stores the path conversion rule and the resolution program in the resolution director and deploys the resolution director at the network node between the diagnostic client and ECU Z. Afterwards, the DoIP gateway will return a confirmation message of the service request message to the diagnostic client and return the mapping address IPY' of ECUZ to the diagnostic client.

[0259] The specific process of transmitting the service request data to ECU Z is as follows: the diagnostic client uses IPY' as the destination address of the initial communication path of the service request data TAZ transmission message, and sends a service request data transmission message containing the service request data TAZ to IPY'. When the service request data transmission message arrives at the network node where the resolution director is located, the resolution director converts the destination address of the communication path of the service request data transmission message from the mapped address IPY' of ECU Z to the real address IPZ of ECU Z according to the first path conversion rule, and converts the source address from the address IP OBD of the diagnostic client to the mapped address IPY' of ECUZ, so that the service request data TAZ can be transmitted to ECU Z based on the redirected communication path. After receiving the service request data TAZ, ECU Z sends a response data transmission message to return the response data of the service request data TAZ. The destination address of the initial communication path of the response data transmission message is the mapped address IPY' of the real address of ECU Z. When the response data transmission message arrives at the network node of the resolver, the resolver, based on the second path conversion rule, converts the destination address of the response data transmission message's communication path from ECU Z's mapped address IPY' to the diagnostic client's IP OBD address, and converts the source address from ECU Z's real address IPZ to ECU Z's mapped address IPY', so that the response data is transmitted to the diagnostic client via the redirected communication path. Once the service request data and the corresponding response data have been transmitted, the resolver and path conversion rule can be removed to release the redirected communication path (not shown in the figure).

[0260] On the other hand, the present application also provides a traffic redirection method applied to a terminal, wherein the terminal is communicatively connected to a traffic redirection device implementing the aforementioned embodiment of the present application, and the traffic redirection device includes a DoIP gateway.

[0261] See attached Figure 7 , Figure 7 FIG. 1 is a flow chart showing the main steps of a traffic redirection method applied to a terminal according to an embodiment of the present application. Figure 7 As shown, the DoIP gateway traffic redirection method in the embodiment of the present application mainly includes the following steps S201 to S203.

[0262] Step S201: Send a service request message to the traffic redirection device, wherein the service request message includes data information of the service request data to be transmitted, and the target receiving end of the service request message is connected to the terminal through the traffic redirection device.

[0263] In one embodiment, the data information of the service request data includes data size and data type. By executing step S201, the traffic redirection device can determine whether traffic redirection is required for the service request data corresponding to the service request message based on at least one of the data information in the service request message received by the traffic redirection device, a transmission duration of the service request data, and a load on the traffic redirection device. The transmission duration of the service request data is determined by the redirection device based on the data information of the service request data and the load on the traffic redirection device.

[0264] Step S202: Receive a confirmation message of the service request message sent by the traffic redirection device, the confirmation message including a first destination address, which is the initial destination address of the service request data transmission message determined by the traffic redirection device in response to the need for traffic redirection of the service request data to be transmitted, and the service request data transmission message corresponds to the service request message and is used to transmit the service request data to be transmitted.

[0265] In one embodiment, after the traffic redirection device determines that traffic redirection is required, it will use the traffic redirection device to send a confirmation message for the service request message to the terminal, and the confirmation message contains the first destination address determined by the traffic redirection device. As described in the aforementioned embodiment, the first path address corresponds to the path conversion rule type corresponding to the service request data. If the path rule conversion type corresponding to the service request data is a transparent mode, the first destination address in the confirmation message returned by the DoIP gateway is the address of the DoIP gateway; if the path rule conversion type corresponding to the service request data is a semi-transparent mode, the first destination address in the confirmation message returned by the DoIP gateway is the mapping address of the target receiving end of the service request message. The method for determining the path rule conversion type corresponding to the service request data and the method for confirming the first destination address are the same as those described in the aforementioned embodiment and will not be repeated here.

[0266] Step S203: Initiate the service request data transmission message to the first destination address, so that the traffic redirection device redirects the communication path of the service request data transmission message, and transmits the service request data to the target receiving end based on the redirected communication path.

[0267] In one embodiment, in semi-transparent mode, the terminal sends a service request data transmission message to the DoIP gateway address so that the traffic redirection device redirects the communication path of the service request data transmission message. The specific redirection method is shown in the above embodiment and will not be repeated here.

[0268] In one embodiment, in transparent mode, the terminal sends a service request data transmission message to the virtual mapping address of the target receiving end, so that the traffic redirection device redirects the communication path of the service request data transmission message. For the specific redirection method, please refer to the above embodiment and will not be repeated here.

[0269] In one embodiment, Figure 7 As shown, the traffic redirection method applied to the terminal further includes step S204.

[0270] Step S204: Obtain response data sent by the target receiving end, wherein the response data is data returned by the target receiving end to the terminal in response to the received service request data, and the response data is transmitted to the terminal based on the response data transmission message communication path redirected by the traffic redirection device, and the response data transmission message corresponds to the service request data transmission message and is used to transmit the response data.

[0271] In one embodiment, the terminal is a diagnostic client, the smart device is a vehicle, the target receiving end is an in-vehicle ECU, and the service request message is a diagnostic request message for diagnosing the in-vehicle ECU.

[0272] Another aspect of the present application provides an intelligent device, comprising a traffic redirection device that implements the traffic redirection method of any embodiment of the present application. The intelligent device described herein may be a driving device, a smart car, a robot, or other similar device. It may also be a device with control functions within a vehicle, including but not limited to an onboard terminal, an onboard controller, an onboard module, an onboard module, an onboard component, or other intelligent terminal with control functions other than a vehicle. The intelligent terminal may be an intelligent transportation device, a robot, or the like.

[0273] The traffic redirection device described in this application includes at least one processor and a memory in communication with the at least one processor; wherein the memory stores a computer program, and when the computer program is executed by the at least one processor, the traffic redirection method applied to the traffic redirection device described in any of the above embodiments is implemented. Figure 8 , Figure 8 exemplarily shows that the memory 11 and the processor 12 are communicatively connected via a bus.

[0274] Another aspect of the present application also provides a terminal, which includes at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program, and when the computer program is executed by the at least one processor, it implements the traffic redirection method applied to the terminal as described in any of the aforementioned embodiments.

[0275] The terminal device of the present application may be, but is not limited to, a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), an augmented reality (AR), a virtual reality (VR) device, or a wearable device, as long as the traffic redirection device can implement the traffic redirection method for the terminal described in any of the above embodiments. The embodiments of the present application are not limited to this.

[0276] The traffic redirection device and terminal device described in this application may include multiple memories and multiple processors. The program for executing the method of the above method embodiment can be divided into multiple subroutines, and each subroutine can be loaded and run by a processor to execute different steps of the above method embodiment. Specifically, each subroutine can be stored in different memories, and each processor can be configured to execute the programs in one or more memories to jointly implement the traffic redirection method of the above method embodiment, that is, each processor executes different steps of the traffic redirection method of the above method embodiment to jointly implement the traffic redirection method of the above method embodiment.

[0277] The multiple processors may be deployed on the same device. For example, the traffic redirection device may be a high-performance device composed of multiple processors, and the multiple processors may be processors configured on the high-performance device. Furthermore, the multiple processors may be deployed on different devices. For example, the traffic redirection device may be a server cluster, and the multiple processors may be processors on different servers in the server cluster.

[0278] The processors mentioned above may include but are not limited to: CPU, Network Processor (NP), Digital Signal Processing (DSP), Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0279] It should be pointed out that although the various steps in the above embodiments are described in a specific order, those skilled in the art will understand that in order to achieve the effect of the present application, different steps do not have to be performed in such an order. They can be performed simultaneously (in parallel) or in other orders. These adjusted solutions are equivalent to the technical solutions described in this application, and therefore will also fall within the scope of protection of this application.

[0280] It will be understood by those skilled in the art that all or part of the processes in the method for implementing the above embodiment of the present application can also be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, it can implement the steps of the above-mentioned various method embodiments. The computer program includes computer program code, which can be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium may include: any entity or device, medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory, random access memory, electric carrier signal, telecommunication signal and software distribution medium, etc. that can carry the computer program code.

[0281] Thus far, the technical solutions of the present application have been described in conjunction with the embodiments shown in the accompanying drawings. However, it is readily understood by those skilled in the art that the scope of protection of the present application is obviously not limited to these specific embodiments. Without departing from the principles of the present application, those skilled in the art may make equivalent changes or substitutions to the relevant technical features, and the technical solutions after such changes or substitutions will fall within the scope of protection of the present application.

Claims

1. A traffic redirection method, applied to a traffic redirection device, characterized in that: The traffic redirection device includes a DoIP gateway, and the method includes: In response to the traffic redirection device receiving the service request message, determining whether traffic redirection is required for service request data to be transmitted, the service request data to be transmitted being data corresponding to the service request message, an initiator and a target receiver of the service request message both being communicatively connected to the traffic redirection device, and the initiator and the target receiver being communicatively connected via the traffic redirection device; In response to determining that the traffic redirection is required, determining a confirmation message for the service request message, and sending the confirmation message to the initiator using the traffic redirection device, wherein the confirmation message includes a first destination address, so that the initiator sends a service request data transmission message to the first destination address, wherein the service request data transmission message corresponds to the service request message and is used to transmit the service request data to be transmitted; In response to determining that the traffic redirection is required, configuring a parsing director at at least one network node between the initiating end and the target receiving end, the parsing director being configured to parse the service request data transmission message and redirect a communication path of the service request data transmission message; In response to obtaining, at the at least one network node where the resolution director is configured, the service request data transmission message sent by the initiator to the first destination address, redirecting the communication path of the service request data transmission message using the resolution director, including: translating the destination address of the service request data transmission message from the first destination address to the real address of the target receiving end, and translating the source address of the service request data transmission message from the address of the initiator to the first destination address; The service request data transmission message is transmitted to the target receiving end based on the redirected communication path of the service request data transmission message.

2. The traffic redirection method according to claim 1, characterized in that: The method further comprises: Determining that the path conversion type corresponding to the service request data transmission message is a transparent mode; Based on the determined path conversion type, determining that the first destination address in the confirmation message is an address of the DoIP gateway; Redirecting the communication path of the service request data transmission message by using the resolution director includes: Utilizing the resolution director, converting the destination address of the service request data transmission message from the address of the DoIP gateway to the real address of the target receiving end; The resolution director is used to convert the source address of the service request data transmission message from the address of the initiating end to the address of the DoIP gateway.

3. The traffic redirection method according to claim 1, wherein: The method further comprises: Determining that the path conversion type corresponding to the service request data transmission message is a semi-transparent mode; Determine a mapping address of the target receiving end, and use the mapping address of the target receiving end as the first destination address in the confirmation message; Redirecting the communication path of the service request data transmission message by using the resolution director includes: Utilizing the resolution director, converting the destination address of the service request data transmission message from the mapped address of the target receiving end to the real address of the target receiving end; The resolution director is used to convert the source address of the service request data transmission message from the address of the initiating end to the mapping address of the target receiving end.

4. The traffic redirection method according to claim 2, wherein: The determining of the path conversion type corresponding to the service request data transmission message includes: Based on the security level of the initiator and / or the communication mode type of the service request message, a path conversion type corresponding to the service request data transmission message is determined, where the communication mode type includes encrypted communication and non-encrypted communication.

5. The traffic redirection method according to claim 3, wherein: The method further comprises: In response to determining that the path conversion type is a semi-transparent mode, creating a virtual communication path identifier, wherein the virtual communication path identifier represents a virtual communication path from the mapped address of the target receiving end to the real address of the target receiving end; The virtual communication path identifier is sent to the initiating end, so that the initiating end sends the service request data transmission message to the mapping address corresponding to the virtual communication path identifier.

6. The traffic redirection method according to claim 2, wherein: The converting the destination address of the service request data transmission message from the address of the DoIP gateway to the real address of the target receiving end includes: Based on the network IP protocol layer, transport layer and application layer, the destination address of the service request data transmission message is converted from the address of the DoIP gateway to the real address of the target receiving end.

7. The traffic redirection method according to claim 1, wherein: The parsing director is further configured to parse a response data transmission message and redirect a communication path of the response data transmission message, wherein the response data transmission message corresponds to the service request data transmission message and is used to transmit response data, wherein the response data is data returned by the target receiving end to the initiating end in response to the service request data received from the first destination address; the method further includes: In response to obtaining, at the at least one network node where the resolution director is configured, the response data transmission message sent by the target receiving end to the first destination address, redirecting the communication path of the response data transmission message using the resolution director, including: translating the destination address of the response data transmission message from the first destination address to the address of the originating end, and translating the source address of the response data transmission message from the real address of the target receiving end to the first destination address; The response data transmission message is transmitted to the initiating end based on the redirected communication path of the response data transmission message.

8. The traffic redirection method according to claim 7, characterized in that: The method further comprises: Determining that the path conversion type corresponding to the service request data transmission message is a transparent mode; Based on the determined path conversion type, determining that the first destination address in the confirmation message is an address of the DoIP gateway; Redirecting the communication path of the response data transmission message by using the parsing director includes: Utilizing the resolution director, converting the destination address of the response data transmission message from the address of the DoIP gateway to the address of the initiating end; The resolution director is used to convert the source address of the response data transmission message from the real address of the target receiving end to the address of the DoIP gateway.

9. The traffic redirection method according to claim 7, wherein: The method further comprises: Determining that the path conversion type corresponding to the service request data transmission message is a semi-transparent mode; Determine a mapping address of the target receiving end, and use the mapping address of the target receiving end as the first destination address in the confirmation message; Redirecting the communication path of the response data transmission message by using the parsing director includes: Utilizing the parsing director, converting the destination address of the response data transmission message from the mapping address of the target receiving end to the address of the initiating end; The parsing director is used to convert the source address of the response data transmission message from the real address of the target receiving end to the mapped address of the target receiving end.

10. The traffic redirection method according to claim 1, wherein: Configuring a resolution director at at least one network node between the initiator and the target receiver includes: A parser director is configured at at least one network node location among the Ethernet switch between the initiator and the target receiving end, at least one protocol layer of the DoIP gateway, the NIC network card, and the network node location where the driver of the DoIP gateway is located.

11. The traffic redirection method according to claim 10, characterized in that: The method further comprises: The network node location for configuring the parser director is determined based on the function of each network node location between the initiator and the target receiving end, the number of service request messages received by the traffic redirection device, the data type, priority, importance level, data volume of the service request data corresponding to each service request message, and at least one of the type of the target receiving end.

12. The traffic redirection method according to claim 1, wherein: The method further comprises: In response to the traffic redirection device receiving a plurality of service request messages, and determining that traffic redirection is required for the service request data corresponding to the plurality of service request messages, a plurality of parsing directors are configured at a plurality of network node positions between the initiating end and the target receiving end, the plurality of parsing directors are configured to respectively parse the service request data transmission messages corresponding to different service request messages, and redirect the communication paths of the service request data transmission messages; Among them, for each service request data transmission message, in response to the network node location where the service request data transmission message currently arrives being configured with the resolution director, it is determined whether to redirect the communication path of the service request data transmission message based on the resolution director of the currently arrived network node location.

13. The traffic redirection method according to claim 12, wherein: Determining whether to redirect the communication path of the service request data transmission message based on the resolution director of the currently arrived network node location includes: Parsing the service request data transmission message based on the parsing director to obtain the destination address of the service request data transmission message; The destination address obtained by the resolution is matched with the first destination address in the path conversion rule pre-stored in the resolution director. If the match is the same, a communication path for redirecting the service request data transmission message based on the resolution director is determined.

14. The traffic redirection method according to claim 7, wherein: The method comprises: In response to transmitting the response data to the initiator based on the redirected communication path of the response data transmission message, releasing the redirected communication path of the response data transmission message and the redirected communication path of the service request data transmission message.

15. The traffic redirection method according to claim 1, wherein: The service request message includes data information of the service request data to be transmitted, the data information including data size and data type. The determining, in response to the service request message received by the traffic redirection device, whether traffic redirection of the service request data to be transmitted is required includes: Based on at least one of the data information, the transmission duration of the service request data and the load of the traffic redirection device, determine whether traffic redirection of the service request data is required, and the transmission duration of the service request data is determined based on the data information and the load of the traffic redirection device.

16. A traffic redirection method, applied to a terminal, wherein the terminal is in communication with a traffic redirection device, wherein the traffic redirection device comprises a DoIP gateway, characterized in that: The method comprises: Sending a service request message to the traffic redirection device, wherein the service request message includes data information of the service request data to be transmitted, and a target receiving end of the service request message is communicatively connected to the terminal through the traffic redirection device; receiving a confirmation message for the service request message sent by the traffic redirection device, the confirmation message including a first destination address, the first destination address being an initial destination address of the service request data transmission message determined by the traffic redirection device in response to traffic redirection being required for the service request data to be transmitted, the service request data transmission message corresponding to the service request message and being used to transmit the service request data to be transmitted; Initiate the service request data transmission message to the first destination address, so that the traffic redirection device redirects the communication path of the service request data transmission message, and transmits the service request data to be transmitted to the target receiving end based on the redirected communication path.

17. The traffic redirection method according to claim 16, characterized in that: The method further comprises: Obtain response data sent by the target receiving end, wherein the response data is data returned by the target receiving end to the terminal in response to the received service request data, and the response data is transmitted to the terminal based on the response data transmission message communication path redirected by the traffic redirection device, and the response data transmission message corresponds to the service request data transmission message and is used to transmit the response data.

18. A smart device, characterized in that: The invention comprises: a traffic redirection device, the traffic redirection device comprising at least one processor, and a memory communicatively connected to the at least one processor; wherein a computer program is stored in the memory, and when the computer program is executed by the at least one processor, the traffic redirection method according to any one of claims 1 to 15 is implemented.

Citation Information

Patent Citations

  • Diagnostic message routing method and bus routing equipment thereof

    CN113141306A

  • Service access method and device

    CN114765612A