Interface data conversion method, device, storage medium and vehicle-mounted communication equipment
By using the first gateway and the second gateway to perform protocol conversion in the on-board communication equipment, the technical difficulties of data signal conversion in the vehicle and outside the vehicle are solved, and efficient data mutual conversion is achieved.
Patent Information
- Application Number
- CN202211352968.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-01
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2042-11-01
AI Technical Summary
Different communication protocols are used between the in-car Ethernet bus and the out-car Ethernet bus, which leads to the efficient conversion of in-car and out-car data signals becoming a technical problem.
By introducing a first gateway and a second gateway into the vehicle communication device, the first communication protocol and the second communication protocol are used to communicate, and using a data receiving module, an interface conversion module and a data generation module, the data of the first communication protocol is converted into data of the second communication protocol based on the preset interface correspondence relationship.
It realizes efficient conversion of data signals inside and outside the vehicle, and can convert data inside and outside the vehicle data signals, solving the problem of data conversion between different communication protocols.
Smart Images

Figure CN115842868B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle-mounted communication technology, and in particular to an interface data conversion method, device, storage medium and vehicle-mounted communication equipment. Background Art
[0002] With the development of vehicle intelligent interconnection technology, the functions of on-board electronic equipment are becoming more and more abundant, and the communication between the various controllers of the vehicle and between the vehicle and the cloud is becoming more and more frequent.
[0003] In one technical solution, in order to achieve the interconnection and intercommunication of data inside and outside the vehicle, an in-vehicle Ethernet bus is used to transmit data inside the vehicle, and an out-vehicle Ethernet bus is used to transmit data between the vehicle and the cloud.
[0004] Since different communication protocols are used between the Ethernet bus inside the vehicle and the Ethernet bus outside the vehicle, how to efficiently convert the data signals inside and outside the vehicle has become a technical problem that needs to be solved urgently. Summary of the invention
[0005] The embodiment of the present application provides an interface data conversion method, device, storage medium and vehicle-mounted communication equipment, which can efficiently convert data signals inside and outside the vehicle. The technical solution is as follows:
[0006] In a first aspect, an embodiment of the present application provides an interface data conversion method, which is applied to an in-vehicle communication device, wherein the in-vehicle communication device includes a first gateway and a second gateway, wherein the first gateway uses a first communication protocol for communication, and the second gateway uses a second communication protocol for communication, and the method includes:
[0007] Receive signal data from the data bus;
[0008] Converting the signal data into first data corresponding to the first protocol interface of the first communication protocol through the first gateway;
[0009] Based on a preset interface correspondence, converting the first protocol interface into a second protocol interface corresponding to the second communication protocol through the second gateway;
[0010] Based on the second protocol interface and the first data, second data corresponding to the signal data is generated.
[0011] In a second aspect, an embodiment of the present application provides an interface data conversion device, which is applied to an in-vehicle communication device, wherein the in-vehicle communication device includes a first gateway and a second gateway, wherein the first gateway uses a first communication protocol for communication, and the second gateway uses a second communication protocol for communication, and the device includes:
[0012] A data receiving module, used for receiving first data sent by the first gateway using the first protocol interface of the first communication protocol;
[0013] An interface conversion module, configured to convert the first protocol interface into a second protocol interface corresponding to the second communication protocol through the second gateway based on a preset interface correspondence relationship;
[0014] A data generation module is used to generate second data corresponding to the first data based on the second protocol interface, wherein the first communication protocol is a communication protocol for in-vehicle communication and the second communication protocol is a communication protocol for vehicle-cloud communication, or the first communication protocol is a communication protocol for vehicle-cloud communication and the second communication protocol is a communication protocol for in-vehicle communication.
[0015] In a third aspect, an embodiment of the present application provides a computer storage medium, wherein the computer storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the steps of the above-mentioned method.
[0016] In a fourth aspect, an embodiment of the present application provides a vehicle-mounted communication device, comprising: a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the steps of the above method.
[0017] The beneficial effects brought about by the technical solutions provided by some embodiments of the present application include at least:
[0018] Based on the preset interface correspondence, the first data of the first protocol interface of the first communication protocol is converted into the second data of the second protocol interface of the second communication protocol. Since one of the first communication protocol and the second communication protocol is a communication protocol for in-vehicle communication, and the other is a communication protocol for vehicle-cloud communication, data of different communication protocols inside and outside the vehicle can be efficiently converted, thereby converting the data inside the vehicle and the data signals outside the vehicle into each other. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0020] Figure 1 A schematic diagram showing the system architecture of the interface data conversion method provided in an embodiment of the present application;
[0021] Figure 2A schematic diagram of a process of an interface data conversion method provided according to some embodiments of the present application is shown;
[0022] Figure 3 A schematic diagram of a flow chart of an interface data conversion method provided according to other embodiments of the present application is shown;
[0023] Figure 4 A schematic diagram showing two interface mappings for message push provided according to some embodiments of the present application is shown;
[0024] Figure 5 A schematic diagram showing two interface mappings of method calls provided according to some embodiments of the present application;
[0025] Figure 6 A schematic diagram showing a flow chart of an interface data conversion method provided according to some other embodiments of the present application;
[0026] Figure 7 A schematic diagram showing the structure of another interface data conversion device provided in an embodiment of the present application is shown.
[0027] Figure 8 A schematic structural diagram of a vehicle-mounted communication device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0028] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0029] First, the nouns involved in the embodiments of the present application are explained and illustrated.
[0030] CAN (Controller Area Network) bus: The data bus in the traditional vehicle architecture can carry a large amount of data and is an ISO internationally standardized serial communication protocol.
[0031] LIN (Local Interconnect Network) bus: A data bus in traditional vehicle architecture, used to implement distributed electronic system control in the car. It can carry a small amount of data and is mainly used to control some simple in-vehicle devices. It is an auxiliary bus network.
[0032] SOME / IP (Scalable service-oriented MiddlewarE over IP) protocol: It is an automotive middleware solution for control messages, which enables service-oriented communication between controllers. SOME / IP provides a wide range of middleware functions such as serialization, remote procedure calls, service discovery and subscription to enable ECU (Electronic Control Unit) software to communicate with each other.
[0033] MQTT (Message Queuing Telemetry Transport) protocol: is a "lightweight" communication protocol based on the publish / subscribe model. The protocol is built on the TCP / IP protocol. MQTT can provide real-time and reliable message services for remote connected devices with very little code and limited bandwidth. As a low-overhead, low-bandwidth instant messaging protocol, it is widely used in the Internet of Things, small devices, mobile applications, etc.
[0034] S2S (Signal To Service): is a communication standard between ECUs.
[0035] C2C (Car To Cloud) Gateway: It is a vehicle-to-cloud communication gateway that enables intercommunication between the vehicle and the cloud.
[0036] ARXML (AUTOSAR eXtensible Markup Language): This standard describes how to serialize AUTOSAR models into AUTOSAR XML description rules, providing support for interoperability between AUTOSAR tools.
[0037] AUTOSAR (AUTOmotive Open System Architecture) is an alliance dedicated to developing automotive electronic software standards and is committed to developing an open and standardized software architecture for the automotive industry.
[0038] FIDL (Franca Interface Definition Language): is a text language used to standardize interface descriptions.
[0039] Below, the technical solution of the interface data conversion method of the embodiment of the present application will be described in detail with reference to the accompanying drawings.
[0040] Figure 1 A schematic diagram showing the system architecture of the interface data conversion method provided according to an embodiment of the present application.
[0041] Reference Figure 1 As shown, the system architecture includes a smart terminal 105 , a smart home appliance 110 , a background service 120 , a vehicle-cloud service bus 125 , a CAN bus 130 , and a vehicle-mounted communication device 140 .
[0042] In an exemplary embodiment, the smart terminal 150 provides scenario configuration service, wireless upgrade service and login service. The smart home appliance 110 provides air conditioning service, lighting control service and heating service, and the background service 120 provides text-to-speech service, weather service and intelligent recommendation service.
[0043] The vehicle-cloud service bus 125 may be an off-vehicle Ethernet bus that uses the MQTT protocol for communication between the in-vehicle ECU and the cloud, for example, communicating with the Internet on the cloud through an on-vehicle Internet access device.
[0044] The CAN bus 130 is mainly used for communication between various components in the car. The application 150 includes vehicle control applications, infotainment applications, and autonomous driving applications.
[0045] The vehicle communication device 140 includes an S2S gateway 142 and a C2C gateway 144. The S2S gateway 142 includes a vehicle signal service unit, a signal / service conversion unit, and a signal parsing / packaging unit. The vehicle signal service unit is used to receive, parse, and forward vehicle signals. The signal / service conversion unit is used to convert signals and services. The signal parsing / packaging unit is used to parse / pack the signals. The S2S gateway 142 is mainly responsible for servicing the signals in the vehicle and opening up the service communication in the vehicle.
[0046] The C2C gateway 144 includes a cloud service unit, a vehicle / cloud service conversion unit, and a vehicle-side service unit. Among them, the cloud service unit is used to provide cloud services, the vehicle / cloud service conversion unit is used to convert vehicle-side services and cloud services, and the vehicle-side service unit is used to process vehicle-side services. The C2C gateway mainly services devices other than vehicles, such as smart terminal devices / backend services, and opens up service communications outside the vehicle. The C2C gateway opens up the communication between the S2S gateway 142 and the C2C gateway 144 through a protocol conversion tool, thereby breaking down the barriers between various networked devices.
[0047] The vehicle service bus 155 may be a vehicle Ethernet bus for in-vehicle communication. The in-vehicle service bus 155 commonly uses the SOME / IP protocol for communicating with various ECUs in the vehicle. The in-vehicle service bus 155 is in communication with AutoSar (classic platform CP) 160 and AutoSar (adaptive platform AP) 165.
[0048] Figure 2 A flow chart of an interface data conversion method provided according to some embodiments of the present application is shown. The execution subject of the interface data conversion method may be a computing device with a computing processing function, such as the vehicle-mounted communication device 140. The interface data conversion method includes steps S210 to S240. The interface data conversion method in the example embodiment is described in detail below in conjunction with the accompanying drawings.
[0049] Reference Figure 2 As shown, in step S210, first data sent by a first gateway using a first protocol interface of a first communication protocol is received.
[0050] In an example embodiment, the first communication protocol is a communication protocol for in-vehicle communication and the second communication protocol is a communication protocol for vehicle-cloud communication, or the first communication protocol is a communication protocol for vehicle-cloud communication and the second communication protocol is a communication protocol for in-vehicle communication. For example, if the first communication protocol is the communication protocol SOME / IP protocol for in-vehicle communication, the second communication protocol is the communication protocol MQTT protocol for vehicle-cloud communication; if the first communication protocol is the communication protocol MQTT protocol for vehicle-cloud communication, the second communication protocol is the communication protocol SOME / IP protocol for in-vehicle communication.
[0051] Further, in the example embodiment, the first gateway is an S2S gateway, the first communication protocol is a SOME / IP protocol, and the S2S gateway receives data sent by a protocol interface of the SOME / IP communication protocol, for example, the S2S gateway receives data sent by an event A interface of the SOME / IP communication protocol.
[0052] In step S220, based on the preset interface correspondence, the first protocol interface is converted into a second protocol interface corresponding to the second communication protocol through the second gateway.
[0053] In an example embodiment, the second gateway is a C2C gateway, i.e., a vehicle-to-cloud gateway, and the second communication protocol is an MQTT protocol. For example, the first communication protocol uses a first interface definition language to describe a first protocol interface, and the second communication protocol uses a second interface definition language to describe the second protocol interface, and the first interface type of the first protocol interface in the first interface definition language is determined by the second gateway; based on the first interface type of the first protocol interface and the preset interface correspondence, the corresponding second interface type in the second interface definition language is determined; based on the second interface type, the first protocol interface is converted into a second protocol interface corresponding to the second communication protocol.
[0054] For example, the first interface definition language is ARXML (AUTOSAR eXtensible Markup Language), and the second interface definition language is FIDL (Franca Interface Definition Language). FIDL supports the definition of three types of interfaces: Method, Broadcast, and Attribute. These three types of interfaces correspond to the three types of interfaces in ARXML: Method, Event, and Field. The corresponding relationship between the interfaces in ARXML and FIDL can be identified by the following Table 1:
[0055] Table 1. Correspondence between ARXML and FIDL interfaces
[0056] Interface Types in ARXML Interface Types in FIDL Field Attribute Method Method Event Broadcast
[0057] Among them, the three types of interfaces in ARXML include Method, Event and Field. Method, or remote procedure call, refers to a node sending a request for service to another node. It is mostly used for the client to send control commands to the server. It is divided into Request / Response and Fire&Forget communication according to whether the server has feedback. Event is similar to CAN message, which is used to publish status. According to the actual application scenario, there can be different sending methods. Field is used to indicate the status of a function. Control commands can be issued through Method, that is, Setter; you can also request to obtain status through Method, that is, Getter; notifications can also be sent when the status changes, that is, Notification.
[0058] Determine through the second gateway the first interface type of the first protocol interface in the first interface definition language, for example, the Event type; determine the corresponding second interface type in the second interface definition language, for example, the Broadcast type, based on the first interface type of the first protocol interface and a preset interface correspondence relationship, for example, the above-mentioned correspondence table; based on the second interface type, convert the first protocol interface into a second protocol interface corresponding to the second communication protocol; for example, based on the second interface type, convert the data type of the first protocol interface into the data type of the second protocol interface corresponding to the second communication protocol, so that the data types of the first protocol interface and the second protocol interface can be uniformly processed to avoid data conversion errors.
[0059] In step S230, second data corresponding to the first data is generated based on the second protocol interface.
[0060] In an example embodiment, the second protocol interface is an interface corresponding to a second communication protocol, such as an MQTT protocol, and based on the interface parameters of the second protocol interface and the data type of the interface parameters, corresponding data is obtained from the first data to generate second data corresponding to the data signal. For example, the second protocol interface includes an interface ID, interface parameters, and element types of the interface parameters, and data corresponding to the second protocol interface is obtained from the first data to generate second data corresponding to the signal data.
[0061] For example, assuming that the signal data is an engine speed signal, the first protocol interface and the second protocol interface are both protocol interfaces for displaying the engine speed. For example, according to the signal interface correspondence, the engine conversion signal is converted into the first data of the first protocol interface, i.e., the Event interface of SOME / IP. According to the interface correspondence, the first protocol interface is converted into the second protocol interface, i.e., the Broadcast interface. According to the interface parameters of the Broadcast interface, corresponding interface data such as speed value data are obtained from the first data to generate second data corresponding to the signal data.
[0062] according to Figure 2 The technical solution in the example embodiment converts first data of a first protocol interface of a first communication protocol into second data of a second protocol interface of a second communication protocol based on a preset interface correspondence; since one of the first communication protocol and the second communication protocol is a communication protocol for in-vehicle communication and the other is a communication protocol for in-vehicle cloud communication, data of different communication protocols inside and outside the vehicle, such as the cloud, can be efficiently converted, thereby enabling data inside the vehicle and data signals outside the vehicle to be converted into each other.
[0063] Further, in an exemplary embodiment, the data bus is a CAN bus and / or a LIN bus, and the first gateway receives signal data of the CAN bus and / or the LIN bus. The CAN bus uses a DBC (Database Can) file to describe interface data, and the LIN bus uses an LDF (LIN Description File) to describe interface data. The DBC file contains the following information: the CAN ID of the current signal message, the position where the signal appears in the CAN message, the byte order of the signal, the unit of the signal, etc.
[0064] Taking the data bus as CAN bus as an example, the S2S gateway receives the signal message of the CAN bus, parses the signal message according to the DBC file, and obtains the corresponding signal data. For example, suppose the received signal message of the CAN bus is the engine speed signal message, parse the signal message, and obtain the CAN ID of the signal message, such as 0x181, the name of the message, such as ADC_0_3, the type of the message, such as CAN standard frame, the data length code, such as 8, and the transmitter, such as Vector_XXX.
[0065] Further, in an exemplary embodiment, the signal data is converted into first data corresponding to the first protocol interface of the first communication protocol by the first gateway. For example, the first gateway is an S2S gateway, and the first communication protocol is a SOME / IP protocol. After acquiring the signal of the data bus, the signal data is converted into the first data corresponding to the first protocol interface of the first communication protocol by the first gateway based on a preset signal interface correspondence relationship.
[0066] Furthermore, based on the identification information of the signal data and the preset signal interface correspondence, the first protocol interface of the first communication protocol corresponding to the signal data is determined through the first gateway, and the preset signal interface correspondence includes the correspondence between the signal data of the data bus and the protocol interface of the first communication protocol; the signal data is converted into first data corresponding to the first protocol interface, that is, the signal data is encoded according to the first communication protocol to generate first data corresponding to the first protocol interface.
[0067] For example, a correspondence between signals and interfaces is established in advance, such as signal A-interface A; signal B-interface B, etc. When the S2S gateway receives a CAN signal, the signal A in the CAN signal is converted into the interface data corresponding to the event A interface of the SOME / IP protocol according to the established correspondence between the signal and the interface. For example, the signal A in the CAN message is converted into the interface name corresponding to the event A interface, and the data type is converted into the data type corresponding to the event A interface to obtain the interface data corresponding to the event A interface.
[0068] According to the technical solution in the above example embodiment, by presetting the signal interface correspondence, the signal data of the data bus is converted into data corresponding to the protocol interface of the SOME / IP protocol, and the signal data of CAN / LIN can be converted into SOMEIP data of Ethernet.
[0069] Figure 3 A schematic flow chart of an interface data conversion method provided according to other embodiments of the present application is shown.
[0070] Reference Figure 3 As shown, in step S310, second data corresponding to the second protocol interface is received.
[0071] In an example embodiment, the second protocol interface is an interface of the MQTT protocol, and the MQTT protocol uses a FIDL file to describe interface data. The C2C gateway receives second data corresponding to the MQTT protocol interface, such as data of an interface for adjusting the temperature of an air conditioner.
[0072] In step S320, based on the preset interface correspondence, the second data of the second protocol interface is converted into the first data of the first protocol interface corresponding to the first communication protocol through the second gateway.
[0073] In an example embodiment, a second interface type of a second protocol interface in a second interface definition language is determined through a second gateway; based on the second interface type of the second protocol interface and a preset interface correspondence, a corresponding first interface type in a first interface definition language is determined; based on the first interface type, second data of the second protocol interface is converted into first data of the first protocol interface corresponding to the first communication protocol.
[0074] For example, assume that the second data is data of the second protocol interface for adjusting the air conditioning temperature, and the first protocol interface and the second protocol interface are both protocol interfaces for adjusting the air conditioning temperature. For example, according to an interface correspondence such as the correspondence table in Table 1 above, the second protocol interface is converted into a first protocol interface, and the corresponding interface data such as the temperature setting value is obtained from the second data according to the first protocol interface to generate first data of the first protocol interface corresponding to the second data.
[0075] In step S330, the first data of the first protocol interface is converted into signal data corresponding to the data bus through the first gateway.
[0076] In the example embodiment, according to the signal interface correspondence, the first data of the first protocol interface is converted into signal data corresponding to the data bus through the first gateway. For example, assuming that the first data is data for adjusting the temperature of the air conditioner, according to the signal interface correspondence, the first data of the first protocol interface, i.e., the Event interface of SOME / IP, is converted into corresponding temperature adjustment signal data.
[0077] according to Figure 3 The technical solution in the example embodiment can convert data on the external Ethernet bus into data on the internal Ethernet bus, thereby efficiently converting data signals inside and / or outside the vehicle.
[0078] Further, in the example embodiment, the CAN / LIN bus uses DBC / LDF to describe interface data. The SOME / IP protocol of the S2S gateway uses ARXML to describe interface data. The MQTT protocol of the C2C gateway uses FIDL to describe interface data. There are two commonly used interfaces in the car, one is message push and the other is method call; therefore, by realizing the mapping of these two methods of message push and method call, the conversion of DBC / LDF / ARXML / FIDL protocols can be realized. Figure 4 and Figure 5 A schematic diagram showing the mapping relationship between message push and method call.
[0079] Reference Figure 4 As shown, both the event Event in ARXML and the broadcast Broadcast in FIDL can realize message push. Therefore, the two interfaces of Event in ARXML and Broadcast in FIDL can be used to realize the mapping of message push, convert the signal Signal of DBC / LDF protocol into Event in ARXML, and map the Event in ARXML to Broadcast in FIDL.
[0080] Reference Figure 5 As shown, both the Method in ARXML and the Method in FIDL can implement method calls. Therefore, the two interfaces, Method in ARXML and Method in FIDL, can be used to implement method call mapping, map the Method in FIDL to the Method in ARXML, and convert the Method in ARXML to the Signal in DBC / LDF.
[0081] According to the technical solution in the above embodiment, on the one hand, according to the above mapping rules, interfaces of different protocols can be mapped one-to-one to realize the mutual conversion of three different protocol interface formats, that is, the mutual conversion of DBC / LIN / SOMEIP / MQTT protocol interfaces can be realized; on the other hand, the conversion code is generated and deployed in the S2S gateway and the C2C gateway, so as to realize the interconnection and intercommunication of data inside and outside the vehicle through the S2S gateway and the C2C gateway.
[0082] Figure 6 A schematic flow chart of an interface data conversion method provided according to some further embodiments of the present application is shown.
[0083] Reference Figure 6 As shown, in some example embodiments, it is assumed that there are 5 signal data in the message of the CAN / LIN bus, namely signal A, signal B, signal C, signal D and signal F. Converting the signal of the CAN / LIN bus into Ethernet data includes the following steps E1 and E2.
[0084] In step E1, the S2S gateway converts the signal Signal A in the CAN message into the Event A interface of the SOME / IP protocol. In this way, the A signal data of the CAN message is converted into the A data of the SOME / IP protocol.
[0085] In step E2, the C2C gateway converts the Event A interface of the SOME / IP protocol into the Broadcast A interface of the MQTT protocol. In this way, the A data of the SOME / IP message is converted into the A data of the MQTT protocol.
[0086] Through the above steps E1 and E2, the signal data of the CAN / LIN bus can be converted into SOMEIP / MQTT data of Ethernet.
[0087] In some other example embodiments, converting SOMEIP / MQTT data of Ethernet into CAN / LIN data includes the following steps M1 and M2.
[0088] In step M1, the C2C gateway converts the MQTT method Method A into the SOME / IP method Method A. In this way, the MQTT A data is converted into the SOME / IP A data.
[0089] In step M2, the S2S gateway converts the Method A of SOME / IP into the Signal A of the CAN / LIN bus. In this way, the A data of the SOME / IP protocol is converted into the Signal A of the CAN / LIN bus.
[0090] Through the above steps M1 and M2, the SOMEIP / MQTT data of Ethernet can be converted into signal data of CAN / LIN bus.
[0091] according to Figure 6 The technical solution in the example embodiment can realize the mutual conversion of DBC / LIN / SOMEIP / MQTT protocol interfaces, and realize the interconnection and intercommunication of data inside and outside the vehicle through the S2S gateway and the C2C gateway.
[0092] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0093] Figure 7 A schematic diagram of the structure of an interface data conversion device provided by an exemplary embodiment of the present application is shown.
[0094] Reference Figure 7 As shown, the interface data conversion device 700 can be implemented as all or part of the device through software, hardware or a combination of both. The interface data conversion device 700 is applied to a vehicle-mounted communication device, and the vehicle-mounted communication device includes a first gateway and a second gateway. The first gateway uses a first communication protocol for communication, and the second gateway uses a second communication protocol for communication. The interface data conversion device 700 includes a data receiving module 710, an interface conversion module 720 and a data generating module 730. Among them:
[0095] A data receiving module 710 is used to receive first data sent by the first gateway using the first protocol interface of the first communication protocol;
[0096] An interface conversion module 720, configured to convert the first protocol interface into a second protocol interface corresponding to the second communication protocol through the second gateway based on a preset interface correspondence relationship;
[0097] The data generation module 730 is used to generate second data corresponding to the first data based on the second protocol interface, wherein the first communication protocol is a communication protocol for in-vehicle communication and the second communication protocol is a communication protocol for vehicle-cloud communication, or the first communication protocol is a communication protocol for vehicle-cloud communication and the second communication protocol is a communication protocol for in-vehicle communication.
[0098] In some example embodiments, based on the above solution, the first communication protocol uses a first interface definition language to describe the first protocol interface, and the second communication protocol uses a second interface definition language to describe the second protocol interface, and the interface conversion module 720 includes:
[0099] A first type determining unit, configured to determine, through the second gateway, a first interface type of the first protocol interface in the first interface definition language;
[0100] A second type determining unit, configured to determine a corresponding second interface type in the second interface definition language based on the first interface type of the first protocol interface and the preset interface correspondence relationship;
[0101] A conversion unit is used to convert the first protocol interface into a second protocol interface corresponding to the second communication protocol based on the second interface type.
[0102] In some example embodiments, based on the above solution, the second type determination unit is configured to:
[0103] If the first protocol interface type is an event type, determining that the corresponding interface type in the second interface definition language is a broadcast type;
[0104] and / or,
[0105] If the first protocol interface type is a method type, it is determined that the corresponding interface type in the second interface definition language is a method type.
[0106] In some example embodiments, based on the above solution, the first communication protocol is a communication protocol for in-vehicle communication, and the device further includes:
[0107] A signal data receiving module, used for receiving signal data from a data bus;
[0108] a signal interface conversion module, configured to determine, through the first gateway, a first protocol interface of a first communication protocol corresponding to the signal data based on identification information of the signal data and a preset signal interface correspondence relationship, wherein the preset signal interface correspondence relationship includes a correspondence relationship between the signal data of the data bus and the protocol interface of the first communication protocol;
[0109] The signal data conversion module is used to convert the signal data into first data corresponding to the first protocol interface.
[0110] In some example embodiments, based on the above solution, the interface data conversion device 700 further includes:
[0111] A second data receiving module, used for receiving second data corresponding to the second protocol interface;
[0112] A third conversion module, configured to convert, through the second gateway, the second data of the second protocol interface into the first data of the first protocol interface corresponding to the first communication protocol based on the preset interface correspondence relationship;
[0113] A fourth conversion module is used to convert the first data of the first protocol interface into signal data corresponding to the data bus through the first gateway.
[0114] In some example embodiments, based on the above solution, the fourth conversion module is configured as follows:
[0115] Based on a preset signal interface correspondence, determining, by the first gateway, signal data of a data bus corresponding to a first protocol interface of the first communication protocol, the preset signal interface correspondence comprising a correspondence between the signal data of the data bus and a protocol interface of the first communication protocol;
[0116] The first data corresponding to the first protocol interface is converted into signal data of the data bus.
[0117] In some example embodiments, based on the above scheme, the data bus includes a controller area network (CAN) bus and / or a local interconnect network (LIN) bus, the first communication protocol includes a service-oriented scalable middleware (SOMEIP) protocol, and the second communication protocol includes a message queue telemetry transmission (MQTT) protocol.
[0118] according to Figure 7 The technical solution in the example embodiment converts first data of a first protocol interface of a first communication protocol into second data of a second protocol interface of a second communication protocol based on a preset interface correspondence; since one of the first communication protocol and the second communication protocol is a communication protocol for in-vehicle communication and the other is a communication protocol for vehicle-cloud communication, data of different communication protocols inside and outside the vehicle can be efficiently converted, thereby converting data inside the vehicle into data signals outside the vehicle.
[0119] It should be noted that the interface data conversion device provided in the above embodiment only uses the division of the above-mentioned functional modules as an example when executing the interface data conversion method. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0120] In addition, the interface data conversion device and the interface data conversion method provided in the above embodiment belong to the same concept, and the implementation process thereof is detailed in the method embodiment, which will not be repeated here.
[0121] An embodiment of the present application also provides a computer storage medium, which can store multiple instructions, and the instructions are suitable for being loaded by a processor and executing the interface data conversion method as described in the above embodiment. The specific execution process can be found in the specific description of the above embodiment, and will not be repeated here.
[0122] An embodiment of the present application also provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded by the processor and executes the interface data conversion method as described in the above embodiment. The specific execution process can be found in the specific description of the above embodiment, and will not be repeated here.
[0123] An embodiment of the present application also provides a chip, which is configured to execute the interface data conversion method as described in the above embodiment. The specific execution process can be found in the specific description of the above embodiment, and will not be repeated here.
[0124] Also, see Figure 8 , which is a schematic diagram of the structure of a vehicle-mounted communication device provided in an embodiment of the present application. Figure 8 As shown, the vehicle-mounted communication device 800 may include: at least one processor 801 , at least one communication module 804 , an input / output interface 803 , a memory 805 , and at least one communication bus 802 .
[0125] The communication bus 802 is used to realize the connection and communication between these components.
[0126] The input / output interface 803 may include a display screen (Display) and a camera (Camera), and the optional input / output interface 803 may also include a standard wired interface and a wireless interface.
[0127] The communication module 804 may optionally include a standard wired interface, a wireless interface (such as a WIFI interface). The communication module 804 includes a first gateway such as an S2S gateway and a second gateway such as a C2C gateway. The first gateway uses a first communication protocol for communication, and the second gateway uses a second communication protocol for communication.
[0128] Among them, the processor 801 may include one or more processing cores. The processor 801 uses various interfaces and lines to connect various parts of the entire vehicle-mounted communication device 800, and executes various functions and processes data of the server 800 by running or executing instructions, programs, code sets or instruction sets stored in the memory 805, and calling data stored in the memory 805. Optionally, the processor 801 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 801 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a protocol interface converter (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 801, and it can be implemented separately through a chip.
[0129] Among them, the memory 805 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 805 includes a non-transitory computer-readable storage medium. The memory 805 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 805 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned method embodiments, etc.; the data storage area may store data involved in the above-mentioned method embodiments, etc. The memory 805 may optionally be at least one storage device located away from the aforementioned processor 801. As Figure 8 As shown, the memory 805 as a computer storage medium may include an operating system, a communication module, an input / output interface module, and a protocol interface conversion application.
[0130] exist Figure 8In the vehicle-mounted communication device 800 shown in the figure, the input / output interface 803 is mainly used to provide an input interface for the user and obtain the data input by the user; and the processor 801 can be used to call the protocol interface conversion application stored in the memory 805, so that the processor 801 executes the steps in the interface data conversion method according to various exemplary embodiments of the present disclosure. For example, the processor 801 can execute the following steps: Figure 2 The steps shown in: Step S210, receiving first data sent by a first gateway using a first protocol interface of a first communication protocol; Step S220, based on a preset interface correspondence, converting the first protocol interface into a second protocol interface corresponding to a second communication protocol through a second gateway, wherein the preset interface correspondence is a correspondence between the first protocol interface and the second protocol interface; Step S230, generating second data corresponding to the first data based on the second protocol interface.
[0131] The above is a schematic scheme of an in-vehicle communication device of an embodiment of this specification. The in-vehicle communication device may be a central gateway or other appropriate devices such as an in-vehicle gateway. It should be noted that the technical scheme of the in-vehicle communication device and the technical scheme of the above-mentioned protocol interface conversion processing method belong to the same concept. For details not described in detail in the technical scheme of the in-vehicle communication device, please refer to the description of the technical scheme of the above-mentioned protocol interface conversion processing method.
[0132] In the description of the present application, it should be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In the description of the present application, it should be noted that, unless otherwise clearly specified and limited, "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood in specific circumstances. In addition, in the description of the present application, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B, which can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are an "or" relationship.
[0133] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only storage memory, or a random access memory, etc.
[0134] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. An interface data conversion method, characterized in that: Applied to an in-vehicle communication device, the in-vehicle communication device includes a first gateway and a second gateway, the first gateway uses a first communication protocol for communication, the second gateway uses a second communication protocol for communication, the first communication protocol uses a first interface definition language to describe a first protocol interface, and the second communication protocol uses a second interface definition language to describe a second protocol interface, the method includes: Receiving first data sent by the first gateway using the first protocol interface of the first communication protocol; Determining, by the second gateway, a first interface type of the first protocol interface in the first interface definition language; Based on the first interface type and the preset interface correspondence relationship, determine a corresponding second interface type in the second interface definition language; Based on the second interface type, converting the first protocol interface to the second protocol interface; Based on the second protocol interface, second data corresponding to the first data is generated, wherein the first communication protocol is a communication protocol for in-vehicle communication and the second communication protocol is a communication protocol for vehicle-cloud communication, or the first communication protocol is a communication protocol for vehicle-cloud communication and the second communication protocol is a communication protocol for in-vehicle communication.
2. The method according to claim 1, characterized in that The determining, based on the first interface type of the first protocol interface and a preset interface correspondence, a corresponding second interface type in the second interface definition language, comprises: If the first interface type is an event type, determining that the corresponding interface type in the second interface definition language is a broadcast type; and / or, If the first interface type is a method type, it is determined that the corresponding interface type in the second interface definition language is a method type.
3. The method according to claim 1, characterized in that The first communication protocol is a communication protocol used for in-vehicle communication, and the method further includes: Receive signal data from the data bus; Based on the identification information of the signal data and the preset signal interface correspondence relationship, determining, by the first gateway, a first protocol interface of a first communication protocol corresponding to the signal data; The signal data is converted into first data corresponding to the first protocol interface.
4. The method according to claim 1, characterized in that: The second communication protocol is a communication protocol used for in-vehicle communication, and the method further includes: receiving second data corresponding to the second protocol interface; Based on a preset interface correspondence, converting, through the second gateway, second data of the second protocol interface into first data of the first protocol interface corresponding to the first communication protocol; The first data of the first protocol interface is converted into signal data corresponding to the data bus through the first gateway.
5. The method according to claim 4, characterized in that The converting the first data of the first protocol interface into signal data corresponding to the data bus through the first gateway includes: Based on a preset signal interface correspondence, determining, by the first gateway, signal data of a data bus corresponding to a first protocol interface of the first communication protocol, the preset signal interface correspondence comprising a correspondence between the signal data of the data bus and a protocol interface of the first communication protocol; Convert the first data corresponding to the first protocol interface into signal data of the data bus.
6. The method according to claim 3 or 4, characterized in that: The data bus includes a controller area network (CAN) bus and / or a local interconnect network (LIN) bus, the first communication protocol includes a service-oriented scalable middleware (SOME / IP) protocol, and the second communication protocol includes a message queue telemetry transmission (MQTT) protocol.
7. An interface data conversion device, characterized in that: Applied to an in-vehicle communication device, the in-vehicle communication device includes a first gateway and a second gateway, the first gateway uses a first communication protocol for communication, the second gateway uses a second communication protocol for communication, the first communication protocol uses a first interface definition language to describe a first protocol interface, and the second communication protocol uses a second interface definition language to describe a second protocol interface, the device includes: A data receiving module, used for receiving first data sent by the first gateway using the first protocol interface of the first communication protocol; an interface conversion module, configured to determine, through the second gateway, a first interface type of the first protocol interface in the first interface definition language; determine, based on the first interface type and a preset interface correspondence, a corresponding second interface type in the second interface definition language; and convert the first protocol interface into the second protocol interface based on the second interface type; A data generation module is used to generate second data corresponding to the first data based on the second protocol interface, wherein the first communication protocol is a communication protocol for in-vehicle communication and the second communication protocol is a communication protocol for vehicle-cloud communication, or the first communication protocol is a communication protocol for vehicle-cloud communication and the second communication protocol is a communication protocol for in-vehicle communication.
8. A computer storage medium storing a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the steps of the method according to any one of claims 1 to 6.
9. A vehicle-mounted communication device, characterized in that: include: A first gateway, a second gateway, a processor and a memory, wherein the first gateway communicates using a first communication protocol, the second gateway communicates using a second communication protocol, the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the steps of the method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Method in Internet of vehicles and communication system used in Internet of vehicles
CN108965273A
Vehicle-mounted gateway system, and monitoring method and apparatus of vehicle-mounted subsystems
CN109474912A
Message sending method and device, gateway and storage medium
CN112153071A