Vehicle, data transmission method and device thereof and medium

By obtaining preset service instructions and configuring the mirror interface, CAN data in different network segments is transmitted to the OBD port outside the vehicle, which solves the problems of cumbersome operations and data exposure, and ensures vehicle information security and data collection integrity.

CN119865508APending Publication Date: 2025-04-22CHERY INTELLIGENT VEHICLE TECH (HEFEI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510005087.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-02
Publication Date
2025-04-22

AI Technical Summary

Technical Problem

When collecting CAN data in different network segments, the existing technology is cumbersome and easily leads to internal data exposure. External clients can directly inject or tamper with data, causing vehicle information security risks.

Method used

By obtaining preset service instructions, determining the target network segment and configuring the mirror interface, transmitting the mirror data to the preset communication interface, and transmitting it to the target port through hardware channel to avoid internal data exposure.

Benefits of technology

While avoiding the impact on vehicle information security due to internal data exposure to a certain extent, it is simple to operate and the integrity of data collection is guaranteed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119865508A_ABST
    Figure CN119865508A_ABST
Patent Text Reader

Abstract

The invention discloses a vehicle, a data transmission method and device thereof and a medium, and relates to the technical field of vehicles. The data transmission method of the vehicle comprises the following steps: acquiring a first preset service instruction; determining a first target network segment according to the first preset service instruction, and configuring a mirror image interface corresponding to the first target network segment; transmitting the mirror image data of the first target network segment from the corresponding mirror image interface to a preset communication interface under the condition that the mirror image interface is successfully configured; and transmitting the mirror image data of the first target network segment to the target port based on a hardware channel corresponding to the preset communication interface. According to the data transmission method, the first target network segment is controlled to start the mirroring function according to the first preset service instruction, and the corresponding mirroring data is sent to the OBD port diagnosis CAN outside the vehicle, so that the influence on the vehicle information security due to internal data exposure can be avoided to a certain extent, and the operation is simple.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of vehicle technology, and in particular to a vehicle data transmission method, a vehicle data transmission device, a computer-readable storage medium and a vehicle. Background Art

[0002] With the rapid development of automobile technology, the intelligence of the vehicle electrical architecture is constantly improving, and the controller and network topology are becoming more and more diverse, which improves the user's intelligent experience. However, when it is necessary to collect CAN (Controller Area Network) data from different network segments, the host computer needs to be connected to the corresponding network. The operation is cumbersome and it is easy to expose internal data. External clients can directly inject or tamper with data, which poses a great threat to vehicle information security. Summary of the invention

[0003] The present application aims to solve at least one of the technical problems in the related art to a certain extent. To this end, the first purpose of the present application is to propose a vehicle data transmission method, the method comprising: obtaining a first preset service instruction; determining a first target network segment according to the first preset service instruction, and configuring a mirror interface corresponding to the first target network segment; when the mirror interface is successfully configured, transmitting the mirror data of the first target network segment from the corresponding mirror interface to the preset communication interface; based on the hardware channel corresponding to the preset communication interface, transmitting the mirror data of the first target network segment to the target port. The data transmission method of the present application controls the first target network segment to start the mirror function according to the first preset service instruction, and sends the corresponding mirror data to the diagnostic CAN of the OBD (On-Board Diagnostics) port outside the vehicle. This can avoid the impact on vehicle information security caused by the exposure of internal data to a certain extent, and the operation is simple.

[0004] A second objective of the present application is to provide a data transmission device for a vehicle.

[0005] The third object of the present application is to provide a computer-readable storage medium.

[0006] A fourth object of the present application is to provide a vehicle.

[0007] To achieve the above-mentioned purpose, the first aspect of the present application proposes a vehicle data transmission method, which includes: obtaining a first preset service instruction; determining a first target network segment according to the first preset service instruction, and configuring a mirror interface corresponding to the first target network segment; when the mirror interface is successfully configured, transmitting the mirror data of the first target network segment from the corresponding mirror interface to the preset communication interface; based on the hardware channel corresponding to the preset communication interface, transmitting the mirror data of the first target network segment to the target port.

[0008] According to one embodiment of the present application, when the mirror interface is successfully configured, the mirror data of the first target network segment is transmitted from the corresponding mirror interface to the preset communication interface, including: transmitting the mirror data of the first target network segment from the corresponding mirror interface to a preset storage area; the preset storage area transmits the mirror data of the first target network segment to the preset communication interface based on a preset data transmission order.

[0009] According to one embodiment of the present application, the above method also includes: obtaining the sending status of the mirror data of the first target network segment of the current frame; when the sending status is a successful state, the preset storage area transmits the mirror data of the first target network segment of the next frame to the preset communication interface; when the sending status is a failed state, the preset storage area retransmits the mirror data of the first target network segment of the current frame to the preset communication interface.

[0010] According to an embodiment of the present application, the preset storage area is a FIFO storage area.

[0011] According to one embodiment of the present application, determining the first target network segment according to the first preset service instruction includes: determining the first byte information according to the first preset service instruction, the first byte information including multiple first bits; determining the first target network segment according to the correspondence between the first bit and the network segment and the value of the first bit.

[0012] According to one embodiment of the present application, the first target network segment is determined based on the correspondence between the first bit and the network segment and the value of the first bit, including: when the value of the first bit is a first preset value, the network segment corresponding to the first bit is used as the first target network segment.

[0013] According to one embodiment of the present application, the above method also includes: obtaining a second preset service instruction; determining second byte information according to the second preset service instruction, the second byte information including multiple second bits; determining the second target network segment according to the correspondence between the second bit and the network segment and the value of the second bit, and determining the status information of the second target network segment.

[0014] To achieve the above-mentioned purpose, the second aspect embodiment of the present application proposes a vehicle data transmission device, which includes: an acquisition module, used to acquire a first preset service instruction; a determination module, used to determine a first target network segment according to the first preset service instruction, and configure a mirror interface corresponding to the first target network segment; a first transmission module, used to transmit the mirror data of the first target network segment from the corresponding mirror interface to the preset communication interface when the mirror interface is successfully configured; a second transmission module, used to transmit the mirror data of the first target network segment to the target port based on the hardware channel corresponding to the preset communication interface.

[0015] To achieve the above-mentioned purpose, the third aspect of the present application proposes a computer-readable storage medium on which a vehicle data transmission program is stored. When the vehicle data transmission program is executed by a processor, the aforementioned vehicle data transmission method is implemented.

[0016] To achieve the above-mentioned objectives, the fourth aspect embodiment of the present application proposes a vehicle, including a memory, a processor, and a vehicle data transmission program stored in the memory and executable on the processor. When the processor executes the vehicle data transmission program, the aforementioned vehicle data transmission method is implemented.

[0017] According to the vehicle and its data transmission method, device and medium of the embodiment of the present application, obtain the first preset service instruction; determine the first target network segment according to the first preset service instruction, and configure the mirror interface corresponding to the first target network segment; when the mirror interface is successfully configured, transmit the mirror data of the first target network segment from the corresponding mirror interface to the preset communication interface; based on the hardware channel corresponding to the preset communication interface, transmit the mirror data of the first target network segment to the target port. The data transmission method of the present application controls the first target network segment to enable the mirror function according to the first preset service instruction, and sends the corresponding mirror data to the diagnostic CAN of the OBD port outside the vehicle. This can avoid the impact on vehicle information security caused by internal data exposure to a certain extent, and the operation is simple. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 is a flow chart of a vehicle data transmission method according to some embodiments of the present application;

[0019] Figure 2 A schematic diagram of the structure of a FIFO storage area according to some embodiments of the present application;

[0020] Figure 3 A schematic diagram of the MCU software architecture for data transmission of a vehicle according to an embodiment of the present application;

[0021] Figure 4 It is a block diagram of a data transmission device of a vehicle according to some embodiments of the present application;

[0022] Figure 5 It is a block diagram of a vehicle according to some embodiments of the present application. DETAILED DESCRIPTION

[0023] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.

[0024] The vehicle and its data transmission method, device and medium according to the embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0025] Figure 1 FIG. 1 is a flow chart of a vehicle data transmission method according to some embodiments of the present application. Figure 1 The vehicle data transmission method of the embodiment of the present application may include the following steps:

