Universal serial bus-based vehicle-mounted communication method, device, equipment and medium

By introducing data generation and verification rules into vehicle communication, and processing and verifying data in segments, the problem of low reliability in USB synchronous transmission is solved, and the requirements for high reliability and large data volume transmission are met.

CN116723489BActive Publication Date: 2026-04-21DEEPAL AUTOMOBILE TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
DEEPAL AUTOMOBILE TECH CO LTD
Filing Date
2023-05-29
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

In vehicle communication, USB synchronous transmission has low reliability and cannot meet the requirements of high real-time performance and large data volume transmission.

Method used

By introducing data generation rules during data transmission, including data verification rules and data segment composition rules, data is processed in segments, and data verification and correction are performed at the receiving end to ensure data integrity.

Benefits of technology

It improves the reliability of synchronous transmission in vehicle communication. Although it sacrifices some real-time performance, it significantly improves the reliability of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116723489B_ABST
    Figure CN116723489B_ABST
Patent Text Reader

Abstract

This invention provides a vehicle-mounted communication method, apparatus, device, and medium based on a universal serial bus. The method includes: acquiring initial valid data and data generation rules of a vehicle-mounted data transmitting device; generating data to be transmitted according to the initial valid data and data generation rules; sending the data to be transmitted to a vehicle-mounted data receiving device so that the vehicle-mounted data receiving device receives the data to be transmitted and obtains the data to be received; performing data verification on the data to be received according to the data generation rules to obtain target data; and controlling the vehicle-mounted data receiving device according to the target data. The data generation rules are used to standardize data verification rules and data segment composition rules. This invention improves the reliability of synchronous transmission in vehicle-mounted communication by sacrificing some real-time performance for increased data verification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of new energy vehicle technology, specifically to a vehicle communication method, device, equipment, and medium based on a universal serial bus. Background Technology

[0002] The Universal Serial Bus (USB) protocol is increasingly being used in automotive systems, such as for data transmission between the vehicle's infotainment system and domain controllers. However, the USB 2.0 protocol lacks an acknowledgment packet phase for synchronous transmissions, which require periodic transmission, large data volumes, and low latency, leading to lower reliability. In general technology, Electronic Control Units (ECUs) using USB transmission do not implement reliability enhancements for synchronous transmissions. However, in automotive applications, the transmitted data is often critical, such as real-time traffic updates. Therefore, automotive USB communication not only needs to ensure high real-time performance and large data volumes but also high reliability, which synchronous transmissions cannot guarantee.

[0003] For example, CN104792519A discloses a method and apparatus for processing audio and video data based on USB transmission. The method includes the following steps: S100, acquiring audio and video data; S200, parsing the acquired audio and video data; S300, combining the parsed audio and video data; S400, transmitting the combined audio and video data via the USB protocol. The apparatus includes a data acquisition unit for converting analog signals into digital signals; a central processing unit for parsing and recombining the received audio and video data; a USB control unit for interacting with a host computer via USB transmission of the combined audio and video data; and a power supply unit for providing operating power. This application discloses the parsing and combination of audio and video transmitted via USB in the traditional computer field, improving transmission stability. However, this method consumes a lot of hardware resources, and each frame of data cannot have multiple uses, making it unsuitable for vehicle communication.

[0004] Application content

[0005] This invention provides a vehicle communication method, apparatus, device, and medium based on a universal serial bus to solve the technical problem of low reliability of synchronous transmission in vehicle communication.

[0006] In one embodiment of the present invention, a vehicle-mounted communication method based on a universal serial bus is provided, comprising: acquiring initial valid data and data generation rules of a vehicle-mounted data transmitting device; generating data to be transmitted according to the initial valid data and the data generation rules; sending the data to be transmitted to a vehicle-mounted data receiving device, so that the vehicle-mounted data receiving device receives the data to be transmitted, obtains data to be received, and performs verification data validation on the data to be received according to the data generation rules to obtain target data; and controlling the vehicle-mounted data receiving device according to the target data; wherein, the data generation rules are used to standardize data validation rules and data segment composition rules.

[0007] In one embodiment of the present invention, generating data to be sent based on the initial valid data and the data generation rules includes: segmenting the initial valid data to obtain segmented initial data; performing initial data verification calculation on the segmented initial data according to the data verification rules to obtain an initial verification value; and generating data to be sent based on the segmented initial data, the initial verification value, and the data segment composition rules; wherein the segmented initial data includes segmented valid data, an initial segment order, and segmented data length, and the data segment composition rules include segment start information and segment end information.

[0008] In one embodiment of the present invention, the process of verifying the data to be received according to the data generation rules to obtain target data includes: correcting the data to be received according to the data segment composition rules to obtain corrected data; performing verification data verification calculation on the corrected data according to the data verification rules to obtain a verification value; if the verification value is consistent with the correction value in the corrected data, the corrected data is determined as target data and stored; if the verification value is inconsistent with the correction value, the corrected data is discarded.

[0009] In one embodiment of the present invention, data correction is performed on the data to be received according to the data segment composition rules to obtain corrected data, including: determining the data offset state according to the segment start information, segment end information and the data to be received; if the data offset state is an abnormal segment, the data to be received is shifted to obtain the corrected data; if the data offset state is a normal segment, the data to be received is determined as the corrected data.

[0010] In one embodiment of the present invention, before acquiring the initial valid data and data generation rules of the vehicle-mounted data transmitting device, the vehicle-mounted communication method based on Universal Serial Bus further includes: acquiring the data operation behavior of the vehicle-mounted communication host; if the data operation behavior is a synchronous read operation, generating a data read request packet and identifying the vehicle-mounted communication host as the vehicle-mounted data receiving device; if the data operation behavior is a synchronous write operation, generating a data write request packet and identifying the vehicle-mounted communication host as the vehicle-mounted data transmitting device; and sending the data read request packet or the data write request packet as a data operation request packet to the Universal Serial Bus device.

[0011] In one embodiment of the present invention, after the data read request packet or the data write request packet is sent to the Universal Serial Bus device as a data operation request packet, the vehicle communication method based on the Universal Serial Bus further includes: receiving the data operation request packet; if the data operation request packet is the data read request packet, then the Universal Serial Bus device is used as a vehicle data transmitting device; if the data operation request packet is the data write request packet, then the Universal Serial Bus device is used as a vehicle data receiving device.

[0012] In one embodiment of the present invention, an in-vehicle communication device based on a universal serial bus is provided, comprising: an acquisition module for acquiring initial valid data and data generation rules of an in-vehicle data transmitting device; a generation module for generating data to be transmitted according to the initial valid data and the data generation rules; and a transmission module for transmitting the data to be transmitted to an in-vehicle data receiving device, so that the in-vehicle data receiving device receives the data to be transmitted, obtains data to be received, performs verification data validation on the data to be received according to the data generation rules, obtains target data, and controls the in-vehicle data receiving device according to the target data; wherein, the data generation rules are used to standardize data validation rules and data segment composition rules.

[0013] In one embodiment of the present invention, the vehicle communication method based on Universal Serial Bus (USB) further includes a vehicle communication host and a USB device; the vehicle communication host is used to generate a data operation request packet and send it to the USB device, the data operation request packet is used to identify the vehicle communication host as the vehicle data transmitting device or the vehicle data receiving device; the USB device is used to identify the USB device as the vehicle data transmitting device or the vehicle data receiving device according to the data operation request packet.

[0014] The present invention also provides an electronic device comprising: one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the electronic device enables the vehicle communication method based on a universal serial bus as described in any of the above embodiments.

[0015] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a computer processor, causes the computer to perform the vehicle communication method based on a universal serial bus as described in any of the above embodiments.

[0016] The beneficial effects of the present invention are as follows: The present invention provides a vehicle communication method, device, equipment and medium based on a universal serial bus. In the present invention, data to be sent is generated by initial valid data and data generation rules and sent to the vehicle data receiving device. The data generation rules include data verification rules and data segment composition rules. The data receiving device verifies the received data to be sent according to the data generation rules. By sacrificing some real-time performance to increase data verification, the reliability of synchronous transmission in vehicle communication is improved.

[0017] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the invention. Attached Figure Description

[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention. It is obvious that the drawings described below are merely some embodiments of the invention, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings:

[0019] Figure 1 A schematic diagram of an exemplary system architecture to which the technical solutions of embodiments of the present invention can be applied is shown;

[0020] Figure 2 A schematic diagram of an in-vehicle communication method based on a universal serial bus according to an embodiment of the present invention is shown;

[0021] Figure 3 A schematic diagram of a segment data format according to an embodiment of the present invention is shown;

[0022] Figure 4 A segment diagram of an abnormal structure according to an embodiment of the present invention is shown;

[0023] Figure 5 A schematic diagram of a normal structure according to an embodiment of the present invention is shown;

[0024] Figure 6 A schematic diagram of a USB read / write process according to an embodiment of the present invention is shown;

[0025] Figure 7 A block diagram of a vehicle communication device based on a universal serial bus according to an embodiment of the present invention is shown;

[0026] Figure 8 A schematic diagram of a computer system suitable for implementing embodiments of the present invention is shown. Detailed Implementation

[0027] The embodiments of the present invention will be described below with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention and not for limiting the scope of protection of the present invention.

[0028] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Therefore, the drawings only show the components related to the present invention and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.

[0029] In the following description, numerous details are explored to provide a more thorough explanation of embodiments of the invention. However, it will be apparent to those skilled in the art that embodiments of the invention may be practiced without these specific details. In other embodiments, well-known structures and devices are shown in block diagram form rather than in detail to avoid obscuring embodiments of the invention.

[0030] First, it's important to understand that the USB 2.0 protocol defines four basic transfer types: Control transfer: commonly used for host configuration and control of devices; Synchronous transfer: used for periodic, low-latency data transfers that don't require guaranteed transmission quality, such as voice and video; Interrupt transfer: used for small, periodic data transfers requiring immediate response, such as keyboard, mouse, or game controller transfers; Bulk transfer: used for large, non-periodic data transfers without real-time requirements. Synchronous transfers offer advantages such as periodicity, large data volume, and high real-time performance, but compared to other transfer types, they lack an acknowledgment packet phase, resulting in lower reliability. USB synchronous transfers involve both the host and the device, with data reading and writing initiated by the host.

[0031] Please see Figure 1 , Figure 1 A schematic diagram of an exemplary system architecture to which the technical solutions of embodiments of the present invention can be applied is shown. For example... Figure 1 As shown, the system architecture may include an in-vehicle communication host 101 and a universal serial bus device 102. The in-vehicle communication host 101 includes, but is not limited to, a vehicle infotainment system and a hub, while the universal serial bus device 102 includes, but is not limited to, an electronic control unit (ECU). The in-vehicle communication host 101 generates data operation request packets and sends them to the universal serial bus device 102, determining the transmit / receive relationship between the in-vehicle communication host and the universal serial bus device based on the data operation request packets. Data transmission between the microcontroller unit (MCU) of the in-vehicle communication host and the MCU of the universal serial bus device is achieved via a USB transceiver, transmitting a differential signal pair of D+ and D-.

[0032] In general technology, ECUs using Universal Serial Bus (USB) for data transmission do not typically perform reliability enhancements for synchronous transmission. However, in automotive applications, the transmitted data is often critical, such as real-time traffic updates. Therefore, automotive USB communication not only needs to guarantee high real-time performance and large data transmission volumes, but also requires high reliability, although synchronous transmission has relatively low reliability.

[0033] To address the aforementioned technical problems, this invention provides a vehicle communication method, apparatus, device, and medium based on a universal serial bus. The implementation details of the technical solutions of the embodiments of this invention are described in detail below.

[0034] Please see Figure 2 , Figure 2 A flowchart illustrating an in-vehicle communication method based on a universal serial bus according to an embodiment of the present invention is shown. Figure 2 As shown, in an exemplary embodiment, the vehicle communication method based on a universal serial bus includes at least steps S210 to S230, which are described in detail below:

[0035] Step S210: Obtain the initial valid data and data generation rules of the vehicle-mounted data transmission device.

[0036] Among them, the data generation rules are used to standardize the data verification rules and the data segment composition rules.

[0037] In one embodiment of the present invention, before acquiring the initial valid data and data generation rules of the vehicle-mounted data transmitting device, the vehicle-mounted communication method based on the Universal Serial Bus further includes: acquiring the data operation behavior of the vehicle-mounted communication host; if the data operation behavior is a synchronous read operation, generating a data read request packet and identifying the vehicle-mounted communication host as the vehicle-mounted data receiving device; if the data operation behavior is a synchronous write operation, generating a data write request packet and identifying the vehicle-mounted communication host as the vehicle-mounted data transmitting device; and sending the data read request packet or the data write request packet as a data operation request packet to the Universal Serial Bus device.

[0038] In one embodiment of the present invention, data operation behavior is obtained in response to the data request of the vehicle communication host. During the synchronous read operation transmission, in the token packet phase, the USB bus is occupied, and the vehicle communication host generates and sends a data read request packet to the Universal Serial Bus device. The data read request packet, also known as an IN packet, is used to request to read device data from the Universal Serial Bus device. During the synchronous write operation transmission, in the token packet phase, the USB bus is occupied, and the vehicle communication host generates and sends a data write request packet to the Universal Serial Bus device. The data write request packet, also known as an OUT packet, is used to request to write device data to the Universal Serial Bus device.

[0039] In one embodiment of the present invention, after sending a data read request packet or a data write request packet as a data operation request packet to the Universal Serial Bus device, the vehicle communication method based on the Universal Serial Bus further includes: receiving a data operation request packet; if the data operation request packet is a data read request packet, then using the Universal Serial Bus device as a vehicle data transmitting device; if the data operation request packet is a data write request packet, then using the Universal Serial Bus device as a vehicle data receiving device.

[0040] In one embodiment of the present invention, the data verification rules are used to determine whether the data transmission is successful at the vehicle-mounted data receiving device. The data verification rules include, but are not limited to, XOR verification and redundancy verification.

[0041] In one embodiment of the present invention, the maximum packet length for synchronous transmission is 1024 bytes. Based on the original USB synchronous transmission data packets, the concept of "segments" is added, dividing each frame of valid data into several segments of customizable length. Please refer to... Figure 3 , Figure 3 A schematic diagram of a segment data format according to an embodiment of the present invention is shown, such as... Figure 3As shown, each segment has: segment start, segment sequence (segment ID), data length, valid data, check bit, and segment end. Data segment composition rules are used to standardize the composition relationship of data transmission segments. Segment start and segment end information mark the beginning and end of a "segment," and their content can be customized. After receiving a segment of data to be received, the vehicle-mounted data receiving device can determine whether the data segment has been offset based on the integrity of the "segment start" and "segment end." For example, the segment start, which marks the beginning of the segment, can be 0x00; the segment end, which marks the end of the segment, can be 0xFF. This is just an example, and the invention does not impose limitations. Segment ID: Used to identify the position of the segment in synchronous transmission. Data length: Records the number of bytes of valid data. Valid data: The segmented valid data to be transmitted. Check bit: An initial check value is obtained by calculating the initial check of the data within the segment according to the data check rules. This initial check value is used by the vehicle-mounted data receiving device to determine whether the data transmission was successful. The data within the segment includes the segment sequence (segment ID), data length, and valid data.

[0042] Step S220: Generate data to be sent based on the initial valid data and data generation rules.

[0043] In one embodiment of the present invention, generating data to be sent based on initial valid data and data generation rules includes: segmenting the initial valid data to obtain segmented initial data; performing initial data verification calculation on the segmented initial data according to data verification rules to obtain initial verification values; and generating data to be sent based on the segmented initial data, initial verification values, and data segment composition rules; wherein the segmented initial data includes segmented valid data, initial segment order, and segmented data length, and the data segment composition rules include segment start information and segment end information.

[0044] In one embodiment of the present invention, the initial valid data is segmented to obtain segmented valid data, segment ID, and segmented data length. The segmented data length is used to identify the number of bytes in the segmented valid data. An initial data verification calculation is then performed on the segmented valid data, segment ID, and segmented data length according to data verification rules to obtain an initial verification value.

[0045] Step S230: The data to be sent is sent to the vehicle data receiving device so that the vehicle data receiving device can receive the data to be sent, obtain the data to be received, and verify the data to be received according to the data generation rules to obtain the target data. The vehicle data receiving device is then controlled according to the target data.

[0046] In one embodiment of the present invention, during the transmission of a synchronous read operation, in the data packet phase, the Universal Serial Bus (USB) device sends the data to be transmitted to the vehicle communication host, and releases the USB bus after the data transmission is completed. During the transmission of a synchronous write operation, in the data packet phase, the vehicle communication host sends the data to be transmitted to the USB device, and releases the USB bus after the data transmission is completed.

[0047] In one embodiment of the present invention, the process of verifying the data to be received according to the data generation rules to obtain target data includes: correcting the data to be received according to the data segment composition rules to obtain corrected data; performing verification data verification calculation on the corrected data according to the data verification rules to obtain a verification value; if the verification value is consistent with the correction verification value in the corrected data, the corrected data is determined as the target data and stored; if the verification value is inconsistent with the correction verification value, the corrected data is discarded.

[0048] In one embodiment of the present invention, data correction is performed on the data to be received according to the data segment composition rules to obtain corrected data, including: determining the data offset state based on the segment start information, segment end information and the data to be received; if the data offset state is an abnormal segment, the data to be received is shifted to obtain corrected data; if the data offset state is a normal segment, the data to be received is determined as corrected data.

[0049] In one embodiment of the present invention, please refer to Figure 4 and Figure 5 , Figure 4 A schematic diagram of an abnormal structure according to an embodiment of the present invention is shown. Figure 5 A schematic diagram of a normal structure according to an embodiment of the present invention is shown. Errors caused by bus bit offset during transmission can be determined based on the integrity of the "segment" start and end. If the data in the segment has errors such as... Figure 4 The data offset state shown can be corrected by shifting the data. Figure 5 The state shown improves the fault tolerance of the data.

[0050] In one embodiment of the present invention, verification data calculations are performed on the correction segment sequence, correction data length, and valid correction data in the correction data according to data verification rules to obtain a verification value. If the verification value matches the correction verification value in the correction data, the correction data is identified as the target data and stored, and the vehicle-mounted data receiving device can be controlled based on the target data. If the verification value does not match the correction verification value, the correction data is discarded, awaiting the next data update. This invention sacrifices some real-time performance but greatly improves the reliability of data obtained from the sending end, solving the problem of low reliability in USB synchronous transmission.

[0051] In one embodiment of the present invention, please refer to Figure 6 , Figure 6 A schematic diagram of a USB read / write process according to an embodiment of the present invention is shown. Figure 6 As shown, during the synchronous read operation, in the token packet phase, the vehicle communication host sends an IN packet to the Universal Serial Bus (USB) device to initiate synchronous read transmission. In the data packet phase, the USB device performs a first checksum calculation on each segment of initial data to be sent, obtains a first checksum value, and places it in the first checksum bit; it then writes the initial data to be sent and the first checksum value to obtain the first data; and sends the first data to the vehicle communication host. Upon receiving the first data, the vehicle communication host stores it in Random Access Memory (RAM), copies the corresponding bit data and stores it in the corresponding segment buffer, performs data format correction, and obtains the second data. In the data content verification phase, the second data undergoes the same first checksum calculation as the USB device to obtain a target checksum value. The verification result is determined based on the consistency between the target checksum value and the second checksum value in the second data. If the verification is successful, the second data becomes effective; if the verification fails, the second data is discarded.

[0052] In one embodiment of the present invention, after data transmission is completed, the vehicle communication host or universal serial bus device can perform vehicle control based on the target data. For example, if the transmitted data is real-time road condition update data, the vehicle unit can optimize navigation based on the real-time road condition update data.

[0053] In one embodiment of the present invention, please continue reading. Figure 6 ,like Figure 6As shown, during the synchronous write operation, in the token packet phase, the vehicle communication host sends an OUT packet to initiate synchronous write transmission. In the data packet phase, the vehicle communication host performs a second checksum calculation on each segment of initial data to be sent, obtains a third checksum value, and places it in the checksum bit; it then writes the initial data to be sent and the third checksum value to obtain the third data; and sends the third data to the Universal Serial Bus (USB) device. After receiving the third data, the USB device stores it in RAM, copies the corresponding bit data and stores it in the corresponding segment buffer, performs data format correction, and obtains the fourth data. In the data content verification phase, the fourth data undergoes the same second checksum calculation as the vehicle communication host to obtain the target checksum value. The verification result is determined based on the consistency between the target checksum value and the fourth checksum value in the fourth data. If the verification is successful, the fourth data becomes effective; if the verification fails, the fourth data is discarded. This invention not only leverages the real-time advantage of USB synchronous transmission, but also strikes a balance between real-time performance and reliability. When the sending end updates erroneous data, the receiving end prioritizes correcting the erroneous data upon receiving the new data. If it cannot be corrected, it discards the data and waits for the next update. This sacrifices some real-time performance but greatly improves the reliability of data acquisition from the receiving end, thus solving the technical problem of low reliability in USB synchronous transmission.

[0054] Please see Figure 7 , Figure 7 A block diagram of a vehicle communication device based on a universal serial bus according to an embodiment of the present invention is shown. This device can be applied to... Figure 1 The implementation environment shown is not limited to this embodiment. This device can also be applied to other exemplary implementation environments and specifically configured in other devices. This embodiment does not limit the implementation environment to which the device is applicable.

[0055] like Figure 7 As shown, an in-vehicle communication device 700 based on a universal serial bus according to an embodiment of the present invention includes: an acquisition module 701, a data generation module 702, and a transmission module 703.

[0056] The acquisition module 701 is used to acquire the initial valid data and data generation rules of the vehicle-mounted data transmitting device; the data generation module 702 is used to generate data to be sent based on the initial valid data and data generation rules; the sending module 703 is used to send the data to be sent to the vehicle-mounted data receiving device so that the vehicle-mounted data receiving device can receive the data to be sent, obtain the data to be received, and perform data verification on the data to be received according to the data generation rules to obtain the target data, and control the vehicle-mounted data receiving device based on the target data; wherein, the data generation rules are used to standardize the data verification rules and data segment composition rules.

[0057] Please continue reading. Figure 1 ,like Figure 1As shown, according to an embodiment of the present invention, the vehicle communication device based on a Universal Serial Bus (USB) and the vehicle communication method based on a USB further include a vehicle communication host 101 and a USB device 102; the vehicle communication host is used to generate a data operation request packet and send it to the USB device, the data operation request packet is used to determine the vehicle communication host as a vehicle data transmitting device or a vehicle data receiving device; the USB device is used to determine the USB device as a vehicle data transmitting device or a vehicle data receiving device according to the data operation request packet.

[0058] It should be noted that the vehicle communication device based on Universal Serial Bus (USB) provided in the above embodiments and the vehicle communication method based on USB provided in the above embodiments belong to the same concept. The specific operation methods of each module and unit have been described in detail in the method embodiments and will not be repeated here. In practical applications, the vehicle communication device based on USB provided in the above embodiments can allocate the above functions to different functional modules as needed, that is, divide the internal structure of the device into different functional modules to complete all or part of the functions described above. This is not a limitation here.

[0059] Embodiments of the present invention also provide an electronic device, including: one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the electronic device enables the vehicle communication method based on a universal serial bus provided in the above embodiments.

[0060] Please see Figure 8 , Figure 8 A schematic diagram of a computer system suitable for implementing embodiments of the present invention is shown. It should be noted that... Figure 8 The computer system 800 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.

[0061] like Figure 8As shown, the computer system 800 includes a Central Processing Unit (CPU) 801, which can perform various appropriate actions and processes, such as executing the methods described in the above embodiments, based on a program stored in Read-Only Memory (ROM) 802 or a program loaded from storage portion 808 into Random Access Memory (RAM) 803. The RAM 803 also stores various programs and data required for system operation. The CPU 801, ROM 802, and RAM 803 are interconnected via a bus 804. An Input / Output (I / O) interface 805 is also connected to the bus 804.

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

[0063] According to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing a computer program for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 809, and / or installed from removable medium 811. When the computer program is executed by central processing unit (CPU) 801, it performs various functions defined in the system of the present invention.

[0064] It should be noted that the computer-readable medium shown in the embodiments of the present invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example, 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), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying a computer-readable computer program. Such propagated data signals may 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 computer program contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.

[0065] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains 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 consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0066] The units described in the embodiments of the present invention can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.

[0067] Another aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a computer's processor, causes the computer to perform the vehicle communication method based on a universal serial bus as provided in the various embodiments described above. This computer-readable storage medium may be included in the electronic devices described in the above embodiments, or it may exist independently and not incorporated into the electronic device.

[0068] In the above embodiments, unless otherwise specified, the use of ordinal numbers such as "first" and "second" to describe common objects only indicates that they refer to different instances of the same object, rather than indicating that the objects being described must be in a given order, whether temporally, spatially, sequentially, or in any other way.

[0069] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in the present invention should still be covered by the claims of the present invention.

Claims

1. A vehicle-mounted communication method based on a universal serial bus, characterized in that, The vehicle communication method based on a universal serial bus includes: Obtain the initial valid data and data generation rules of the vehicle-mounted data transmission device; Data to be sent is generated based on the initial valid data and the data generation rules; The data to be sent is sent to an on-board data receiving device, which receives the data to be sent, obtains the data to be received, and performs verification data validation on the data to be received according to the data generation rules to obtain target data. The on-board data receiving device is then controlled according to the target data. Specifically, this includes: performing data correction on the data to be received according to data segment composition rules to obtain corrected data; performing verification data validation calculation on the corrected data according to the data validation rules to obtain a verification value; if the verification value is consistent with the correction value in the corrected data, the corrected data is determined as the target data and stored; if the verification value is inconsistent with the correction value, the corrected data is discarded. The data generation rules are used to standardize data verification rules and data segment composition rules. The data segment composition rules include segment start information and segment end information. The data segment composition rules are used to add segments to the data packets synchronously transmitted on the Universal Serial Bus. Each segment includes segment start, segment order, data length, valid data, check bit, and segment end. Specifically, the data to be received is corrected according to the data segment composition rules to obtain corrected data, including: The data offset status is determined based on the segment start information, the segment end information, and the data to be received; If the data offset state is an abnormal segment, the data to be received is shifted to obtain the corrected data; If the data offset state is a normal segment, then the data to be received is determined as the correction data.

2. The vehicle communication method based on a universal serial bus according to claim 1, characterized in that, Generate data to be sent based on the initial valid data and the data generation rules, including: The initial valid data is segmented to obtain segmented initial data; According to the data verification rules, the initial data of the segments is subjected to initial data verification calculation to obtain the initial verification value; Data to be sent is generated based on the segmented initial data, initial check value, and data segment composition rules; The initial segmentation data includes valid segmentation data, initial segmentation order, and segmentation data length.

3. The vehicle communication method based on a universal serial bus according to any one of claims 1-2, characterized in that, Before acquiring the initial valid data and data generation rules of the vehicle-mounted data transmission device, the vehicle-mounted communication method based on the universal serial bus further includes: Data operation behavior of acquiring vehicle-mounted communication host; If the data operation is a synchronous read operation, a data read request packet is generated, and the vehicle communication host is identified as the vehicle data receiving device. If the data operation is a synchronous write operation, a data write request packet is generated, and the vehicle communication host is identified as the vehicle data transmission device. The data read request packet or the data write request packet is sent to the Universal Serial Bus device as a data operation request packet.

4. The vehicle communication method based on a universal serial bus according to claim 3, characterized in that, After sending the data read request packet or the data write request packet as a data operation request packet to the Universal Serial Bus device, the vehicle communication method based on the Universal Serial Bus further includes: Receive the data operation request packet; If the data operation request packet is the data read request packet, then the universal serial bus device is used as the vehicle data transmission device; If the data operation request packet is the data write request packet, then the universal serial bus device is used as an on-board data receiving device.

