Method and system for diagnosing interface mirroring different-rate CAN network segment communication and vehicle

By receiving diagnostic messages, calculating the baud rate prescaler and total bit time interval, and setting the timing register, the problem of removing vehicle interior panels to connect to the CAN interface was solved, achieving efficient CAN network segment monitoring and diagnosis, and protecting vehicle integrity.

CN121037153APending Publication Date: 2025-11-28ANHUI DEEPWAY TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511087590.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-04
Publication Date
2025-11-28

AI Technical Summary

Technical Problem

When accessing the CAN network is required during vehicle controller communication quality monitoring or electronic fault diagnosis, components such as vehicle interior panels are removed to connect to the CAN interface, which is time-consuming, labor-intensive, and may damage the vehicle's integrity and aesthetics.

Method used

By receiving diagnostic messages sent by the diagnostic instrument, the system clock frequency and target baud rate of the controller to be diagnosed are determined, the baud rate prescaler value and total bit time period are calculated, and the timer register is set to change the CAN rate of the diagnostic interface, so as to realize mirror communication of CAN network segments with different rates.

Benefits of technology

It enables efficient and comprehensive monitoring and diagnosis of all relevant CAN network segments, avoiding vehicle damage caused by physical access.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121037153A_ABST
    Figure CN121037153A_ABST
Patent Text Reader

Abstract

The invention discloses a method and system for diagnosing interface mirroring different-rate CAN network segment communication and a vehicle. The method for mirroring different-rate CAN network segment communication through the diagnostic interface comprises the steps that a diagnostic message sent by a diagnostic instrument is received, and the system clock frequency and the target baud rate of a controller to be diagnosed are obtained according to the diagnostic message; obtaining a Baud rate pre-frequency division value according to the system clock frequency and the time quantum length; obtaining a first bit time period and a second bit time period of the total bit time of the CAN bus according to the system clock frequency and the target baud rate; and setting the timing register according to the Baud rate pre-frequency division value, the first bit time period and the second bit time period so as to change the CAN rate of the diagnosis interface. According to the embodiment of the invention, the method can effectively achieve the mirroring of the communication of CAN network segments at different rates through a diagnosis interface, and can achieve the efficient and comprehensive monitoring and diagnosis of all related CAN network segments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of vehicle network communication technology, and in particular to a method, system and vehicle for mirroring CAN network segments with different rates via a diagnostic interface. Background Technology

[0002] Access to the vehicle's CAN network is typically required during communication quality monitoring or electronic fault diagnosis of the vehicle controller.

[0003] Currently, when monitoring CAN network data, due to the different locations of various functional modules within the vehicle and their potential use of different CAN communication rates, it is often necessary to remove some interior trim panels and other components to physically connect to the required CAN interface for monitoring. However, this operation is not only time-consuming and labor-intensive but may also cause unnecessary damage to the vehicle, affecting its integrity and aesthetics. Summary of the Invention

[0004] Based on this, the present invention provides a method, system and vehicle for mirroring CAN network segments with different rates through a diagnostic interface, which can effectively realize the mirroring of CAN network segments with different rates through a diagnostic interface, thereby enabling efficient and comprehensive monitoring and diagnosis of all relevant CAN network segments.

[0005] Firstly, a method for diagnostic interface mirroring of CAN network segments with different rates is provided, including:

[0006] Receive diagnostic messages sent by the diagnostic instrument, and obtain the system clock frequency and target baud rate of the controller to be diagnosed based on the diagnostic messages;

[0007] Based on the system clock frequency and time quantum length, the baud rate prescaler value is obtained;

[0008] Based on the system clock frequency and target baud rate, the first and second bit time periods of the total bit time of the CAN bus are obtained;

[0009] The timing register is set according to the baud rate prescaler value, the first time period, and the second time period to change the CAN rate of the diagnostic interface.

[0010] Further, the step of receiving the diagnostic message and obtaining the system clock frequency and target baud rate of the controller to be diagnosed based on the diagnostic message includes:

[0011] Receive the diagnostic message and determine the system clock frequency of the controller to be diagnosed based on the diagnostic message;

[0012] The network segment rate of the CAN network segment where the controller is located is determined based on the diagnostic message, wherein the network segment rate represents the target baud rate.

[0013] Furthermore, the baud rate prescaler value is obtained according to the following formula:

[0014] Time quantum length = (BRP+1) × system clock cycle

[0015] Wherein, BRP is the baud rate prescaler value.

[0016] Furthermore, the first and second bit time periods of the total bit time of the CAN bus are obtained using the following formula:

[0017] Target baud rate = System clock frequency / ((BRP+1)×(1+TSEG1+TSEG2)),

[0018] Wherein, TSEG1 is the first time period and TSEG2 is the second time period.

[0019] Further, the step of setting the timing register according to the baud rate prescaler value, the first time period, and the second time period to change the CAN rate of the diagnostic interface includes:

[0020] Based on the baud rate prescaler value, the first time period, and the second time period, the baud rate prescaler register, the time share of the first time period, and the second time period of the timing register are set to change the CAN rate of the diagnostic interface.

[0021] Secondly, a system is provided that mirrors CAN network segment communication at different rates via a diagnostic interface, wherein the diagnostic interface is configured with a timing register, and the system includes:

[0022] The receiving module is used to receive diagnostic messages sent by the diagnostic instrument and obtain the system clock frequency and target baud rate of the controller to be diagnosed based on the diagnostic messages.

[0023] The acquisition module is used to obtain the baud rate prescaler value based on the system clock frequency and time quantum length, and to obtain the first and second time segments of the total bit time of the CAN bus based on the system clock frequency and the target baud rate.

[0024] The setting module is used to set the timing register according to the baud rate prescaler value, the first time period, and the second time period to change the CAN rate of the diagnostic interface.

[0025] Thirdly, a vehicle is provided, comprising: a system for mirroring CAN network segment communication at different rates according to the diagnostic interface described in the second aspect above.

[0026] Fourthly, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements a method for mirroring different rate CAN network segments for communication according to the diagnostic interface described in the first aspect above.

[0027] Fifthly, a computer-readable storage medium is provided, including a memory and a computer program stored on the memory and executable on a processor, wherein when executed by the processor, the program implements the steps of the method for mirroring different rate CAN network segment communication via a diagnostic interface as described in the first aspect and any possible implementation thereof.

[0028] In a sixth aspect, a computer program product is provided, on which a computer program is stored, which, when executed by a processor, implements a method for mirroring different rate CAN network segments through a diagnostic interface as described in the first aspect above.

[0029] The embodiments of this application first receive diagnostic messages sent by the diagnostic instrument, obtain the system clock frequency and target baud rate of the controller to be diagnosed based on the diagnostic messages, and then obtain the baud rate prescaler value based on the system clock frequency and time quantum length. Then, obtain the first and second bit time segments of the total bit time of the CAN bus based on the system clock frequency and target baud rate. Finally, set the timer register based on the baud rate prescaler value, the first bit time segment, and the second bit time segment to change the CAN rate of the diagnostic interface. Therefore, it is possible to effectively realize the mirroring of CAN network segments with different rates through the diagnostic interface, thereby enabling efficient and comprehensive monitoring and diagnosis of all relevant CAN network segments. Attached Figure Description

[0030] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:

[0031] Figure 1 A flowchart illustrating the method for mirroring CAN network segment communication at different rates using a diagnostic interface provided in this application embodiment;

[0032] Figure 2 This is a schematic diagram of the communication structure of different network segments of a vehicle provided in an embodiment of this application;

[0033] Figure 3 The structural block diagram of a system for mirroring different rate CAN network segment communication using the diagnostic interface provided in the embodiments of this application;

[0034] Figure 4 This is a structural block diagram of a computer device provided in an embodiment of this application. Detailed Implementation

[0035] The present application will now be described in further detail with reference to the embodiments and accompanying drawings. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the application. Furthermore, it should be noted that, for ease of description, only the parts relevant to the application are shown in the accompanying drawings.

[0036] It should be noted that, unless otherwise specified, the embodiments and features of the embodiments in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0037] The following describes in detail, with reference to the accompanying drawings, a method, system, and vehicle for mirroring CAN network segments at different rates using a diagnostic interface according to embodiments of this application.

[0038] Figure 1 This is a flowchart illustrating a method for mirroring CAN network segments at different speeds according to an embodiment of this application. Figure 1 As shown, a method for mirroring CAN network segments at different rates according to an embodiment of this application includes the following steps:

[0039] S101: Receive the diagnostic message sent by the diagnostic instrument, and obtain the system clock frequency and target baud rate of the controller to be diagnosed based on the diagnostic message.