[0026] S110: Obtain a first preset service instruction.

[0027] Specifically, the first preset service command may be a UDS (Universal Data Server) 0x31 service command.

[0028] S120, determining a first target network segment according to a first preset service instruction, and configuring a mirroring interface corresponding to the first target network segment.

[0029] Specifically, after obtaining the first preset service instruction, the first preset service instruction is parsed to determine the first byte information, where the first byte information includes 8 first bits, for example, the first bit may be first bit 1, first bit 2, …, first bit 8, each first bit corresponds to a network segment, for example, first bit 1 corresponds to network segment CAN1, first bit 2 corresponds to network segment CAN2, …, first bit 8 corresponds to network segment CAN8, and then the first target network segment is determined according to the value of the first bit. For example, if the values ​​of the first bit 1 and the second bit 2 are 1, the network segment corresponding to the first bit 1 and the second bit 2 is determined to be the first target network segment, that is, network segment CAN1 and network segment CAN2 are determined to be the first target network segment. After determining the first target network segment, the mirror interface of the first target network segment is configured, and the mirror interface of the first target network segment is opened.

[0030] It should be noted that after parsing the first preset service instruction, the first byte information may include one or more bytes, and when the first byte information includes one byte, the first byte information includes 8 first bits. The network segment corresponding to the first bit in the first byte information may be a CAN network segment or a LIN (Local Interconnect Network) network segment, and the first target network segment determined according to the value of the first bit may be one or more.

