CN116192982A - Vehicle-mounted communication method, device, equipment and storage medium - Google Patents

Vehicle-mounted communication method, device, equipment and storage medium Download PDF

Info

Publication number
CN116192982A
CN116192982A CN202310121650.0A CN202310121650A CN116192982A CN 116192982 A CN116192982 A CN 116192982A CN 202310121650 A CN202310121650 A CN 202310121650A CN 116192982 A CN116192982 A CN 116192982A
Authority
CN
China
Prior art keywords
data
layer
vehicle
target
original data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310121650.0A
Other languages
Chinese (zh)
Inventor
黄欣
王冕
刘力华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ecarx Hubei Tech Co Ltd
Original Assignee
Ecarx Hubei Tech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ecarx Hubei Tech Co Ltd filed Critical Ecarx Hubei Tech Co Ltd
Priority to CN202310121650.0A priority Critical patent/CN116192982A/en
Publication of CN116192982A publication Critical patent/CN116192982A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Communication Control (AREA)

Abstract

The application provides a vehicle-mounted communication method, a device, equipment and a storage medium, and relates to the technical field of vehicle communication, wherein the vehicle-mounted communication method comprises the following steps: the method comprises the steps that original data to be transmitted are obtained through transmitting end equipment in a vehicle machine, the original data are packaged according to a preset communication protocol, target data are obtained, the preset communication protocol comprises a data layer, a field layer and a transmission layer, field identifiers of the field layer are used for distinguishing different bottom drives, the target bottom drives are determined according to the field identifiers corresponding to the target data, and the target data are transmitted through the target bottom drives; therefore, the receiving end equipment in the vehicle receives the target data from the target bottom layer driver, and analyzes the target data according to the preset communication protocol to obtain the original data. The method and the device can effectively improve the adaptation efficiency of the communication protocol between the transmitting end device and the receiving end device in the vehicle, and the communication protocol is independent of bottom driving, so that the method and the device have good universality.

Description