[0040] In one embodiment of this application, receiving a diagnostic message and obtaining the system clock frequency and target baud rate of the controller to be diagnosed based on the diagnostic message includes: receiving the diagnostic message and determining the system clock frequency of the controller to be diagnosed based on the diagnostic message; determining the network segment rate of the CAN network segment where the controller is located based on the diagnostic message, wherein the network segment rate characterizes the target baud rate.

[0041] like Figure 2 As shown, in a vehicle gateway, there are network segments with different data communication rates. These network segments correspond to different CAN controllers. After the diagnostic interface receives a diagnostic message from the diagnostic tool, it determines the controller to be diagnosed based on the message, and then determines the system clock frequency of that controller. Simultaneously, based on the information within the message, the network segment rate of the CAN network in which the controller resides can be determined. For example, if the diagnostic message is "31 01 89 03AA", then "AA" represents the network segment rate of the corresponding controller, which is also the target baud rate of the diagnostic interface. Furthermore, if the gateway receives a diagnostic command in a format other than the above, it will not switch the diagnostic interface rate.

[0042] S102: Obtain the baud rate prescaler value based on the system clock frequency and time quantum length.

[0043] In one embodiment of this application, the baud rate prescaler value is obtained according to the following formula:

[0044] Time quantum length = (BRP+1) × system clock cycle

[0045] Wherein, BRP is the baud rate prescaler value.

[0046] Specifically, the baud rate prescaler is used to divide the system clock into smaller time units, which is the time quantum length of the CAN bus. For example, assuming the system clock cycle of the CAN controller is 40MHz and the CAN bus communication rate is 500Kbps, and one bit time is divided into 16 parts, then the baud rate prescaler BRP = 40 × 10^6 / (500 × 10^3 × 16) - 1 = 4.

[0047] S103: Based on the system clock frequency and the target baud rate, obtain the first and second bit time periods of the total bit time of the CAN bus.

[0048] In one embodiment of this application, the first and second time segments of the total bit time of the CAN bus are obtained using the following formula:

[0049] Target baud rate = System clock frequency / ((BRP+1)×(1+TSEG1+TSEG2)),

[0050] Wherein, TSEG1 is the first time period and TSEG2 is the second time period.

[0051] For the CAN bus, a bit time is divided into several different segments, typically including a synchronization segment, a first bit time segment, and a second bit time segment. The length of the synchronization segment is fixed, while the first bit time segment and the second bit time segment are configurable. After obtaining the system clock frequency, target bit rate, and baud rate prescaler value BRP, the value of TSEG1+TSEG2 can be obtained according to the above formula, thus allowing the timing register to be configured.

[0052] S104: Set the timing register according to the baud rate prescaler value, the first time period, and the second time period to change the CAN rate of the diagnostic interface.

[0053] In one embodiment of this application, setting the timing register according to the baud rate prescaler value, the first time period, and the second time period to change the CAN rate of the diagnostic interface includes: setting the baud rate prescaler register, the time share of the first time period, and the second time period of the timing register according to the baud rate prescaler value, the first time period, and the second time period to change the CAN rate of the diagnostic interface.

[0054] Specifically, after obtaining the baud rate prescaler value, the first time period, and the second time period corresponding to the controller to be diagnosed, the timer register is set. After successful setting, the gateway will reply with the rate switching result to the diagnostic instrument. Then, it will call the baud rate prescaler value, the first time period, and the time share of the second time period in the timer register of the underlying software to automatically change the CAN communication rate of the diagnostic interface, thereby realizing communication with the CAN network segment of that rate.

[0055] According to an embodiment of the present invention, the method for mirroring CAN network segment communication at different rates via a diagnostic interface first receives a diagnostic message sent by a diagnostic instrument. Based on the diagnostic message, the system clock frequency and target baud rate of the controller to be diagnosed are obtained. Then, based on the system clock frequency and time quantum length, the baud rate prescaler value is obtained. Next, based on the system clock frequency and target baud rate, the first and second bit time intervals of the total bit time of the CAN bus are obtained. Finally, based on the baud rate prescaler value, the first and second bit time intervals, a timing register is set to change the CAN rate of the diagnostic interface. Therefore, the method can effectively realize the mirroring of CAN network segment communication at different rates via a diagnostic interface, thereby enabling efficient and comprehensive monitoring and diagnosis of all relevant CAN network segments.

[0056] Figure 3 This is a structural block diagram of a system for mirroring CAN network segment communication at different rates according to an embodiment of this application. Figure 3 As shown, a system for mirroring CAN network segment communication at different rates according to an embodiment of this application includes: a receiving module 310, an acquisition module 320, and a setting module 330, wherein:

[0057] The receiving module is used to receive diagnostic messages sent by the diagnostic instrument and obtain the system clock frequency and target baud rate of the controller to be diagnosed based on the diagnostic messages.

[0058] The acquisition module is used to obtain the baud rate prescaler value based on the system clock frequency and time quantum length, and to obtain the first and second time segments of the total bit time of the CAN bus based on the system clock frequency and the target baud rate.

[0059] The setting module is used to set the timing register according to the baud rate prescaler value, the first time period, and the second time period to change the CAN rate of the diagnostic interface.

[0060] According to the system for mirroring CAN network segment communication at different rates according to the embodiments of this application, the system first receives a diagnostic message sent by the diagnostic instrument, obtains the system clock frequency and target baud rate of the controller to be diagnosed based on the diagnostic message, and then obtains the baud rate prescaler value based on the system clock frequency and time quantum length. Then, based on the system clock frequency and target baud rate, the first time segment and the second time segment of the total bit time of the CAN bus are obtained. Finally, based on the baud rate prescaler value, the first time segment and the second time segment, the timer register is set to change the CAN rate of the diagnostic interface. Therefore, the system can effectively realize the mirroring of CAN network segment communication at different rates through the diagnostic interface, and thus enable efficient and comprehensive monitoring and diagnosis of all relevant CAN network segments.

[0061] Specific limitations regarding the system for mirroring CAN network segment communication at different rates via the diagnostic interface can be found in the above description of the methods for mirroring CAN network segment communication at different rates via the diagnostic interface, and will not be repeated here. Each module of the aforementioned system for mirroring CAN network segment communication at different rates via the diagnostic interface can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0062] Furthermore, embodiments of this application provide a vehicle, including: a system for mirroring CAN network segment communication at different rates according to any of the above embodiments using a diagnostic interface. The vehicle can first receive a diagnostic message sent by a diagnostic tool, obtain the system clock frequency and target baud rate of the controller to be diagnosed based on the diagnostic message, and then obtain the baud rate prescaler value based on the system clock frequency and time quantum length. Then, based on the system clock frequency and target baud rate, it obtains the first and second bit time segments of the total bit time of the CAN bus. Finally, based on the baud rate prescaler value, the first bit time segment, and the second bit time segment, it sets a timing register to change the CAN rate of the diagnostic interface. Therefore, it can effectively realize the mirroring of CAN network segment communication at different rates using a diagnostic interface, thereby enabling efficient and comprehensive monitoring and diagnosis of all relevant CAN network segments.

[0063] Furthermore, other components and functions of the vehicle according to the embodiments of this application are known to those skilled in the art and will not be described in detail here.

[0064] The following is for reference. Figure 4 , Figure 4A schematic diagram of a computer device structure suitable for implementing embodiments of this application is shown.

[0065] like Figure 4 As shown, the computer system 1000 includes a central processing unit (CPU) 1001, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 1002 or programs loaded from storage section 1008 into random access memory (RAM) 1003. The RAM 1003 also stores various programs and data required for the system's operating instructions. The CPU 1001, ROM 1002, and RAM 1003 are interconnected via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.

[0066] The following components are connected to I / O interface 1005: an input section 1006 including a keyboard, mouse, etc.; an output section 1007 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN card, modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to I / O interface 1005 as needed. A removable medium 1011, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 1010 as needed so that computer programs read from it can be installed into storage section 1008 as needed.

[0067] Specifically, according to embodiments of this application, the flowchart above refers to... Figure 1 The described process can be implemented as a computer-readable storage medium. For example, embodiments of this application include a computer-readable storage medium comprising a computer program containing program code for performing the methods shown in the flowchart, such as performing: receiving a diagnostic message sent by a diagnostic instrument, and obtaining the system clock frequency and target baud rate of the controller to be diagnosed based on the diagnostic message; obtaining a baud rate prescaler value based on the system clock frequency and time quantum length; obtaining the first time interval and the second time interval of the total bit time of the CAN bus based on the system clock frequency and the target baud rate; and setting the timing register based on the baud rate prescaler value, the first time interval, and the second time interval to change the CAN rate of the diagnostic interface.

[0068] Specifically, according to embodiments of this application, the flowchart above refers to... Figure 1The described process can be implemented as a computer software program. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowchart, such as performing: receiving a diagnostic message sent by a diagnostic instrument, and obtaining the system clock frequency and target baud rate of the controller to be diagnosed based on the diagnostic message; obtaining a baud rate prescaler value based on the system clock frequency and time quantum length; obtaining the first time interval and the second time interval of the total bit time of the CAN bus based on the system clock frequency and the target baud rate; and setting the timing register based on the baud rate prescaler value, the first time interval, and the second time interval to change the CAN rate of the diagnostic interface.