[0031] S130, when the mirror interface is configured successfully, the mirror data of the first target network segment is transmitted from the corresponding mirror interface to the preset communication interface.

[0032] Specifically, after the mirror interface is configured successfully, the mirror data of the first target network segment is transmitted from the mirror interface to a preset communication interface (eg, an external diagnostic CAN interface).

[0033] S140, transmitting the mirrored data of the first target network segment to the target port based on the hardware channel corresponding to the preset communication interface.

[0034] Specifically, the preset communication interface transmits the mirror data of the first target network segment to the target port (e.g., OBD port) via the hardware channel (e.g., DCAN) corresponding to the preset communication interface. The OBD port is communicatively connected with the external diagnostic device, and finally the mirror data of the first target network segment is transmitted from the OBD port to the external diagnostic device.

[0035] The data transmission method of the present application controls the first target network segment to enable the mirroring function according to the first preset service instruction, and sends the corresponding mirroring data to the diagnostic CAN of the OBD port outside the vehicle. This can avoid the impact on vehicle information security caused by internal data exposure to a certain extent, and the operation is simple.

[0036] In some embodiments, when the mirror interface is successfully configured, the mirror data of the first target network segment is transmitted from the corresponding mirror interface to the preset communication interface, including: transmitting the mirror data of the first target network segment from the corresponding mirror interface to the preset storage area; the preset storage area transmits the mirror data of the first target network segment to the preset communication interface based on a preset data transmission order.

[0037] Specifically, when multiple first target network segments need to be collected at the same time, the load of the external diagnostic CAN interface is too large, and there is a certain risk of mirror message frame loss, resulting in data loss. The existing method of collecting function testing that can ensure data integrity basically relies on the recording of the bus by the external device, and cannot be mirrored in real time. Therefore, in the process of transmitting the mirror data of the first target network segment from the corresponding mirror interface to the preset communication interface, the mirror data of the first target network segment is first transmitted from the corresponding mirror interface to the preset storage area, and then the preset storage area will transmit the mirror data of the first target network segment to the preset communication interface according to the preset data transmission order (for example, the first-in-first-out transmission order). In this way, the processing sequence of the mirror data is guaranteed.

[0038] In some embodiments, the above method also includes: obtaining the sending status of the mirror data of the first target network segment of the current frame; when the sending status is a successful state, the preset storage area transmits the mirror data of the first target network segment of the next frame to the preset communication interface; when the sending status is a failed state, the preset storage area retransmits the mirror data of the first target network segment of the current frame to the preset communication interface.

[0039] Specifically, the sending status of the mirror data of the first target network segment of the current frame can be obtained according to the interface driver detection of the external diagnostic CAN interface. For example, if the mirror data of the first target network segment is successfully transmitted to the target port by the external diagnostic CAN interface, the sending status of the mirror data of the first target network segment of the current frame is determined to be a success state. If the mirror data of the first target network segment is not transmitted to the target port by the external diagnostic CAN interface, the sending status of the mirror data of the first target network segment of the current frame is determined to be a failure state. Furthermore, the next processing method of the mirror data of the first target network segment of the current frame is determined according to the sending status of the mirror data of the first target network segment of the current frame.

[0040] Exemplarily, if the sending status is a successful status, the preset storage area discards the mirror data of the first target network segment of the current frame and transmits the mirror data of the first target network segment of the next frame to the preset communication interface; if the sending status is a failed status, the preset storage area retransmits the mirror data of the first target network segment of the current frame to the preset communication interface.

[0041] In some embodiments, the preset storage area is a FIFO storage area.

[0042] Specifically, refer to Figure 2 The preset storage area can be a 1024-byte FIFO (First Input First Output) storage area.

[0043] In this way, when the controller communication load is high and the bottom layer receives or sends too much data, the present application can effectively manage the sequence of data to be mirrored, adopt a FIFO first-in-first-out queue, and determine the next processing method of the mirrored data of the first target network segment of the current frame based on the sending status of the mirrored data of the first target network segment of the current frame. To a certain extent, it ensures that there will be no frame drops when sending on the external diagnostic CAN interface, thereby ensuring the integrity of the data.

[0044] In some embodiments, determining the first target network segment according to the first preset service instruction includes: determining the first byte information according to the first preset service instruction, the first byte information including multiple first bits; determining the first target network segment according to the correspondence between the first bit and the network segment and the value of the first bit.

[0045] In some embodiments, determining the first target network segment according to the correspondence between the first bit and the network segment and the value of the first bit includes: when the value of the first bit is a first preset value, taking the network segment corresponding to the first bit as the first target network segment. The first preset value is 1.

[0046] Specifically, the first byte information may include one or more bytes, for example, if the first byte information includes one byte, the first byte information includes 8 first bits, if the first byte information includes two bytes, the first byte information includes 16 first bits, and so on. Correspondingly, if the first byte information includes 8 first bits, it corresponds to 8 network segments, if the first byte information includes 16 first bits, it corresponds to 16 network segments, and so on.

[0047] In the embodiment of the present application, the first byte information includes one byte as an example for explanation, but it is not intended to limit the present application. That is to say, the first byte information includes 8 first bits, for example, the first bit can be first bit 1, first bit 2, ..., first bit 8, wherein first bit 1 corresponds to network segment CAN1, first bit 2 corresponds to network segment CAN2, first bit 3 corresponds to network segment CAN3, first bit 4 corresponds to network segment CAN4, first bit 5 corresponds to network segment CAN5, first bit 6 corresponds to network segment CAN6, first bit 7 corresponds to network segment LIN1, and first bit 8 corresponds to network segment LIN2.

[0048] Exemplarily, if only the value of the first bit 1 is the first preset value (for example, 1), network segment CAN1 is determined as the first target network segment; if only the value of the first bit 7 is the first preset value (for example, 1), network segment LIN1 is determined as the first target network segment; if only the value of the first bit 1 and the value of the first bit 2 are the first preset value (for example, 1), network segments CAN1 and CAN2 are determined as the first target network segments; if only the value of the first bit 1 and the value of the first bit 7 are the first preset value (for example, 1), network segments CAN1 and LIN1 are determined as the first target network segments.

[0049] In some embodiments, the above method also includes: obtaining a second preset service instruction; determining second byte information according to the second preset service instruction, the second byte information including multiple second bits; determining the second target network segment according to the correspondence between the second bit and the network segment and the value of the second bit, and determining the status information of the second target network segment.

[0050] Specifically, the second preset service instruction may be a UDS 0x22 service instruction, which is used to query the status information of the second target network segment, wherein the status information includes but is not limited to whether the second target network segment is performing mirror data transmission and the data transmission rate. Parsing the second preset service instruction can determine the second byte information, wherein the second byte information may also include one or more bytes, and when the second byte information includes one byte, the second byte information includes 8 second bits, and when the second byte information includes two bytes, the second byte information includes 16 second bits, and so on. Accordingly, if the second byte information includes 8 second bits, it corresponds to 8 network segments, and if the second byte information includes 16 second bits, it corresponds to 16 network segments, and so on.

[0051] In the embodiment of the present application, the second byte information includes one byte as an example for explanation, but it is not intended to limit the present application. That is to say, the second byte information includes 8 second bits, for example, the second bit can be second bit 1, second bit 2, ..., second bit 8, wherein second bit 1 corresponds to network segment CAN1, second bit 2 corresponds to network segment CAN2, second bit 3 corresponds to network segment CAN3, second bit 4 corresponds to network segment CAN4, second bit 5 corresponds to network segment CAN5, second bit 6 corresponds to network segment CAN6, second bit 7 corresponds to network segment LIN1, and second bit 8 corresponds to network segment LIN2. It should be noted that the network segment corresponding to the second bit is the same as the network segment corresponding to the first bit.

[0052] Exemplarily, if only the value of the second bit 1 is the second preset value (for example, 1), the status information of the second target network segment (network segment CAN1) is queried; if only the value of the second bit 7 is the second preset value (for example, 1), the status information of the second target network segment (network segment LIN1) is queried; if only the value of the second bit 1 and the value of the second bit 2 are the second preset value (for example, 1), the status information of the second target network segments (network segments CAN1 and network segments CAN2) is queried; if only the value of the second bit 1 and the value of the second bit 7 are the second preset value (for example, 1), the status information of the second target network segments (network segments CAN1 and network segments LIN1) is queried.

[0053] As a specific example, see Figure 3, a schematic diagram of the MCU (Microcontroller Unit) software architecture for data transmission of a vehicle in an embodiment of the present application, wherein the architecture 1 includes a Dcm (Diagnostic Communication Manager) module 11, a DcmUser (Diagnostic Communication Manager User) module 12, a PduR (Protocol Data Unit Router) module 13, and a CanIF (CAN Interface) module 14.

[0054] Specifically, the external diagnostic device 2 sends a first preset service instruction (UDS 0x31 service instruction) to the Dcm module 11, and the Dcm module 11 parses the first preset service instruction to generate a RID (Routine ID), which includes a first byte of information, and sends the RID to the DcmUser module 12. The DcmUser module 12 determines the first target network segment according to the first byte of information, and opens the mirror interface corresponding to the first target network segment. The PduR module 13 routes the mirror data of the first target network segment to a preset storage area (FIFO storage area), and then the first-entered mirror data is packaged and encapsulated. The preset storage area routes the mirror data of the first target network segment to a preset communication interface (such as an external diagnostic CAN interface) based on a preset data transmission order (such as a first-in-first-out transmission order). The preset communication interface calls the Transmit function of the CanIF module 14, sets the sending hardware channel to DCAN, and transmits the mirror data of the first target network segment to the target port (OBD port). If DCAN is in the CAN common frame format, other network segments in the CANFD (CAN with Flexible Data Rate) format can only intercept the first 8 bytes of data and send them, and discard the rest of the content.