Vehicle-mounted communication method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of vehicle communications technologies, and in particular, to a vehicle-mounted communication method, device, equipment, and storage medium.
Background
With the development of vehicle technology, in a daily vehicle environment of people, a vehicle has become an indispensable large configuration, and different control devices in the vehicle communicate with each other through a communication protocol, wherein the communication protocol depends on an underlying driver.
At present, when one control device in the vehicle is in communication with other control devices through a communication protocol, the control device uses different communication protocols to communicate according to different bottom drives. For example, when the control device a communicates with the control device B, determining a first communication protocol according to the bottom layer driver corresponding to the control device a and the control device B, where the control device a communicates with the control device B through the first communication protocol; when the control device A communicates with the control device C, a second communication protocol is determined according to the bottom layer driver corresponding to the control device A and the control device C, and the control device A communicates with the control device C through the second communication protocol. By the communication method, the adaptation efficiency of the communication protocol between the control devices is not high.
Disclosure of Invention
The application provides a vehicle-mounted communication method, device, equipment and storage medium, which are used for solving the problem of low adaptation efficiency of communication protocols between different control equipment in a vehicle.
In a first aspect, the present application provides a vehicle-mounted communication method, applied to a transmitting end device in a vehicle, where the vehicle-mounted communication method includes:
acquiring original data to be transmitted;
the method comprises the steps that original data are packaged according to a preset communication protocol to obtain target data, wherein the preset communication protocol comprises a data layer, a domain layer and a transmission layer, the domain layer comprises domain identifiers, and the domain identifiers are used for distinguishing different bottom drives;
determining a target bottom layer driver according to the field identifier corresponding to the target data;
and sending the target data through the target bottom layer driver.
Optionally, the packaging processing is performed on the original data according to a preset communication protocol to obtain target data, including: the method comprises the steps of carrying out packaging processing on original data through a data layer to obtain first data, wherein the first data at least comprises the original data, a message type and a module identifier; the first data is packaged through the domain layer to obtain second data, wherein the second data at least comprises the first data, the domain identifier and the data length corresponding to the original data; and encapsulating the second data through the transmission layer to obtain target data, wherein the target data at least comprises the second data, a data transmission direction, a frame start identifier of the transmission layer, a frame length and cyclic redundancy check (Cyclic Redundancy Check, CRC) information of the frame.
Optionally, after obtaining the original data to be sent, the vehicle-mounted communication method further includes: encrypting the original data based on a preset encryption algorithm to obtain the encrypted original data; the method comprises the steps of carrying out packaging processing on the original data according to a preset communication protocol to obtain target data, wherein the steps include: and carrying out encapsulation processing on the encrypted original data according to a preset communication protocol to obtain target data.
In a second aspect, the present application provides a vehicle-mounted communication method, applied to a receiving end device in a vehicle, where the vehicle-mounted communication method includes:
receiving target data from a target bottom layer driver, wherein the target data is obtained after a transmitting end device in a vehicle machine encapsulates original data to be transmitted according to a preset communication protocol, the preset communication protocol comprises a data layer, a domain layer and a transmission layer, the domain layer comprises domain identifiers, the domain identifiers are used for distinguishing different bottom layer drivers, and the target bottom layer driver is determined by the transmitting end device according to the domain identifiers corresponding to the target data;
and analyzing the target data according to a preset communication protocol to obtain the original data.
Optionally, the analyzing the target data according to a preset communication protocol to obtain the original data includes: analyzing the target data through the transmission layer to obtain third data; analyzing the third data through the field layer to obtain fourth data; and analyzing the fourth data through the data layer to obtain the original data.
Optionally, the original data is encrypted original data, and after the original data is obtained, the vehicle-mounted communication method further includes: based on a preset decryption algorithm, decrypting the original data to obtain decrypted original data; based on a preset verification algorithm, verifying the decrypted original data to obtain a verification result; and determining whether the decrypted original data is valid or not according to the verification result.
In a third aspect, the present application provides an in-vehicle communication apparatus applied to a transmitting end device in a vehicle, the in-vehicle communication apparatus including:
the acquisition module is used for acquiring the original data to be transmitted;
the processing module is used for carrying out encapsulation processing on the original data according to a preset communication protocol to obtain target data, wherein the preset communication protocol comprises a data layer, a domain layer and a transmission layer, the domain layer comprises a domain identifier, and the domain identifier is used for distinguishing different bottom drives;
the determining module is used for determining a target bottom layer drive according to the field identifier corresponding to the target data;
and the sending module is used for sending the target data through the target bottom layer driver.
Optionally, the processing module is specifically configured to: the method comprises the steps of carrying out packaging processing on original data through a data layer to obtain first data, wherein the first data at least comprises the original data, a message type and a module identifier; the first data is packaged through the domain layer to obtain second data, wherein the second data at least comprises the first data, the domain identifier and the data length corresponding to the original data; and encapsulating the second data through the transmission layer to obtain target data, wherein the target data at least comprises the second data, a data transmission direction, a frame start identifier of the transmission layer, a frame length and frame CRC information.
Optionally, the processing module is further configured to: after the acquisition module acquires the original data to be transmitted, encrypting the original data based on a preset encryption algorithm to obtain the encrypted original data; the processing module is specifically used for: and carrying out encapsulation processing on the encrypted original data according to a preset communication protocol to obtain target data.
In a fourth aspect, the present application provides an in-vehicle communication apparatus applied to a receiving-end device in a vehicle, the in-vehicle communication apparatus including:
the receiving module is used for receiving target data from a target bottom layer driver, the target data are obtained after the original data to be sent are packaged by a sending end device in the vehicle machine according to a preset communication protocol, the preset communication protocol comprises a data layer, a field layer and a transmission layer, the field layer comprises field identifiers, the field identifiers are used for distinguishing different bottom layer drivers, and the target bottom layer driver is determined by the sending end device according to the field identifiers corresponding to the target data;
and the processing module is used for analyzing and processing the target data according to a preset communication protocol to obtain the original data.
Optionally, the processing module is specifically configured to: analyzing the target data through the transmission layer to obtain third data; analyzing the third data through the field layer to obtain fourth data; and analyzing the fourth data through the data layer to obtain the original data.
Optionally, the original data is encrypted original data, and the processing module is further configured to: after the original data is obtained, carrying out decryption processing on the original data based on a preset decryption algorithm to obtain decrypted original data; based on a preset verification algorithm, verifying the decrypted original data to obtain a verification result; and determining whether the decrypted original data is valid or not according to the verification result.
In a fifth aspect, the present application provides an electronic device, comprising: a processor, a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored in the memory to implement the vehicle-mounted communication method as described in the first or second aspect of the present application.
In a sixth aspect, the present application provides a computer readable storage medium having stored therein computer program instructions which, when executed by a processor, implement the vehicle-mounted communication method according to the first or second aspect of the present application.
In a seventh aspect, the present application provides a computer program product comprising a computer program which, when executed by a processor, implements the vehicle-mounted communication method according to the first or second aspect of the present application.
According to the vehicle-mounted communication method, device and equipment and storage medium, original data to be transmitted are obtained through the transmitting end equipment in the vehicle, the original data are packaged according to the preset communication protocol to obtain target data, the preset communication protocol comprises a data layer, a domain layer and a transmission layer, the domain layer comprises domain identifiers, the domain identifiers are used for distinguishing different bottom drives, the target bottom drives are determined according to the domain identifiers corresponding to the target data, the target data are transmitted through the target bottom drives, so that the receiving end equipment in the vehicle receives the target data from the target bottom drives, and analysis processing is carried out on the target data according to the preset communication protocol to obtain the original data. According to the method and the device, different bottom drives are distinguished through the field identification in the preset communication protocol, namely, each bottom drive is adapted through the protocol layer, and the communication protocol used by communication of the two parties is determined according to the bottom drives by the sending end equipment and the receiving end equipment in the vehicle machine is not needed, so that the adaptation efficiency of the communication protocol between the sending end equipment and the receiving end equipment in the vehicle machine can be effectively improved, the communication protocol does not depend on the bottom drives, and the method and the device have good universality.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief description will be given below of the drawings that are needed in the embodiments or the prior art descriptions, and it is obvious that the drawings in the following description are some embodiments of the present application, and that other drawings can be obtained according to these drawings without inventive effort to a person skilled in the art.
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present application;
fig. 2 is a signaling interaction schematic diagram of a vehicle-mounted communication method according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a data structure of a preset communication protocol according to an embodiment of the present application;
fig. 4 is a flowchart of a vehicle-mounted communication method according to an embodiment of the present application;
fig. 5 is a flowchart of a vehicle-mounted communication method according to another embodiment of the present application;
fig. 6 is a schematic structural diagram of an in-vehicle communication device according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of an in-vehicle communication device according to another embodiment of the present application;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are information and data authorized by the user or fully authorized by each party, and the collection, use and processing of the related data need to comply with the related laws and regulations and standards of the related country and region, and provide corresponding operation entries for the user to select authorization or rejection.
At present, when different control devices in a vehicle machine communicate with each other, different communication protocols are used for communication according to different bottom layer drivers, namely, the communication protocols are related to the bottom layer drivers, and when the application layers communicate with each other, the communication protocols are different, so that in the software development process, the two communication parties spend a large amount of time adapting to the communication protocols of the other party, the adaptation efficiency of the communication protocols is low, and waste of some resources and time is caused; the communication protocol is not generic because it depends on the underlying determination.
Based on the above problems, the application provides a vehicle-mounted communication method, a device, equipment and a storage medium, which are based on a preset communication protocol, add some control fields to the original data to be sent to layer the original data, so as to facilitate the packaging processing and the analysis processing of the original data; meanwhile, different bottom layer drivers can be called by the bottom layer of the preset communication protocol, for example, a serial peripheral interface (Serial Peripheral Interface, SPI) driver or an Ethernet driver is called for data transmission, so that the preset communication protocol can be adapted to each bottom layer driver, the adaptation efficiency of the communication protocol between different control devices in the vehicle can be effectively improved, the communication protocol is independent of the bottom layer drivers, and the communication protocol has good universality. In addition, the protocol layer uses an end-to-end protection protocol to check and protect the data, and can support different end-to-end protection algorithms to realize the functional safety requirement of the highest automobile safety integrity grade (Automotive Safety Integration Level, ASIL) D grade.
In the following, first, an application scenario of the solution provided in the present application is illustrated.
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present application. As shown in fig. 1, in the present application scenario, a control device X in a vehicle machine communicates with a control device 1 through a preset communication protocol, communicates with a control device 2 through the preset communication protocol, and communicates with a control device n through the preset communication protocol, that is, the control device X communicates with the control devices 1 to n respectively through the same preset communication protocol.
It should be noted that fig. 1 is only a schematic diagram of an application scenario provided by the embodiment of the present application, and the embodiment of the present application does not limit the devices included in fig. 1, or limit the positional relationship between the devices in fig. 1.
The following describes the technical scheme of the present application in detail through specific embodiments. It should be noted that the following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
Fig. 2 is a signaling interaction schematic diagram of a vehicle-mounted communication method according to an embodiment of the present application. As shown in fig. 2, the method of the embodiment of the present application includes:
S201, a transmitting end device in the vehicle acquires original data to be transmitted.
In the embodiment of the application, the transmitting end device in the vehicle machine is, for example, a System On Chip (SOC) or a micro control unit (Microcontroller Unit, MCU). Taking the SOC as an example, the SOC may obtain, according to a service requirement, original data to be transmitted related to the service.
S202, the transmitting terminal equipment in the vehicle machine encapsulates the original data according to a preset communication protocol to obtain target data, wherein the preset communication protocol comprises a data layer, a field layer and a transmission layer, the field layer comprises a field identifier, and the field identifier is used for distinguishing different bottom drives.
Fig. 3 is a schematic diagram of a data structure of a preset communication protocol according to an embodiment of the present application, where, as shown in fig. 3, actual data and header information fields of the data layer correspond to a data layer of the preset communication protocol; the domain layer of the preset communication protocol comprises a data layer and a domain layer header information field, the domain layer comprises a domain identifier (domainID), the domainID is used for distinguishing different bottom drives, it can be understood that the value of the domainID is predetermined by a transmitting end device and a receiving end device in the vehicle, for example, the value of the domainID is 0x1, the data transmission direction is indicated to transmit data to the MCU, and the data is transmitted by using SPI drive corresponding to a channel 1 of a protocol stack; the transmission layer of the preset communication protocol comprises a field layer, a data layer, a transmission layer header information field and transmission layer CRC information.
In the step, after the transmitting end equipment in the vehicle machine acquires the original data to be transmitted, adding some control fields into the original data to be transmitted according to a preset communication protocol to perform layered packaging processing, so as to obtain target data. For how the transmitting end device encapsulates the original data according to the preset communication protocol to obtain the target data, reference may be made to the subsequent embodiments, which are not described herein.
S203, the transmitting end equipment in the vehicle determines a target bottom layer drive according to the field identifier corresponding to the target data.
Illustratively, the domain identifier may be understood as a routing index identifier, where different values of the domain identifier correspond to different underlying drivers, for example, a DomainID value of 0x1 indicates that the SPI driver is used to transmit data, a DomainID value of 0x02 indicates that the shared memory driver is used to transmit data, and a DomainID value of 0x03 indicates that other underlying drivers are used to transmit data. Therefore, the transmitting end equipment in the vehicle can determine the target bottom layer drive according to the field identifier corresponding to the target data.
S204, transmitting end equipment in the vehicle machine transmits target data through a target bottom layer driver.
Correspondingly, receiving terminal equipment in the vehicle receives target data from the target bottom layer drive.
In the step, after the transmitting end device in the vehicle machine determines the target bottom layer driver, the transmitting end device in the vehicle machine can transmit target data through the target bottom layer driver, and correspondingly, the receiving end device in the vehicle machine can receive the target data from the target bottom layer driver.
S205, analyzing and processing the target data by the receiving end equipment in the vehicle machine according to a preset communication protocol to obtain the original data.
In the step, after receiving the target data from the target bottom layer driver, the receiving end device in the vehicle machine can perform hierarchical analysis processing on the target data according to a preset communication protocol to obtain original data, wherein the original data is the actual data sent by the sending end device in the vehicle machine.
For how the receiving end device specifically analyzes the target data according to the preset communication protocol to obtain the original data, reference may be made to the subsequent embodiments, which are not described herein.
According to the vehicle-mounted communication method, original data to be transmitted are obtained through the transmitting end equipment in the vehicle, the original data are packaged according to the preset communication protocol to obtain target data, the preset communication protocol comprises a data layer, a domain layer and a transmission layer, the domain layer comprises domain identifiers, the domain identifiers are used for distinguishing different bottom layer drivers, the target bottom layer drivers are determined according to the domain identifiers corresponding to the target data, the target data are transmitted through the target bottom layer drivers, so that receiving end equipment in the vehicle receives the target data from the target bottom layer drivers, and analysis processing is carried out on the target data according to the preset communication protocol to obtain the original data. According to the method and the device for determining the communication protocol of the vehicle, different bottom drives are distinguished through the field identification in the preset communication protocol, namely, each bottom drive is adapted through the protocol layer, and the communication protocol used by communication of the two parties is determined according to the bottom drives by the sending end equipment and the receiving end equipment in the vehicle, so that the adaptation efficiency of the communication protocol between the sending end equipment and the receiving end equipment in the vehicle and the different control equipment can be effectively improved, the communication protocol is independent of the bottom drives, and the method and the device for determining the communication protocol of the vehicle have good universality.
On the basis of the above embodiments, fig. 4 is a flowchart of a vehicle-mounted communication method according to an embodiment of the present application, which is applied to a transmitting end device in a vehicle. As shown in fig. 4, the method of the embodiment of the present application includes:
s401, acquiring original data to be transmitted.
A detailed description of this step may be referred to the related description of S201 in the embodiment shown in fig. 2, and will not be repeated here.
S402, encrypting the original data based on a preset encryption algorithm to obtain the encrypted original data.
In order to ensure the safe transmission of the original data, the step carries out encryption processing on the original data. Illustratively, the preset encryption algorithm is, for example, an end-to-end protection algorithm or a CRC check algorithm, which is not limited in the embodiments of the present application. The original data can be encrypted based on an end-to-end protection algorithm, and the encrypted original data is obtained. By encrypting the original data, the functional security requirement of the highest ASIL D level can be achieved.
In this embodiment of the present application, the encrypted original data may be encapsulated according to a preset communication protocol to obtain the target data, so step S202 in fig. 2 may further include the following three steps S403 to S405:
S403, packaging the encrypted original data through a data layer of a preset communication protocol to obtain first data.
The first data at least comprises the original data after encryption processing, a message type (Messagntype) and a module identifier (Opcode).
The first data may be understood as critical control field information of the data layer, wherein the message type is, for example, a command type or a notification type, etc., and the module identification is used to identify different functional modules in the vehicle. Referring to fig. 3, the message type and the module identifier may be used as a header information field of the data layer, the encrypted original data may be used as actual data of the data layer, and the data layer may be used to encapsulate the encrypted original data, so as to obtain the first data.
S404, packaging the first data through a field layer of a preset communication protocol to obtain second data.
The second data at least comprises the first data, the domain identifier and the data length corresponding to the original data.
The second data may be understood as critical control field information of a domain layer, where the domain identification is used to distinguish between different underlying drives, for example. Referring to fig. 3, the domain identifier and the data length corresponding to the original data may be used as the domain layer header information field, and the first data may be encapsulated by the domain layer to obtain the second data.
Alternatively, the critical control field information of the domain layer may also use other control field information as needed.
S405, packaging the second data through a transmission layer of a preset communication protocol to obtain target data.
The target data at least comprises second data, a data transmission direction, a start identification of a frame of a transmission layer, a length of the frame and CRC information of the frame.
For example, the target data may be understood as critical control field information of a transport layer, wherein a data transmission direction is used to select a channel for data transmission, and the data transmission direction and the DomainID are in one-to-one correspondence. For example, the DomainID takes a value of 0x1, which indicates that the data transmission direction is to send data to the MCU, and corresponds to channel 1 of the protocol stack, and uses the SPI driver to transmit data. Referring to fig. 3, the data transmission direction, the start identifier of the frame of the transmission layer, the length of the whole frame, and the CRC information of the whole frame may be used as the header information field of the transmission layer, and the second data may be encapsulated by the transmission layer to obtain the target data.
Alternatively, the key control field information of the transport layer may also use other control field information as needed.
S406, determining the target bottom layer driver according to the field identifier corresponding to the target data.
A detailed description of this step may be referred to the related description of S203 in the embodiment shown in fig. 2, and will not be repeated here.
S407, sending the target data through the target bottom layer driver.
A detailed description of this step may be referred to as S204 in the embodiment shown in fig. 2, and will not be described herein.
The vehicle-mounted communication method is applied to transmitting end equipment in a vehicle machine, and the original data is encrypted based on a preset encryption algorithm by acquiring the original data to be transmitted, so that the encrypted original data is obtained; the method comprises the steps of carrying out packaging processing on encrypted original data through a data layer of a preset communication protocol to obtain first data, carrying out packaging processing on the first data through a field layer of the preset communication protocol to obtain second data, and carrying out packaging processing on the second data through a transmission layer of the preset communication protocol to obtain target data; and determining a target bottom layer driver according to the field identifier corresponding to the target data, and sending the target data through the target bottom layer driver. According to the embodiment of the application, the original data to be sent are subjected to layered encapsulation processing through the preset communication protocol, different bottom drives are distinguished according to the field identification of the preset communication protocol, namely, each bottom drive is adapted through a protocol layer, communication protocols used by communication of the sending end equipment and the receiving end equipment in the vehicle are not required to be determined according to the bottom drives, so that the adaptation efficiency of the communication protocols between the different control equipment, namely, the sending end equipment and the receiving end equipment in the vehicle can be effectively improved, the communication protocols are independent of the bottom drives, and the application has good universality; in addition, by encrypting the original data to be transmitted, the safety of data transmission can be ensured, and the functional safety requirement of the highest ASIL D level can be realized.
On the basis of the above embodiment, fig. 5 is a flowchart of a vehicle-mounted communication method according to another embodiment of the present application, which is applied to a receiving end device in a vehicle. As shown in fig. 5, the method of the embodiment of the present application includes:
s501, receiving target data from a target bottom layer driver, wherein the target data are obtained after a transmitting end device in a vehicle machine encapsulates original data to be transmitted according to a preset communication protocol, the preset communication protocol comprises a data layer, a domain layer and a transmission layer, the domain layer comprises domain identifiers, the domain identifiers are used for distinguishing different bottom layer drivers, and the target bottom layer driver is determined by the transmitting end device according to the domain identifiers corresponding to the target data.
A detailed description of this step may be referred to the related description of the embodiment shown in fig. 2, and will not be repeated here.
In this embodiment, step S205 in fig. 2 may further include three steps S502 to S504 as follows:
s502, analyzing and processing the target data through a transmission layer of a preset communication protocol to obtain third data.
Illustratively, referring to the above example of step S405, the target data is parsed by the transport layer of the preset communication protocol, so as to obtain third data, where the third data includes the second data, the data transmission direction, the start identifier of the frame of the transport layer, the length of the frame, and CRC information of the frame.
S503, analyzing the third data through a field layer of a preset communication protocol to obtain fourth data.
Illustratively, referring to the example of step S404, the third data is parsed by the domain layer of the preset communication protocol to obtain fourth data, where the fourth data includes, for example, the first data, the domain identifier, and a data length corresponding to the original data.
S504, analyzing the fourth data through a data layer of a preset communication protocol to obtain the original data.
Illustratively, referring to the example of step S403, the original data, the message type, the module identifier, and the like may be obtained by performing parsing processing on the fourth data through a data layer of a preset communication protocol.
In order to ensure the security of data transmission, if the original data is the encrypted original data, after the original data is obtained, the vehicle-mounted communication method provided in the embodiment of the application may further include the following three steps S505 to S507:
s505, performing decryption processing on the original data based on a preset decryption algorithm to obtain the decrypted original data.
Illustratively, the preset decryption algorithm is a decryption algorithm corresponding to the preset encryption algorithm, and the preset decryption algorithm is not limited in the embodiments of the present application. After the fourth data is analyzed and processed through the data layer of the preset communication protocol to obtain the encrypted original data, the encrypted original data can be decrypted based on a preset decryption algorithm to obtain the decrypted original data. If the decryption fails, the original data is discarded.
S506, based on a preset verification algorithm, verifying the decrypted original data to obtain a verification result.
In this step, the embodiment of the present application does not limit the preset verification algorithm. After the decrypted original data is obtained, the decrypted original data can be subjected to verification processing based on a preset verification algorithm, so that a verification result is obtained.
S507, determining whether the decrypted original data is valid or not according to the verification result.
For example, if the verification result is that the verification fails, it is determined that the decrypted original data is invalid, and the decrypted original data may be discarded; if the verification result is that the verification is successful, the original data after decryption processing is determined to be effective.
Optionally, the original data may be transferred to different application layers according to the information such as the domain identifier obtained by parsing in step S503.
The vehicle-mounted communication method is applied to receiving end equipment in a vehicle machine, target data from target bottom layer drivers are received, the target data are obtained after the sending end equipment in the vehicle machine encapsulates original data to be sent according to a preset communication protocol, the preset communication protocol comprises a data layer, a field layer and a transmission layer, the field layer comprises field identifiers, the field identifiers are used for distinguishing different bottom layer drivers, and the target bottom layer drivers are determined according to the field identifiers corresponding to the target data; analyzing the target data through a transmission layer of a preset communication protocol to obtain third data, analyzing the third data through a field layer of the preset communication protocol to obtain fourth data, analyzing the fourth data through a data layer of the preset communication protocol, decrypting the encrypted original data based on a preset decryption algorithm to obtain decrypted original data; and carrying out verification processing on the decrypted original data based on a preset verification algorithm to obtain a verification result, and determining whether the decrypted original data is effective or not according to the verification result. The target data in the embodiment of the application are obtained after the transmitting end equipment in the vehicle machine encapsulates the original data to be transmitted according to the preset communication protocol, wherein the field identifier of the preset communication protocol can distinguish different bottom layer drivers, namely, each bottom layer driver is adapted through the protocol layer, so that the adaptation efficiency of the communication protocol between the transmitting end equipment and the receiving end equipment in the vehicle machine can be effectively improved. In addition, the original data obtained through the hierarchical analysis processing of the preset communication protocol is decrypted and checked, so that the safety of data transmission can be ensured, and the functional safety requirement of the highest ASIL D level can be realized.
The following are device embodiments of the present application, which may be used to perform method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.
Fig. 6 is a schematic structural diagram of an in-vehicle communication device according to an embodiment of the present application, which is applied to a transmitting end device in a vehicle. As shown in fig. 6, the in-vehicle communication apparatus 600 of the embodiment of the present application includes: an acquisition module 601, a processing module 602, a determination module 603 and a sending module 604. Wherein:
an obtaining module 601, configured to obtain original data to be sent.
The processing module 602 is configured to perform packaging processing on the original data according to a preset communication protocol to obtain target data, where the preset communication protocol includes a data layer, a domain layer, and a transport layer, and the domain layer includes a domain identifier, where the domain identifier is used to distinguish different bottom drives.
And the determining module 603 is configured to determine a target bottom layer driver according to the domain identifier corresponding to the target data.
And the sending module 604 is used for sending the target data through the target bottom layer driver.
In some embodiments, the processing module 602 may be specifically configured to: the method comprises the steps of carrying out packaging processing on original data through a data layer to obtain first data, wherein the first data at least comprises the original data, a message type and a module identifier; the first data is packaged through the domain layer to obtain second data, wherein the second data at least comprises the first data, the domain identifier and the data length corresponding to the original data; and encapsulating the second data through the transmission layer to obtain target data, wherein the target data at least comprises the second data, a data transmission direction, a frame start identifier of the transmission layer, a frame length and frame CRC information.
Optionally, the processing module 602 may be further configured to: after the obtaining module 601 obtains the original data to be sent, encrypting the original data based on a preset encryption algorithm to obtain the encrypted original data; the processing module 602 may be specifically configured to: and carrying out encapsulation processing on the encrypted original data according to a preset communication protocol to obtain target data.
The device of the present embodiment may be used to execute the technical solution of any of the above-described method embodiments, and its implementation principle and technical effects are similar, and are not described herein again.
Fig. 7 is a schematic structural diagram of a vehicle-mounted communication device according to another embodiment of the present application, which is applied to a receiving end device in a vehicle. As shown in fig. 7, the in-vehicle communication apparatus 700 of the embodiment of the present application includes: a receiving module 701 and a processing module 702. Wherein:
the receiving module 701 is configured to receive target data from a target bottom layer driver, where the target data is obtained after a sending end device in a vehicle machine encapsulates original data to be sent according to a preset communication protocol, the preset communication protocol includes a data layer, a domain layer and a transmission layer, the domain layer includes a domain identifier, the domain identifier is used to distinguish different bottom layer drivers, and the target bottom layer driver is determined by the sending end device according to the domain identifier corresponding to the target data.
The processing module 702 is configured to perform parsing processing on the target data according to a preset communication protocol, so as to obtain original data.
In some embodiments, the processing module 702 may be specifically configured to: analyzing the target data through the transmission layer to obtain third data; analyzing the third data through the field layer to obtain fourth data; and analyzing the fourth data through the data layer to obtain the original data.
Optionally, the original data is encrypted original data, and the processing module 702 may be further configured to: after the original data is obtained, carrying out decryption processing on the original data based on a preset decryption algorithm to obtain decrypted original data; based on a preset verification algorithm, verifying the decrypted original data to obtain a verification result; and determining whether the decrypted original data is valid or not according to the verification result.
The device of the present embodiment may be used to execute the technical solution of any of the above-described method embodiments, and its implementation principle and technical effects are similar, and are not described herein again.
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 8, the electronic device 800 may include: at least one processor 801 and a memory 802.
A memory 802 for storing programs. In particular, the program may include program code including computer-executable instructions.
The memory 802 may include high-speed random access memory (Random Access Memory, RAM) and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The processor 801 is configured to execute computer-executable instructions stored in the memory 802 to implement the vehicle-mounted communication method described in the foregoing method embodiment. The processor 801 may be a central processing unit (Central Processing Unit, CPU), or an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits configured to implement embodiments of the present application. Specifically, in implementing the vehicle-mounted communication method described in the foregoing method embodiment, the electronic device may be, for example, an electronic control unit on a vehicle.
Optionally, the electronic device 800 may also include a communication interface 803. In a specific implementation, if the communication interface 803, the memory 802, and the processor 801 are implemented independently, the communication interface 803, the memory 802, and the processor 801 may be connected to each other and perform communication with each other through buses. The bus may be an industry standard architecture (Industry Standard Architecture, ISA) bus, an external device interconnect (Peripheral Component, PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, among others. Buses may be divided into address buses, data buses, control buses, etc., but do not represent only one bus or one type of bus.
Alternatively, in a specific implementation, if the communication interface 803, the memory 802, and the processor 801 are implemented on a single chip, the communication interface 803, the memory 802, and the processor 801 may complete communication through internal interfaces.
The application also provides a computer readable storage medium, in which computer program instructions are stored, which when executed by a processor implement the solution of the vehicle-mounted communication method as above.
The present application also provides a computer program product comprising a computer program which, when executed by a processor, implements an aspect of the vehicle communication method as above.
The computer readable storage medium described above may be implemented by any type or combination of volatile or non-volatile Memory devices, such as static random access Memory (Static Random Access Memory, SRAM), electrically erasable programmable Read-Only Memory (Electrically Erasable Programmable Read Only Memory, EEPROM), erasable programmable Read-Only Memory (Erasable Programmable Read Only Memory, EPROM), programmable Read-Only Memory (Programmable Read Only Memory, PROM), read Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk, or optical disk. A readable storage medium can be any available medium that can be accessed by a general purpose or special purpose computer.
An exemplary readable storage medium is coupled to the processor such the processor can read information from, and write information to, the readable storage medium. In the alternative, the readable storage medium may be integral to the processor. The processor and the readable storage medium may reside in an application specific integrated circuit. The processor and the readable storage medium may also reside as discrete components in an in-vehicle communication device.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the method embodiments described above may be performed by hardware associated with program instructions. The foregoing program may be stored in a computer readable storage medium. The program, when executed, performs steps including the method embodiments described above; and the aforementioned storage medium includes: various media that can store program code, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims (10)

1. The vehicle-mounted communication method is characterized by being applied to a transmitting end device in a vehicle machine, and comprises the following steps:
acquiring original data to be transmitted;
the method comprises the steps that the original data are packaged according to a preset communication protocol to obtain target data, wherein the preset communication protocol comprises a data layer, a domain layer and a transmission layer, the domain layer comprises a domain identifier, and the domain identifier is used for distinguishing different bottom drives;
determining a target bottom layer drive according to the field identifier corresponding to the target data;
and sending the target data through the target bottom layer driver.
2. The vehicle-mounted communication method according to claim 1, wherein the encapsulating the raw data according to a preset communication protocol to obtain target data includes:
the original data is packaged through the data layer to obtain first data, wherein the first data at least comprises the original data, a message type and a module identifier;
the first data is packaged through the domain layer to obtain second data, wherein the second data at least comprises the first data, the domain identifier and the data length corresponding to the original data;
And encapsulating the second data through the transmission layer to obtain the target data, wherein the target data at least comprises the second data, a data transmission direction, a frame start identifier of the transmission layer, a frame length and Cyclic Redundancy Check (CRC) information of the frame.
3. The vehicle-mounted communication method according to claim 1 or 2, characterized by further comprising, after the acquiring of the original data to be transmitted:
encrypting the original data based on a preset encryption algorithm to obtain the encrypted original data;
the step of performing the encapsulation processing on the original data according to a preset communication protocol to obtain target data includes:
and packaging the encrypted original data according to the preset communication protocol to obtain the target data.
4. The vehicle-mounted communication method is characterized by being applied to receiving end equipment in a vehicle machine, and comprises the following steps:
receiving target data from a target bottom layer driver, wherein the target data is obtained after a transmitting end device in the vehicle machine encapsulates original data to be transmitted according to a preset communication protocol, the preset communication protocol comprises a data layer, a domain layer and a transmission layer, the domain layer comprises a domain identifier, the domain identifier is used for distinguishing different bottom layer drivers, and the target bottom layer driver is determined by the transmitting end device according to the domain identifier corresponding to the target data;
And analyzing the target data according to the preset communication protocol to obtain the original data.
5. The vehicle-mounted communication method according to claim 4, wherein the analyzing the target data according to the preset communication protocol to obtain the original data includes:
analyzing the target data through the transmission layer to obtain third data;
analyzing the third data through the field layer to obtain fourth data;
and analyzing the fourth data through the data layer to obtain the original data.
6. The vehicle-mounted communication method according to claim 4 or 5, wherein the original data is encrypted original data, and further comprising, after the obtaining of the original data:
based on a preset decryption algorithm, decrypting the original data to obtain decrypted original data;
based on a preset verification algorithm, verifying the decrypted original data to obtain a verification result;
and determining whether the decrypted original data is valid or not according to the verification result.
7. A vehicle-mounted communication device, characterized in that it is applied to a transmitting end apparatus in a vehicle machine, the vehicle-mounted communication device comprising:
The acquisition module is used for acquiring the original data to be transmitted;
the processing module is used for carrying out packaging processing on the original data according to a preset communication protocol to obtain target data, wherein the preset communication protocol comprises a data layer, a domain layer and a transmission layer, the domain layer comprises a domain identifier, and the domain identifier is used for distinguishing different bottom drives;
the determining module is used for determining a target bottom layer drive according to the field identifier corresponding to the target data;
and the sending module is used for sending the target data through the target bottom layer driver.
8. A vehicle-mounted communication device, characterized in that it is applied to a receiving end apparatus in a vehicle machine, the vehicle-mounted communication device comprising:
the receiving module is used for receiving target data from a target bottom layer driver, the target data are obtained after the sending end equipment in the vehicle machine encapsulates original data to be sent according to a preset communication protocol, the preset communication protocol comprises a data layer, a domain layer and a transmission layer, the domain layer comprises domain identifiers, the domain identifiers are used for distinguishing different bottom layer drivers, and the target bottom layer driver is determined by the sending end equipment according to the domain identifiers corresponding to the target data;
And the processing module is used for analyzing and processing the target data according to the preset communication protocol to obtain the original data.
9. An electronic device, comprising: a processor, and a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored in the memory to implement the vehicle-mounted communication method as claimed in any one of claims 1 to 6.
10. A computer-readable storage medium, in which computer program instructions are stored, which, when executed by a processor, implement the vehicle-mounted communication method according to any one of claims 1 to 6.
CN202310121650.0A 2023-02-16 2023-02-16 Vehicle-mounted communication method, device, equipment and storage medium Pending CN116192982A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310121650.0A CN116192982A (en) 2023-02-16 2023-02-16 Vehicle-mounted communication method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310121650.0A CN116192982A (en) 2023-02-16 2023-02-16 Vehicle-mounted communication method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116192982A true CN116192982A (en) 2023-05-30

Family

ID=86451897

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310121650.0A Pending CN116192982A (en) 2023-02-16 2023-02-16 Vehicle-mounted communication method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116192982A (en)

Similar Documents

Publication Publication Date Title
JP7170780B2 (en) Fraud detection rule update method, fraud detection electronic control unit, and in-vehicle network system
US10974669B2 (en) Gateway device, vehicle network system, and transfer method
US10095634B2 (en) In-vehicle network (IVN) device and method for operating an IVN device
US9935774B2 (en) Configurable cryptographic controller area network (CAN) device
US10715333B2 (en) Network message authentication and verification
CN103929428B (en) A kind of method for realizing vehicle electronics information system communication safety
CN112487408B (en) Safe access method and system for in-vehicle ECU and storage medium
CN102624515A (en) Data transmission method, system and terminal
CN109286500B (en) Vehicle Electronic Control Unit (ECU) authentication method, device and equipment
CN112235263B (en) Diagnostic device security authentication method, server, vehicle, and storage medium
US20190026478A1 (en) Vehicle secure communication method and apparatus, vehicle multimedia system, and vehicle
CN111614691A (en) Outbound message processing method and device based on power gateway
CN104980901A (en) Secure SMS messaging
CN108566368B (en) Data processing method, server and diagnosis connector
JP2022190041A (en) Fraud detection rule updating method, fraud detection electronic control unit, and in-vehicle network system
CN110474922B (en) Communication method, PC system and access control router
CN116192982A (en) Vehicle-mounted communication method, device, equipment and storage medium
CN115499199B (en) Safety communication method and device for vehicle, vehicle and storage medium
CN115296861B (en) Network safety communication method and control device of vehicle-mounted CAN bus
CN111224773A (en) Quantum key management equipment
Subke et al. Measures to prevent unauthorized access to the in-vehicle e/e system, due to the security vulnerability of a remote diagnostic tester
CN116155608A (en) Vehicle-mounted information management system and method
Kumar et al. Cybersecurity Vulnerabilities for Off-Board Commercial Vehicle Diagnostics
CN116488812B (en) Service data processing method and device, electronic equipment and storage medium
US20240244047A1 (en) Electronic control unit, mac transmission method, storage medium, and electronic control system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination