Communication method, readable storage medium, program product and electronic device
By detecting communication messages between the second electronic device and the first service in the communication system of the vehicle ecological domain and the cloud platform, and determining the corresponding communication interface, directly communicating, the problem of low communication performance caused by multiple protocol conversions is solved, and the user experience is improved.
Patent Information
- Application Number
- CN202411797919.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-03-18
AI Technical Summary
When the vehicle ecological domain and cloud platform are interconnected, it needs to undergo multiple protocol conversions, resulting in lower communication performance and reduced user experience.
By detecting a message in the first electronic device that the second electronic device communicates with the first service, and determining a first communication interface corresponding to the first service in the first communication connection, the second electronic device can communicate directly with the first service to reduce protocol conversion.
The communication performance between the second electronic device and the first electronic device is improved, the protocol conversion process is reduced, and thus the user experience is improved.
Smart Images

Figure CN119652902A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a communication method, a readable storage medium, a program product, and an electronic device. Background Art
[0002] At present, the migration of vehicle-side computing power to the cloud platform is the future trend in the evolution of electronic and electrical architecture. At the same time, the vehicle-side and mobile terminal devices such as mobile phones are interoperable, forming the concept of "ecological domain". The deep integration of the vehicle-side ecological domain and the cloud platform can provide better services for users.
[0003] However, the vehicle-side, ecological domain device-side (for example, vehicle-side and mobile terminals and other devices) and cloud platform protocol clusters are huge, and specific protocols are only applicable to specific scenarios. For example, the scalable service-oriented middleware over IP (SOME / IP) is suitable for in-vehicle communication scenarios, the message queuing telemetry transport (MQTT) and hypertext transfer protocol (HTTP) are suitable for vehicle-cloud interconnection scenarios; there are also some protocols for vehicle-machine ecological domain device interconnection scenarios. Therefore, the interconnection between the vehicle ecological domain and the cloud platform requires multiple protocol conversions, and the communication performance is low, which reduces the user experience. Summary of the invention
[0004] The embodiments of the present application provide a communication method, a readable storage medium, a program product, and an electronic device, which can reduce protocol conversion in communication between electronic devices and improve communication performance.
[0005] In a first aspect, an embodiment of the present application provides a communication method, which is applied to a communication system, wherein the communication system includes at least a first electronic device and a second electronic device, wherein the first electronic device and the second electronic device are connected via a first communication connection; the first electronic device includes a first service; the first electronic device detects a message that the second electronic device communicates with the first service; the first electronic device determines a first communication interface corresponding to the first service in the first communication connection; and the second electronic device communicates with the first service based on the first communication interface.
[0006] Illustratively, through the above solution, when the second electronic device obtains data corresponding to the first service, it does not need to convert multiple protocols. In the first communication connection, the second electronic device can communicate directly with the first service, thereby improving communication performance.
[0007] In a possible implementation of the first aspect, the first communication connection is a data distribution protocol connection.
[0008] In a possible implementation of the first aspect, the first communication interface is an application programming interface connected based on a data distribution protocol.
[0009] In a possible implementation of the first aspect above, the first service of the first electronic device has a first identifier in the communication domain in the data distribution protocol connection; wherein the communication domain is used to characterize the communication environment in which different communication subjects in the data distribution protocol connection are located; the first electronic device detects a message that the second electronic device communicates with the first service, including: the first electronic device detects that the second identifier of the communication domain of the second electronic device in the data distribution protocol connection is the same as the first identifier.
[0010] Exemplarily, in some embodiments of the present application, the communication domain in the data distribution protocol connection may be, for example, a domain hereinafter, representing a communication plane. The first identifier may be, for example, a domain ID, which is used to uniquely identify the domain. The second electronic device and the first service may communicate within the same domain in the data distribution protocol.
[0011] In a possible implementation of the first aspect above, the first identifier of the above-mentioned first service corresponds to a first topic in the communication domain; the first topic is associated with the first service, and the first topic is associated with a second electronic device; the second electronic device communicates with the first service based on the first communication interface, including: the first service sends communication data to the first topic; the second electronic device receives communication data from the first topic.
[0012] Exemplarily, in some embodiments of the present application, a topic can be established within the communication domain. After the topic is established, the first service can send data to the topic, and the second electronic device can obtain data from the topic, thereby completing the communication between the first service and the second electronic device.
[0013] In a possible implementation of the first aspect, the first service is a data writer in the first topic; and the second electronic device is configured as a data reader in the first topic.
[0014] In a possible implementation of the first aspect, the first electronic device is a vehicle computer, and the second electronic device is a server or a mobile terminal.
[0015] In a second aspect, the present application provides an electronic device, comprising: a memory for storing instructions; and at least one processor for executing instructions so that the device implements the first aspect and any possible implementation method of the first aspect. The beneficial effects that can be achieved in the second aspect can refer to the beneficial effects of the method provided in any implementation of the first aspect, and will not be repeated here.
[0016] In a third aspect, the present application provides a computer-readable storage medium, in which instructions are stored, and when the instructions are executed by a device, the computer implements the method provided in the first aspect and any possible implementation of the first aspect. The beneficial effects that can be achieved in the third aspect can refer to the beneficial effects of the method provided in any implementation of the first aspect, and will not be repeated here.
[0017] In a fourth aspect, the present application provides a computer program product, which, when running on a device, enables the device to implement the method provided in the first aspect and any possible implementation of the first aspect. The beneficial effects that can be achieved in the fourth aspect can refer to the beneficial effects of the method provided in any implementation of the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A schematic diagram showing a cloud server acquiring data from a vehicle's camera;
[0019] Figure 2 According to some embodiments of the present application, a flow chart for implementing a communication method is provided;
[0020] Figure 3 According to an embodiment of the present application, a communication framework diagram is shown;
[0021] Figure 4 According to some embodiments of the present application, a schematic diagram of interconnecting different electronic devices via DDS communication is shown;
[0022] Figure 5 According to some embodiments of the present application, a schematic diagram of vehicle ecological domain interconnection is shown;
[0023] Figure 6 According to some embodiments of the present application, a schematic structural diagram of an electronic device 100 is shown. DETAILED DESCRIPTION
[0024] Illustrative embodiments of the present application include, but are not limited to, a communication method, a readable storage medium, a program product, and an electronic device.
[0025] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0026] As described in the background technology, the protocol cluster between the vehicle side, the ecological domain device side (for example, the vehicle side and mobile terminals and other devices) and the cloud platform (for example, the server) is huge. Therefore, the interconnection between the vehicle ecological domain and the cloud platform requires multiple protocol conversions, and the communication performance is low, which reduces the user experience.
[0027] The following describes the process of communication between the server and the vehicle.
[0028] For example, Figure 1 A schematic diagram showing a cloud server acquiring data from a vehicle's camera.
[0029] like Figure 1 As shown, the server 10 and the vehicle computer 20 can communicate through protocol A. Protocol A can be, for example, MQTT protocol, HTTP protocol, etc. Through protocol A, the server 10 can obtain data in the vehicle computer 20 and control the vehicle computer 20. Similarly, the vehicle computer can also store part of the data in the server 10, or move some calculation processes to the server 20, so as to reduce the power consumption and hardware requirements of the vehicle computer. The vehicle computer 20 and various devices inside the vehicle body can communicate through protocol B. Protocol B can be, for example, SOME / IP protocol. Through protocol B, the vehicle computer 20 can obtain data corresponding to various devices in the vehicle body and control the devices in the vehicle body. For example, the vehicle computer 20 can communicate with the camera 30 in the vehicle body through protocol B, so as to obtain data captured by the camera 30, so as to process the image or video captured by the camera 30 to complete the corresponding function (such as detecting whether there is a vehicle approaching, etc.). However, since the protocol A between the server 10 and the vehicle computer 20 is different from the protocol B between the vehicle computer 20 and the camera 30, if the server 10 needs to obtain data from the camera 30, the server 10 needs to first establish a connection with the vehicle computer 20 through protocol A.
[0030] For example, the server 10 may send an instruction or request to the vehicle computer 20 , such as requesting to obtain a real-time video stream or image data from the camera 30 .
[0031] After receiving the request from the server 10, the vehicle computer 20 needs to communicate with the camera 30 or other related components through its internal protocol B.
[0032] Protocol B may involve a bus system or a specific communication interface inside the vehicle computer, which is used to control the startup of the camera 30, adjust parameters (such as resolution, frame rate, etc.) and read data from the camera 30.
[0033] The camera 30 starts to collect data according to the instruction of the vehicle computer 20, and transmits the data to the vehicle computer 20 through protocol B.
[0034] After receiving the data from the camera 30, the vehicle computer 20 can encapsulate the data into a format suitable for transmission via protocol A.
[0035] The protocol A between the server 10 and the vehicle computer 20 is used again to transmit the camera 30 data.
[0036] After receiving the data from the camera 30, the server 10 can further process, analyze or store the data from the camera 30. These data can be used for various applications, such as remote monitoring, driving behavior analysis, automatic driving assistance, etc.
[0037] It can be understood that in the process of the above-mentioned server 10 obtaining the data of the camera 30, it is necessary to first interact with the vehicle computer 20 through protocol A, and then interact with the camera through protocol B through the vehicle computer 20, and finally the vehicle computer 20 interacts with the server 10 through protocol A. Only then can the server 10 obtain the corresponding data of the camera 30. The whole process requires multiple protocol conversions, resulting in low communication performance between the server 10, the vehicle computer 20 and the camera 30, thereby reducing the user experience.
[0038] Similarly, when the server 10 obtains the sensor data of the vehicle body and the server 20 interacts with the mobile device in the ecological domain through the vehicle computer, multiple protocol conversions are also required, and the communication performance between the cloud service and the ecological domain is low.
[0039] In order to solve the above problems, the present application proposes a communication method, wherein a first electronic device includes a first service, and the first electronic device communicates with a second electronic device through a first communication connection; the first electronic device detects a message that the second electronic device calls first data corresponding to the first service, and the first electronic device provides the second electronic device with a first communication interface corresponding to the first service in the first communication connection, and the second electronic device obtains the first data corresponding to the first service from the first communication interface.
[0040] Through the above scheme, when the second electronic device communicates with different services in the first device, there is no need to convert multiple communication protocols. The second electronic device can directly communicate with the corresponding service in the first electronic device through the first communication interface, thereby transmitting corresponding data to improve the communication performance between the second electronic device and the first electronic device.
[0041] In some embodiments of the present application, the first communication connection may be a data distribution service (DDS) communication connection, a DDS communication framework is configured in the first electronic device and the second electronic device, the DDS communication framework in the first electronic device may provide a corresponding application programming interface (API) for each service of the first electronic device, and after the second electronic device is connected to the DDS communication framework of the first electronic device through the DDS protocol, it may communicate with each service through the API reported by each service in the first electronic device. Therefore, the communication between the second electronic device and each service in the first electronic device does not need to go through the conversion of multiple protocols, thereby improving the communication performance.
[0042] Next, the DDS communication framework is introduced.
[0043] Domain: represents a communication plane, which is uniquely identified by a domain ID. Only communication entities within the same domain can communicate. During communication, one or more domains can be divided as needed.
[0044] Domain participant: A local member identity representing an application communicating within a domain. It is a member of the same data domain. A domain participant specifies the DDS domain to which it belongs by defining a domain ID. Two domain participants with different domain IDs are unaware of each other's existence in the network, so multiple communication channels can be created.
[0045] Topic: It is an abstract concept of data, identified by a topic name and associated with the data type of the corresponding data. If all topics involved in the car are grouped together, a virtual global data space is formed.
[0046] Publisher: Publishes topic data, is associated with at least one data writer, and sends data by calling related functions of the data writer.
[0047] Subscriber: subscribes to topic data and is associated with at least one data reader. When data arrives, if the application is busy with other operations or just waiting for the message, there will be two situations: synchronous access and asynchronous notification.
[0048] Data writer: Similar to a cache, it is responsible for writing the topic data to be published from the application layer to the data writer.
[0049] Data reader: It can also be understood as a cache, which is responsible for obtaining topic data from subscribers and then passing it to the application layer.
[0050] Among them, the application layer is the level where user programs or services are located, and it is responsible for generating or processing data that needs to be published.
[0051] In the first electronic device, each service that needs to communicate needs to create a DDS domain participant. The domain participant is the starting point of DDS communication and represents the identity of the service in the DDS domain.
[0052] For example, a domain participant may be created by calling a DDS API interface, and then the quality of service (QoS) policy of the domain participant may be configured to meet communication requirements.
[0053] After creating domain participants, you can create topics, publishers, and subscribers.
[0054] For example, create a topic: A topic is a data channel for communication between publishers and subscribers. Use the DDS API interface to create a topic corresponding to the data type.
[0055] Create a publisher: For services that need to send data, create a publisher and configure its QoS policy.
[0056] Create a subscriber: For services that need to receive data, create a subscriber and configure its QoS policy.
[0057] In each service of the first electronic device, data publishing and subscription can be achieved by calling the DDS API interface.
[0058] For example, for data publishing, create a data writer in the service that needs to send data. Then use the data writer to instantiate the data type as a data sample and call the DDS API interface to write the data sample to the topic.
[0059] For data subscription, create a data reader in the service that needs to receive data. Configure the callback function of the data reader to process when new data samples are received. Then call the DDS API interface to read data samples from the topic.
[0060] It can be understood that after the second electronic device is connected to the first electronic device through the DDS protocol, it can call the DDS AIP interface as a subscriber to read the corresponding data.
[0061] In some embodiments, appropriate QoS policies can be configured for domain participants, topics, publishers, and subscribers according to communication requirements. QoS policies include persistence, historical data retention, reliability, and real-time, which will affect the transmission quality and efficiency of data.
[0062] After configuring the DDS communication framework and API interface, test and debug to ensure that the communication between services is normal. This includes testing data publishing and subscription, verifying the effectiveness of QoS policies, and handling possible errors and exceptions.
[0063] Through the above steps, the API interface of the DDS communication framework can be added to each service in the first electronic device to achieve efficient communication between services. It can be understood that the above-mentioned addition of the API interface of the DDS communication framework to the service is only an example. In other embodiments, the process of adding the API interface to the DDS communication framework can also include more or fewer steps. The above embodiment does not limit the process of adding the API interface to the DDS communication framework.
[0064] Next, the above-mentioned communication method is introduced.
[0065] For example, Figure 2 According to some embodiments of the present application, a flow chart for implementing a communication method is provided.
[0066] It should be noted that the first electronic device and the second electronic device in the embodiment of the present application may also be referred to as a terminal (termina1), a user terminal, a mobile terminal, a user equipment (UE), a terminal device, a mobile station, a mobile terminal (MT), etc. The terminal device may be a mobile phone, a smart TV, a wearable device, a tablet computer (Pad), a computer with a wireless transceiver function, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control (industrial control), a wireless terminal in self-driving (self driving), a wireless terminal in a smart grid (smart grid), a wireless terminal in transportation safety (transportation safety), a wireless terminal in a smart city (smart city), a wireless terminal in a smart home (smart home), etc. The execution subjects of the following processes are all electronic devices. When introducing the following processes, the execution subjects of each process will not be repeated.
[0067] like Figure 2 As shown, the process includes:
[0068] S201: The first electronic device detects a message that the second electronic device communicates with the first service.
[0069] Illustratively, in some embodiments of the present application, the first electronic device includes a first service, and the first electronic device and the second electronic device can establish a first communication connection.
[0070] For example, in some embodiments of the present application, the first electronic device is a vehicle computer, and the second electronic device is a server or a mobile terminal. That is, the vehicle computer can establish a first communication connection with a server corresponding to the cloud service, or the vehicle computer can establish a first communication connection with a user's mobile terminal (such as a mobile phone, notebook, or tablet device).
[0071] Exemplarily, in some embodiments of the present application, the first communication connection may be a data distribution protocol connection (DDS).
[0072] During the process of the communication connection between the first electronic device and the second electronic device, the first electronic device can detect a message of communication between the second electronic device and the first service in the first electronic device.
[0073] In some embodiments of the present application, the first service of the first electronic device has a first identifier in the communication area in the data distribution protocol connection; wherein the communication domain is used to characterize the communication environment where different communication subjects in the data distribution protocol connection are located; the first electronic device detects that the second electronic device communicates with the first service, for example, it can also be:
[0074] The first electronic device detects that the second identifier of the communication area of the second electronic device in the data distribution protocol connection is the same as the first identifier.
[0075] For example, taking the case where the first electronic device is a vehicle computer, the second electronic device is a server, and the first service is a camera service (e.g., a service based on a camera to obtain images or videos, etc.), the server can obtain data such as images or videos provided by the camera service on the vehicle computer for controlling the vehicle. The server is connected to the vehicle computer via DDS communication. During the process of the server and the vehicle computer being connected via DDS communication, the server can send a message to the vehicle computer to obtain image data or video data provided by the camera service. For example, the server can send its own second communication identifier in DDS communication, and the second communication identifier can be, for example, the domain ID of the server in DDS. The vehicle computer determines the first communication identifier corresponding to the camera service in the DDS communication, for example, the domain ID corresponding to the camera service in the DDS communication is the same as the second communication identifier corresponding to the server, then the vehicle computer can determine that a message of communication between the second electronic device and the camera service is detected.
[0076] It can be understood that the above-mentioned vehicle machine, server and camera service are only exemplary illustrations in some embodiments of the present application, and the vehicle machine, server and camera service do not limit the first electronic device, the second electronic device and the first service in the present application.
[0077] S202: The first electronic device determines a first communication interface corresponding to a first service in a first communication connection.
[0078] Illustratively, in some embodiments of the present application, after the first electronic device detects a message that the second electronic device communicates with the first service, it can determine the first communication interface provided by the first service in the first communication connection.
[0079] Exemplarily, the first communication interface may be an application programming interface (API).
[0080] For example, the first service is still a camera service, the first electronic device is a car computer, and the second electronic device is a server. After the car computer detects that the camera service and the server have the same domain ID in the DDS communication, the camera service and the server can be connected for communication based on the first communication interface. The first communication interface can be, for example, an API interface provided by the camera service in the communication area corresponding to the domain ID in DDS. In other words, the car computer can determine the API interface provided by the camera service in the communication area with the same domain ID corresponding to the corresponding server and the camera service in the DDS communication.
[0081] S203: The second electronic device communicates with the first service based on the first communication interface.
[0082] Illustratively, in some embodiments of the present application, after the first electronic device determines the first communication interface, the second electronic device may communicate with the first service based on the first communication interface to obtain corresponding data.
[0083] For example, in some embodiments of the present application, the first identifier of the first service corresponds to a communication domain including a first topic; the first topic is associated with the first service, and the first topic is associated with the second electronic device; the second electronic device communicates with the first service based on the first communication interface, for example, it may be:
[0084] The first service sends communication data to the first topic; the second electronic device receives the communication data from the first topic.
[0085] For example, the camera service includes a corresponding first topic in the communication domain corresponding to the domain ID, and the server can communicate with the camera service through the first topic in the communication domain.
[0086] For example, the communication area of the first service includes the first topic; the first topic is associated with the first service, and the first topic is associated with the second electronic device, for example, it can be:
[0087] The first service is a data writer in the first topic;
[0088] The second electronic device is configured as a data reader in the first subject.
[0089] That is, the camera service can create a data writer in the first topic, and upload the data corresponding to the camera service, such as the image or video data captured by the camera, to the first topic. Then, the server creates a data reader in the first topic, and configures the callback function of the data reader to read the image or video data reported by the camera service in the first topic. Thus, data communication is completed.
[0090] It can be understood that in the above process, the second electronic device can directly communicate with the first service in the first communication connection. Therefore, the communication process does not need to perform multiple protocol conversions, thereby improving communication performance and user experience.
[0091] Below, a communication framework in an embodiment of the present application is introduced.
[0092] For example. Figure 3 According to an embodiment of the present application, a communication framework diagram is shown.
[0093] like Figure 3 As shown, the communication framework includes: business layer, service layer, public communication technology and infrastructure, etc.
[0094] The business layer is a layer used for direct interaction with users. It provides rich functions and services to meet various needs of users on the network. For example, in the ecological domain formed by mobile terminals and car computers, the business layer on the mobile terminal can provide services such as live video broadcast and knowledge base large models. In the business layer of the car computer, body management, smart driving, smart cabin and other services can be provided. In the cloud vertical composed of the car computer and the server, the business layer of the cloud server can provide services such as traffic management and data storage. In other electronic devices, the business layer can also provide services such as vehicle-road collaboration, remote medical treatment, smart home and fault diagnosis.
[0095] The service layer is used to provide various services for the business layer, including basic services and combined services. The basic services provided by different electronic devices after being interconnected through DDS can be called by each other. For example, each device can provide API interfaces for various basic services in DDS communication. When the business layer of each electronic device needs to use the corresponding service, it can directly call the corresponding API interface in DDS communication to communicate with the corresponding service. In other words, after different devices are connected through DDS communication, they can call the services in the corresponding devices.
[0096] For example, the basic services provided by the car computer may include navigation, cameras, and sensors, and the corresponding basic services provided by the mobile terminal may include screen data transmission, network resources, application video playback, and think tank large models.
[0097] For example, the user can interconnect the mobile phone and the car computer through DDS communication, and then the mobile phone can obtain camera data from the API interface corresponding to the camera service provided by the car computer, thereby obtaining the video of the scenery outside the car, and then use the mobile phone's screen data transmission service to synchronize the video to the mobile phone screen in real time, or start video live broadcast on the mobile phone, and publish the car computer video on the Internet through network resource services.
[0098] Similarly, the server or other devices corresponding to the cloud platform can also control, manage and implement corresponding functions of the vehicle computer through the data provided by the various foundations of the vehicle computer.
[0099] Public communication technology is used to connect various electronic devices. It is based on the DDS protocol stack. DDS is a distributed communication architecture that can realize dynamic service discovery and has excellent system scalability. DDS communication is backward compatible with multiple chips, multiple operating systems and various hardware abstract environments, and provides a standard API upward.
[0100] That is to say, different electronic devices (such as car computers, mobile terminals, servers, etc.) can be connected through DDS communication, and provide API interfaces for various services in DDS communication so that different electronic devices can obtain corresponding service data.
[0101] The following describes a process of establishing a DDS communication connection between the first electronic device and the second electronic device.
[0102] Exemplarily, the first electronic device and the second electronic device have a hardware foundation for network communication, for example, network communication can be performed through a network card, a network cable, or a wireless network adapter.
[0103] Then, middleware supporting DDS, such as RTIConnext DDS, eProsima Fast DDS, etc., may be installed on the first electronic device and the second electronic device. The DDS middleware may be a part of the DDS framework.
[0104] In the process of connecting the first electronic device to the second electronic device through DDS communication, the two devices need to be connected to the same network, for example, to a local area network (LAN), a wide area network (WAN) or a subnet of the Internet. And ensure that the network settings (such as IP address, subnet mask, gateway, etc.) of the first electronic device and the second electronic device are correct so that they can communicate with each other.
[0105] Next, you can configure the DDS domain and topic.
[0106] DDS domain setting: In the DDS middleware of the first electronic device and the second electronic device, the same domain ID is set. The domain ID is a key identifier to distinguish different DDS communication ranges. Only devices with the same domain ID can communicate with each other.
[0107] Topic definition: Define one or more topics, which will serve as channels for data exchange. Topic names should be descriptive so that publishers and subscribers can easily identify them.
[0108] In the DDS middleware, relevant QoS parameters are configured for topics, such as reliability, persistence, lifecycle, etc., to meet application requirements.
[0109] Then configure the publisher and subscriber.
[0110] Publisher configuration: Configure one or more data writer objects on an electronic device (e.g., the first electronic device), which are responsible for writing data into the DDS global data space. Associate the data writer with the previously defined topic and set the corresponding data type and QoS parameters.
[0111] Subscriber configuration: Configure one or more data reader objects on another device (such as a second electronic device), which are responsible for reading data from the DDS global data space. Associate the data reader with the previously defined topic and set the corresponding data type and QoS parameters.
[0112] Next, the first electronic device and the second electronic device can establish a communication connection
[0113] For example, the dynamic discovery mechanism provided by the DDS middleware can be used to allow publishers and subscribers to automatically discover each other at runtime. For example, this can be achieved through the real-time publish-subscribe (RTPS) protocol.
[0114] During the discovery process, publishers and subscribers exchange their information (such as topics, QoS parameters, etc.) in order to establish a communication connection.
[0115] Once a subscriber or publisher finds each other, the publisher and subscriber will establish a communication connection based on the configured QoS parameters. After the connection is established, the publisher can start sending data and the subscriber can start receiving data.
[0116] For example, the publisher writes data to the DDS global data space through the data writer. The DDS middleware is responsible for transmitting data from the publisher to the subscriber. The subscriber reads data from the DDS global data space through the data reader. After receiving the data, the subscriber can process the data according to the application requirements. The processing method can be real-time processing, storage, forwarding, etc.
[0117] Through the above connection process, different electronic devices can be connected via DDS communication.
[0118] The infrastructure mainly includes various chips, operating systems, and hardware abstraction environments (including but not limited to Bluetooth, LAN and WAN WIFI, 4G, 5G, sensors, and actuators).
[0119] It can be understood that through the above communication framework, each electronic device connected through DDS communication can call the services provided by each device. Therefore, the communication process between different services of different electronic devices does not require too much protocol conversion, thereby improving the communication efficiency of electronic devices.
[0120] DDS can ensure communication requirements such as reliability and redundancy through a variety of QoS strategies. The DDS information security plug-in can improve security performance, authenticate the identity of domain participants, prevent cross-domain attacks, and prevent data from being eavesdropped and tampered. In one-to-many communication scenarios, DDS has high performance in communication latency and throughput.
[0121] Based on the above communication framework, we can open up the cross-domain interconnection communication of the vehicle ecological domain cloud platform, describe the communication link, analyze the advantages of the solution, and provide ideas for the design of cross-domain integration functions. It can also reduce the complexity of the interaction protocol, improve development efficiency, integrate multi-terminal hardware capabilities, enrich use case scenarios, meet the needs of thousands of people, improve communication performance, share computing power, liberate vehicle-side computing power, and achieve vehicle-side cost reduction.
[0122] Next, the process of interconnecting different electronic devices through DDS communication is introduced.
[0123] For example, Figure 4 According to some embodiments of the present application, a schematic diagram of interconnecting different electronic devices via DDS communication is shown.
[0124] like Figure 4 As shown, the corresponding different electronic devices can be servers corresponding to the cloud platform, mobile terminals (such as mobile phones) corresponding to the ecological domain, and vehicle computers, etc. It can be understood that the vehicle computers, servers, mobile phones and other devices provided in the embodiments of the present application are only examples. In other embodiments, the electronic devices for DDS communication can also be notebooks, computers, wearable devices, etc. The embodiments of the present application do not limit the devices capable of DDS communication.
[0125] For example, Figure 4 As shown in the figure, the server corresponding to the cloud platform can be connected to the vehicle computer, mobile phone, etc. through the gateway to establish DDS communication. The gateway converts the in-vehicle LAN MQTT, bare packet transmission control protocol (TCP) / user datagram protocol (UDP), SOME / IP and other protocols into WAN DDS, and dynamically establishes links with other DDS nodes through cloud service discovery, and then conducts data interaction based on DDS.
[0126] The application services that the server corresponding to the cloud platform can provide include, for example, over-the-air (OTA), traffic management, remote control, digital twins, etc. The application services provided by mobile phones may include, for example, live video, screen projection, think tank models, etc. The application services provided by the car machine may include, for example, voice, member detection, perception fusion, planning control, body control, etc. The car machine can also provide corresponding basic services, such as on-board screens, global positioning systems (GPS), cameras, and sensor execution.
[0127] For example, the server of the cloud platform can provide a corresponding DDS bus (the DDS bus can also be used as a communication domain in DDS communication), thereby exposing the API interface of the application service corresponding to the server of the cloud platform to the DDS bus of the cloud platform. Other devices can connect to the DDS bus corresponding to the server of the cloud platform through a gateway, and then obtain the API interface of the corresponding application service to communicate.
[0128] Similarly, the mobile phone corresponding to the ecological domain can also provide the corresponding DDS bus in DDS communication for the server and the vehicle to obtain the corresponding services. Different DDS buses can be established in the vehicle according to different service types. For example, the bus corresponding to the smart cockpit can provide application services such as voice and occupant detection. The buses corresponding to intelligent driving, body control, and power chassis can provide application services such as perception fusion, planning control, and body control. After different devices are connected through DDS communication, the services in each bus can be obtained through different DDS buses.
[0129] Through DDS communication connection, service communication between different electronic devices can be opened up, thereby improving the performance of cross-domain communication of electronic devices.
[0130] Next, we will introduce the scenario of vehicle ecosystem interconnection.
[0131] For example, Figure 5According to some embodiments of the present application, a schematic diagram of vehicle ecological domain interconnection is shown.
[0132] like Figure 5 As shown, the vehicle ecological domain interconnection is an ecological domain interconnection formed by the vehicle computer and the mobile terminal.
[0133] For example, in some embodiments of the present application, the basic services that can be provided by the mobile terminal in the ecological domain may include screen data transmission, network resources, application video playback, and think tank large models, etc. Through DDS communication interconnection, the mobile terminal can monitor and control the status of the vehicle's intelligent cockpit, intelligent driving, body, power, chassis and other systems.
[0134] For example, the ecological domain mobile terminal is connected to the vehicle computer through DDS, and the vehicle computer hardware is used to realize functions such as live video broadcast, vehicle control and vehicle status monitoring; the vehicle computer can also flexibly deploy mobile device knowledge base large models, network resources and other capabilities to achieve deep integration of ecological domain and vehicle-side functions.
[0135] According to the service capability provider, the vehicle ecosystem interaction scenarios can be divided into two categories: mobile terminals calling the service capabilities provided by the vehicle computer, and the vehicle side calling the service capabilities provided by the mobile device.
[0136] For example, the scenario for a mobile terminal to call the car computer's services can be: the car computer's screen can be projected in real time on a mobile terminal (such as a tablet computer, mobile phone, etc.), the vehicle status is displayed in real time on the mobile terminal's display screen, the control capabilities are displayed through the mobile terminal, and passengers can use the mobile terminal to control the air conditioning temperature in the car and other capabilities.
[0137] For another example, when a family is traveling, the in-car occupant monitoring and the scenery video outside the car are synchronized to the screen of the mobile terminal in real time, the live video broadcast is started on the mobile terminal, and the car video is published on the Internet.
[0138] For example, scenarios where the vehicle computer calls the mobile terminal service include: multiple mobile terminals simultaneously share screen projection and support multi-screen linkage. Mobile terminals perform real-time screen projection and use mobile phone traffic to play high-definition videos in real time. Multiple mobile terminals are used as large models of local knowledge bases to provide shared calculation examples for vehicle computer calculations.
[0139] It can be understood that in some embodiments of the present application, the DDS communication protocol interface standard is unified and does not rely on the traditional vehicle-mounted computer and mobile terminal interconnection protocol (such as Hicar TM 、Carplay TM ), compatible with mobile terminals of different operating systems, and supports multiple connection methods (such as WIFI, Bluetooth, NFC, USB, etc.), with better compatibility. DDS has the characteristics of dynamic discovery, multi-device plug-and-play, supports rapid integration of third-party devices, and has strong flexibility.
[0140] For example, when the car computer and the cloud platform server communicate over a wide area network, the data interaction between the cloud platform server and the car computer presents a complex communication scenario with high reliability, high throughput, one-to-many, and security. The cloud platform server can access the car computer through DDS, the cloud platform server can initiate OTA and remote control to the car computer, and the car computer can also use the cloud platform's traffic management and digital twin capabilities to decide vehicle behavior.
[0141] The electronic devices (eg, the first electronic device or the second electronic device) involved in the above embodiments are introduced below.
[0142] For example, Figure 6 According to some embodiments of the present application, a schematic structural diagram of an electronic device 100 is shown.
[0143] The electronic device 100 can be used to implement the communication methods provided in the aforementioned embodiments.
[0144] like Figure 6 As shown, the electronic device 100 includes one or more processors 101, a system memory 102, a non-volatile memory (NVM) 103, a communication interface 104, an input / output device 105, and a system control logic 106 for coupling the processor 101, the system memory 102, the non-volatile memory 103, the communication interface 104 and the input / output (I / O) device 105. Among them:
[0145] The processor 101 may include one or more processing units, for example, a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processor (DSP), a microprocessor (MCU), an artificial intelligence (AI) processor or a programmable logic device (field programmable gate array, FPGA), a neural network processor (neural-network processing unit, NPU), etc. The processing module or processing circuit may include one or more single-core or multi-core processors. In some embodiments, the CPU can be used to optimize the neural network model to be run, and the NPU can be used to run the neural network model to be run.
[0146] The system memory 102 is a volatile memory, such as a random-access memory (RAM), a double data rate synchronous dynamic random access memory (DDR SDRAM), etc. The system memory is used to temporarily store data and / or instructions. For example, in some embodiments, the system memory 102 can be used to store the data provided by the aforementioned different services, such as sensor data, image data or video data, etc., and can also be used to store instructions of the communication methods provided by the aforementioned embodiments.
[0147] The non-volatile memory 103 may include one or more tangible, non-transitory computer-readable media for storing data and / or instructions. In some embodiments, the non-volatile memory 103 may include any suitable non-volatile memory such as flash memory and / or any suitable non-volatile storage device, such as a hard disk drive (HDD), a compact disc (CD), a digital versatile disc (DVD), a solid-state drive (SSD), etc. In some embodiments, the non-volatile memory 103 may also be a removable storage medium, such as a secure digital (SD) memory card, etc. In other embodiments, the non-volatile memory 103 may be used to store instructions of the communication method provided in the aforementioned embodiments, etc.
[0148] In particular, the system memory 102 and the non-volatile memory 103 may respectively include: a temporary copy and a permanent copy of the instruction 107. The instruction 107 may include: when executed by at least one of the processors 101, the electronic device 100 implements the communication method provided in each embodiment of the present application.
[0149] The communication interface 104 may include a transceiver for providing a wired or wireless communication interface for the electronic device 100, and then communicating with any other suitable device through one or more networks. In some embodiments, the communication interface 104 may be integrated into other components of the electronic device 100, for example, the communication interface 104 may be integrated into the processor 101. In some embodiments, the electronic device 100 may communicate with other devices through the communication interface 104, for example, the electronic device 100 may obtain corresponding data from other electronic devices through the communication interface 104.
[0150] The input / output (I / O) device 105 may include input devices such as a keyboard, a mouse, etc., and output devices such as a display, etc. A user may interact with the electronic device 100 through the input / output (I / O) device 105 .
[0151] System control logic 106 may include any suitable interface controller to provide any suitable interface with other modules of electronic device 100. For example, in some embodiments, system control logic 106 may include one or more memory controllers to provide interfaces to system memory 102 and non-volatile memory 103.
[0152] In some embodiments, at least one of the processors 101 may be packaged together with the logic of one or more controllers for the system control logic 106 to form a system in package (SiP). In other embodiments, at least one of the processors 101 may also be integrated with the logic of one or more controllers for the system control logic 106 on the same chip to form a system-on-chip (SoC).
[0153] Understandably, Figure 6 The structure of the electronic device 100 shown is only an example. In other embodiments, the electronic device 100 may include more or fewer components than shown, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0154] It is understandable that the electronic device 100 can be any electronic device, including but not limited to a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, etc., and the embodiments of the present application are not limited thereto.
[0155] The embodiments of the present application also provide a program product, which, when executed on an electronic device, can enable the electronic device to implement the methods provided in the aforementioned embodiments.
[0156] An embodiment of the present application further provides a readable storage medium, in which one or more programs are stored. When the one or more programs are executed by an electronic device, the electronic device implements the methods provided in the aforementioned embodiments.
[0157] The various embodiments of the mechanism disclosed in the present application can be implemented in hardware, software, firmware or a combination of these implementation methods. The embodiments of the present application can be implemented as a computer program or program code executed on a programmable system, which includes at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device and at least one output device.
[0158] Program code can be applied to input instructions to perform the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, a processing system includes any system having a processor such as, for example, a digital signal processor, a microcontroller, an application specific integrated circuit, or a microprocessor.
[0159] Program code can be implemented with high-level programming language or object-oriented programming language to communicate with the processing system. When necessary, program code can also be implemented with assembly language or machine language. In fact, the mechanism described in this application is not limited to the scope of any specific programming language. In either case, the language can be a compiled language or an interpreted language.
[0160] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried by or stored on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, the instructions may be distributed over a network or through other computer-readable media. Therefore, the machine-readable medium may include any mechanism for storing or transmitting information in a form readable by a machine (e.g., a computer), including but not limited to floppy disks, optical disks, optical discs, compact disc-read only memory (CD-ROMs), magneto-optical disks, read-only memory (ROM), random-access memory (RAM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic or optical cards, flash memory, or tangible machine-readable storage for transmitting information using the Internet in electrical, optical, acoustic or other forms of propagation signals (e.g., carrier waves, infrared signals, digital signals, etc.). Therefore, the machine-readable medium includes any type of machine-readable medium suitable for storing or transmitting electronic instructions or information in a form readable by a machine (e.g., a computer).
[0161] In the accompanying drawings, some structural or method features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be required. Instead, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. In addition, the inclusion of structural or method features in a particular figure does not mean that such features are required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.
[0162] It should be noted that the units / modules mentioned in the various device embodiments of the present application are all logical units / modules. Physically, a logical unit / module can be a physical unit / module, or a part of a physical unit / module, or can be implemented as a combination of multiple physical units / modules. The physical implementation method of these logical units / modules themselves is not the most important. The combination of functions implemented by these logical units / modules is the key to solving the technical problems proposed by the present application. In addition, in order to highlight the innovative part of the present application, the above-mentioned device embodiments of the present application do not introduce units / modules that are not closely related to solving the technical problems proposed by the present application, which does not mean that there are no other units / modules in the above-mentioned device embodiments.
[0163] It should be noted that in the examples and description of this patent, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "including one" do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0164] Although the present application has been illustrated and described with reference to certain preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the scope of the present application.
Claims
1. A communication method, characterized in that: Applied to a communication system, the communication system at least includes a first electronic device and a second electronic device, the first electronic device and the second electronic device are connected via a first communication; the first electronic device includes a first service; The first electronic device detects a message that the second electronic device communicates with the first service; The first electronic device determines, in the first communication connection, a first communication interface corresponding to the first service; The second electronic device communicates with the first service based on the first communication interface.
2. The method according to claim 1, characterized in that The first communication connection is a data distribution protocol connection.
3. The method according to claim 2, characterized in that The first communication interface is an application programming interface connected based on the data distribution protocol.
4. The method according to claim 2, characterized in that: The communication domain of the first service in the data distribution protocol connection has a first identifier; wherein the communication domain is used to characterize the communication environment where different communication subjects in the data distribution protocol connection are located; The first electronic device detects a message that the second electronic device communicates with the first service, including: The first electronic device detects that the second identifier of the communication domain of the second electronic device in the data distribution protocol connection is the same as the first identifier.
5. The method according to claim 4, characterized in that The communication domain where the first identifier is located includes a first topic; the first topic is associated with the first service, and the first topic is associated with the second electronic device; The second electronic device communicates with the first service based on the first communication interface, including: The first service sends communication data to the first topic; The second electronic device receives the communication data from the first topic.
6. The method according to claim 5, characterized in that The first service is a data writer in the first topic; The second electronic device is configured as a data reader in the first subject.
7. The method according to claim 1, characterized in that The first electronic device is a vehicle computer, and the second electronic device is a server or a mobile terminal.
8. An electronic device, characterized in that: include: A memory for storing instructions; At least one processor is used to execute the instructions so that the electronic device implements the method according to any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that: The readable storage medium stores instructions, and when the instructions are executed on a computer, the computer is caused to execute the method according to any one of claims 1 to 7.
10. A computer program product, characterized in that When the computer program product is executed on a device, the device is caused to perform the method according to any one of claims 1 to 7.