5. A vehicle-mounted communication device based on a universal serial bus, characterized in that, The vehicle communication device based on a universal serial bus includes: The acquisition module is used to acquire the initial valid data and data generation rules of the vehicle-mounted data transmission device; The generation module is used to generate data to be sent based on the initial valid data and the data generation rules; A sending module is used to send the data to be sent to an in-vehicle data receiving device, so that the in-vehicle data receiving device receives the data to be sent, obtains the data to be received, and performs verification data validation on the data to be received according to the data generation rules to obtain target data. The in-vehicle data receiving device is then controlled according to the target data. Specifically, this includes: performing data correction on the data to be received according to data segment composition rules to obtain corrected data; performing verification data validation calculation on the corrected data according to the data validation rules to obtain a verification value; if the verification value matches the correction value in the corrected data, the corrected data is identified as the target data and stored; if the verification value does not match the correction value, the corrected data is discarded. The data generation rules are used to standardize data verification rules and data segment composition rules. The data segment composition rules include segment start information and segment end information. The data segment composition rules are used to add segments to the data packets synchronously transmitted on the Universal Serial Bus. Each segment includes segment start, segment order, data length, valid data, check bit, and segment end. Specifically, the data to be received is corrected according to the data segment composition rules to obtain corrected data, including: The data offset status is determined based on the segment start information, the segment end information, and the data to be received; If the data offset state is an abnormal segment, the data to be received is shifted to obtain the corrected data; If the data offset state is a normal segment, then the data to be received is determined as the correction data.

6. The vehicle communication device based on Universal Serial Bus according to claim 5, the vehicle communication method based on Universal Serial Bus further includes a vehicle communication host and a Universal Serial Bus device; The vehicle communication host is used to generate a data operation request packet and send it to the universal serial bus device. The data operation request packet is used to identify the vehicle communication host as the vehicle data transmitting device or the vehicle data receiving device. The Universal Serial Bus (USB) device is used to identify the USB device as the vehicle data transmitting device or the vehicle data receiving device based on the data operation request packet.

7. An electronic device, characterized in that, The electronic device includes: One or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, cause the electronic device to implement the vehicle communication method based on a universal serial bus as described in any one of claims 1 to 4.

8. A computer-readable storage medium, characterized in that, It stores a computer program, which, when executed by the computer's processor, causes the computer to perform the vehicle communication method based on a universal serial bus as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Offline automobile gearbox NVH (noise, vibration and harshness) detecting method

    CN104792519A

  • Data writing method and system, writing equipment and target equipment

    CN104391727A

  • On-vehicle electronic control device

    JP1995269409A