[0055] Among them, the data stored in the FIFO storage area must be strictly sequenced, and the sequence is adjusted according to the maximum processable length of a single frame. When sending a frame, the status of the send return will be judged. If successful, it will enter the next frame processing. Otherwise, the CAN_Write sending function will continue to be called until the data of this frame is sent.

[0056] In addition, the external diagnostic device 2 sends a second preset service instruction (UDS 0x22 service instruction) to the Dcm module 11, the Dcm module 11 parses the second preset service instruction to generate a DID (DataID, data identifier), the DID includes the second byte information, and sends the DID to the DcmUser module 12, the DcmUser module 12 determines the status information of the second target network segment according to the second byte information.

[0057] To sum up, the data transmission method of the present application controls multiple first target network segments to be mirrored to the external OBD diagnostic CAN at the same time through the first preset service instruction, without the need for adapter harnesses, thus conveniently realizing data collection and problem analysis. It can also guarantee the integrity of data collection to a certain extent, ensure the security of in-vehicle network data, and improve the safety and reliability of the vehicle functions.

[0058] Corresponding to the above-mentioned embodiment, the present application also proposes a vehicle data transmission device.

[0059] Reference Figure 4 The vehicle data transmission device 200 includes: an acquisition module 210, a determination module 220, a first transmission module 230 and a second transmission module 240.

[0060] Among them, the acquisition module 210 is used to obtain the first preset service instruction. The determination module 220 is used to determine the first target network segment according to the first preset service instruction, and configure the mirror interface corresponding to the first target network segment. The first transmission module 230 is used to transmit the mirror data of the first target network segment from the corresponding mirror interface to the preset communication interface when the mirror interface configuration is successful. The second transmission module 240 is used to transmit the mirror data of the first target network segment to the target port based on the hardware channel corresponding to the preset communication interface.

[0061] According to one embodiment of the present application, the first transmission module 230 is specifically used to transmit the mirror data of the first target network segment from the corresponding mirror interface to a preset storage area; the preset storage area transmits the mirror data of the first target network segment to a preset communication interface based on a preset data transmission order.

[0062] According to one embodiment of the present application, the sending status of the mirror data of the first target network segment of the current frame is obtained; when the sending status is a success status, the preset storage area transmits the mirror data of the first target network segment of the next frame to the preset communication interface; when the sending status is a failure status, the preset storage area retransmits the mirror data of the first target network segment of the current frame to the preset communication interface.

[0063] According to an embodiment of the present application, the preset storage area is a FIFO storage area.

[0064] According to one embodiment of the present application, the determination module 220 is specifically used to determine the first byte information according to the first preset service instruction, the first byte information including multiple first bits; determine the first target network segment according to the correspondence between the first bit and the network segment and the value of the first bit.

[0065] According to an embodiment of the present application, the determination module 220 is specifically configured to, when the value of the first bit is a first preset value, use the network segment corresponding to the first bit as the first target network segment.

[0066] According to one embodiment of the present application, a second preset service instruction is obtained; second byte information is determined according to the second preset service instruction, and the second byte information includes multiple second bits; the second target network segment is determined according to the correspondence between the second bit and the network segment and the value of the second bit, and the status information of the second target network segment is determined.

[0067] It should be pointed out that the above-mentioned explanation of the embodiments and beneficial effects of the vehicle data transmission method is also applicable to the vehicle data transmission device of the embodiment of the present application. In order to avoid redundancy, it will not be elaborated here.

[0068] Corresponding to the above embodiments, the present application also proposes a computer-readable storage medium.

[0069] The computer-readable storage medium of the present application stores a vehicle data transmission program thereon, and when the vehicle data transmission program is executed by a processor, the aforementioned vehicle data transmission method is implemented.

[0070] It should be pointed out that the above-mentioned explanation of the embodiments and beneficial effects of the vehicle data transmission method is also applicable to the computer-readable storage medium of the embodiment of the present application. To avoid redundancy, it will not be elaborated here.