[0069] In such an embodiment, the computer program includes program code for performing the methods shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via communication section 1009, and / or installed from removable media 1011. When the computer program is executed by central processing unit (CPU) 1001, it performs the functions defined in the system of this application.

[0070] It should be noted that the computer-readable medium shown in this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0071] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operational instructions of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two connected blocks may actually be executed substantially in parallel, or they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified functions or operational instructions, or using a combination of dedicated hardware and computer instructions.

[0072] The units or modules described in the embodiments of this application can be implemented in software or hardware. The described units or modules can also be located in a processor. The names of these units or modules do not, in certain circumstances, constitute a limitation on the unit or module itself.

[0073] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0074] The above embodiments merely illustrate several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A method of diagnosing interface mirroring of different rate CAN segment communications, characterized by, The diagnostic interface is configured with a timing register, and the method comprises: receiving a diagnostic message sent by a diagnostic instrument, and obtaining a system clock frequency of a controller to be diagnosed and a target baud rate according to the diagnostic message; obtaining a baud rate pre-division value according to the system clock frequency and a time quantum length; obtaining a first bit time period and a second bit time period of a total bit time of a CAN bus according to the system clock frequency and the target baud rate; setting the timing register according to the baud rate pre-division value, the first bit time period and the second bit time period, so as to change a CAN rate of the diagnostic interface.

2. The method for diagnosing interface mirroring different rate CAN network segment communications of claim 1, wherein, The receiving a diagnostic message and obtaining a system clock frequency of a controller to be diagnosed and a target baud rate according to the diagnostic message comprises: receiving the diagnostic message, and determining the system clock frequency of the controller to be diagnosed according to the diagnostic message; determining a network segment rate of a CAN network segment where the controller is located according to the diagnostic message, wherein the network segment rate represents the target baud rate.

3. The method of claim 1, wherein the diagnostic interface mirrors the communication of the different rate CAN network segments, and The baud rate pre-division value is obtained according to the following formula: time quantum length = (BRP+1)×system clock period, wherein the BRP is the baud rate pre-division value.

4. The method for diagnosing interface mirroring different rate CAN network segment communications of claim 3, wherein, The first bit time period and the second bit time period of the total bit time of the CAN bus are obtained according to the following formula: target baud rate = system clock frequency / ((BRP+1)×(1+TSEG1+TSEG2)), wherein the TSEG1 is the first bit time period, and the TSEG2 is the second bit time period.

5. The method for diagnosing interface mirroring differential rate CAN network segment communications of claim 1, wherein, The setting the timing register according to the baud rate pre-division value, the first bit time period and the second bit time period, so as to change a CAN rate of the diagnostic interface comprises: setting a baud rate pre-division register, a time share of the first bit time period and a time share of the second bit time period of the timing register according to the baud rate pre-division value, the first bit time period and the second bit time period, so as to change the CAN rate of the diagnostic interface.

6. A system for diagnosing communication of a CAN segment mirrored at different rates, the system comprising: The diagnostic interface is configured with a timing register, and the system comprises: a receiving module, configured to receive a diagnostic message sent by a diagnostic instrument, and obtain a system clock frequency of a controller to be diagnosed and a target baud rate according to the diagnostic message; an obtaining module, configured to obtain a baud rate pre-division value according to the system clock frequency and a time quantum length, and obtain a first bit time period and a second bit time period of a total bit time of a CAN bus according to the system clock frequency and the target baud rate; a setting module, configured to set the timing register according to the baud rate pre-division value, the first bit time period and the second bit time period, so as to change a CAN rate of the diagnostic interface.

7. A vehicle characterized by comprising: comprise: a system for mirroring communication of different rate CAN network segments by a diagnostic interface according to claim 6.

8. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the program to implement the method for mirroring communication of different rate CAN network segments by a diagnostic interface according to any one of claims 1-5.

9. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the method for mirroring communication of different rate CAN network segments by a diagnostic interface according to any one of claims 1-5.

10. A computer program product having stored thereon a computer program, characterized in that, The computer program product, which is executed by the processor, realizes the method for diagnosing the communication between the different rate CAN network segments of the interface mirror according to any one of claims 1-5.