[0071] Corresponding to the above embodiments, the present application also proposes a vehicle.

[0072] See also Figure 5 As shown, the vehicle 300 of the present application includes a memory 310, a processor 320, and a vehicle data transmission program stored in the memory 310 and executable on the processor 320. When the processor executes the vehicle data transmission program, the aforementioned vehicle data transmission method is implemented.

[0073] It should be pointed out that the above-mentioned explanation of the embodiments and beneficial effects of the data transmission method for a vehicle are also applicable to the vehicles of the embodiments of the present application. To avoid redundancy, they will not be elaborated here.

[0074] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection portion with one or more wirings (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.

[0075] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0076] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0077] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0078] In this application, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements, unless otherwise clearly defined. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0079] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A vehicle data transmission method, characterized in that: The method comprises: Obtaining a first preset service instruction; Determine a first target network segment according to the first preset service instruction, and configure a mirror interface corresponding to the first target network segment; When the mirror interface is configured successfully, the mirror data of the first target network segment is transmitted from the corresponding mirror interface to the preset communication interface; Based on the hardware channel corresponding to the preset communication interface, the mirrored data of the first target network segment is transmitted to the target port.

2. The vehicle data transmission method according to claim 1, characterized in that: When the mirror interface is configured successfully, the mirror data of the first target network segment is transmitted from the corresponding mirror interface to the preset communication interface, including: Transmitting the mirror data of the first target network segment from the corresponding mirror interface to a preset storage area; The preset storage area transmits the mirror data of the first target network segment to the preset communication interface based on a preset data transmission order.

3. The vehicle data transmission method according to claim 2, characterized in that: The method further comprises: Get the sending status of the mirrored data of the first target network segment of the current frame; In the case where the sending status is a success status, the preset storage area transmits the mirror data of the first target network segment of the next frame to the preset communication interface; In a case where the sending state is a failure state, the preset storage area retransmits the mirror data of the first target network segment of the current frame to the preset communication interface.

4. The vehicle data transmission method according to claim 2, characterized in that: The preset storage area is a FIFO storage area.

5. The vehicle data transmission method according to claim 1, characterized in that: Determining a first target network segment according to the first preset service instruction includes: Determine first byte information according to the first preset service instruction, where the first byte information includes a plurality of first bits; The first target network segment is determined according to the correspondence between the first bit and the network segment and the value of the first bit.

6. The vehicle data transmission method according to claim 5, characterized in that: Determining the first target network segment according to the correspondence between the first bit and the network segment and the value of the first bit includes: When the value of the first bit is a first preset value, the network segment corresponding to the first bit is used as the first target network segment.

7. The vehicle data transmission method according to claim 1, characterized in that: The method further comprises: Obtaining a second preset service instruction; Determine second byte information according to the second preset service instruction, where the second byte information includes a plurality of second bits; The second target network segment is determined according to the correspondence between the second bit and the network segment and the value of the second bit, and the status information of the second target network segment is determined.

8. A vehicle data transmission device, characterized in that: The device comprises: An acquisition module, used for acquiring a first preset service instruction; a determination module, configured to determine a first target network segment according to the first preset service instruction, and configure a mirror interface corresponding to the first target network segment; A first transmission module, used for transmitting the mirror data of the first target network segment from the corresponding mirror interface to the preset communication interface when the mirror interface is configured successfully; The second transmission module is used to transmit the mirrored data of the first target network segment to the target port based on the hardware channel corresponding to the preset communication interface.

9. A computer-readable storage medium, characterized in that: A vehicle data transmission program is stored thereon, and when the vehicle data transmission program is executed by a processor, the vehicle data transmission method according to any one of claims 1-7 is implemented.

10. A vehicle, characterized in that: The invention comprises a memory, a processor and a vehicle data transmission program stored in the memory and executable on the processor. When the processor executes the vehicle data transmission program, the vehicle data transmission method according to any one of claims 1 to 7 is implemented.