A vehicle-cloud communication method, device, storage medium and equipment
Patent Information
- Application Number
- CN202510518907.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-23
- Publication Date
- 2026-10-23
AI Technical Summary
但是,目前对车云通信协议的处时,往往是采用固定架构设计,如对于某一车载应用软件来说,其应用过程中只能采用某一种协议进行车云通信,即使出通信失败的情况,也只能进行失败后处理或者采用同一种协议进行重新通信,无法灵活应对协议的快速演化与升级
[0058]本申请实施例提供的一种车云通信方法、装置、存储介质及设备,该方法应用于搭载了目标应用的目标车辆,具体包括:首先响应于用户提出的对于目标应用的功能触发请求,调用通信组件中接口层的发送接口,将功能触发请求发送至云端服务器;其中,目标应用中集成了通信组件;通信组件包括接口层和框架层;接口层用于提供通信组件的通信接口;框架层中包含N个车云通信协议封装的插件;然后通过接口层的发送接口将云端服务器返回的功能参数信息,发送至框架层;接着,再通过框架层的协议路由,根据功能参数信息,从N个车云通信协议封装的插件中调用目标车云通信协议封装的插件,以通过目标车云通信协议与云端服务器进行通信,得到云端服务器返回的功能数据信息;再利用云端服务器返回的功能数据信息,在目标应用中实现用户请求的功能。
Smart Images

Figure CN122970100A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a vehicle-to-cloud communication method, apparatus, storage medium and device. Background Technology
[0002] Vehicle-to-cloud (V2X) communication refers to the data interaction between vehicles and cloud servers, and is a crucial technology for realizing intelligent connected vehicles and smart transportation. V2X communication involves various application software services, such as navigation, entertainment, remote control, and vehicle management, to provide users with interactive functions that can be controlled via voice or manual operation, such as starting navigation, playing videos, and playing music, thereby enhancing the user's riding experience.
[0003] When vehicles communicate with cloud servers, they typically adhere to vehicle-to-cloud communication protocols (i.e., standardized communication rules and conventions), such as Hypertext Transfer Protocol (HTTP), Transmission Control Protocol (TCP), and Internet Protocol (IP). However, current approaches to vehicle-to-cloud communication protocols often employ fixed architectures. For instance, a particular in-vehicle application may only be able to use one specific protocol for vehicle-to-cloud communication. Even in the event of communication failure, the only options are post-failure processing or resuming communication using the same protocol, failing to flexibly adapt to rapid protocol evolution and upgrades. This results in poor scalability, insufficient adaptability, and high maintenance costs, impacting the effectiveness of vehicle-to-cloud communication and ultimately reducing the in-vehicle user's riding experience. Summary of the Invention
[0004] In view of the above problems, this application provides a vehicle-to-cloud communication method, apparatus, storage medium and device. By encapsulating various vehicle-to-cloud communication protocols into plug-ins, each vehicle-to-cloud communication protocol can be dynamically loaded and managed in the form of plug-ins, which can be flexibly called by various application software on the vehicle, thereby improving the vehicle-to-cloud communication effect and enhancing the user's riding experience.
[0005] This application provides a vehicle-to-cloud communication method, wherein the target vehicle is equipped with a target application, and the method includes:
[0006] In response to a user's request to trigger a function for the target application, the sending interface of the interface layer in the communication component is invoked to send the function trigger request to the cloud server; the target application integrates the communication component; the communication component includes the interface layer and the framework layer; the interface layer is used to provide the communication interface of the communication component; the framework layer contains N plug-ins encapsulating the vehicle-cloud communication protocol; N is a positive integer greater than 0;
[0007] The functional parameter information returned by the cloud server is sent to the framework layer through the sending interface of the interface layer;
[0008] Through the protocol routing of the framework layer, based on the functional parameter information, the plugin encapsulated by the target vehicle-cloud communication protocol is called from the plugins encapsulated by the N vehicle-cloud communication protocols, so as to communicate with the cloud server through the target vehicle-cloud communication protocol and obtain the functional data information returned by the cloud server.
[0009] The user-requested function is implemented in the target application using the functional data information returned by the cloud server.
[0010] In one possible implementation, before calling the sending interface of the interface layer to send the function trigger request to the cloud server in response to a user's function trigger request for the target application, the method further includes:
[0011] Obtain N vehicle-to-cloud communication protocols; encapsulate the N vehicle-to-cloud communication protocols into plug-in modules to obtain N plug-in modules of vehicle-to-cloud communication protocols and save them to the framework layer of the communication component;
[0012] When the target application starts, the framework layer of the communication component is initialized, and the target vehicle-to-cloud communication protocol adopted by the target application is determined; the target vehicle-to-cloud communication protocol is at least one of the N vehicle-to-cloud communication protocols.
[0013] In the framework layer of the communication component, the plugin encapsulated in the target vehicle-to-cloud communication protocol is registered;
[0014] After the plugin encapsulating the target vehicle-to-cloud communication protocol is registered, the plugin is loaded to generate a protocol route; and the protocol route is saved in the framework layer.
[0015] In one possible implementation, registering the plugin encapsulated in the target vehicle-to-cloud communication protocol within the framework layer of the communication component includes:
[0016] In the framework layer of the communication component, the target vehicle-cloud communication protocol encapsulation plugin is selected from the N vehicle-cloud communication protocol encapsulation plugins;
[0017] The plugin encapsulated by the target vehicle-to-cloud communication protocol is loaded and initialized. After the loading and initialization are completed, a routing table and protocol routes are generated, and the processed plugin is saved to the memory of the target application.
[0018] In one possible implementation, the loading and initialization process of the plugin encapsulated in the target vehicle-to-cloud communication protocol includes:
[0019] The plugin encapsulating the target vehicle-cloud communication protocol is bound to the address and local port number of the cloud server; and certificate verification and identity authentication are performed through the connection established between the plugin encapsulating the target vehicle-cloud communication protocol and the cloud server.
[0020] In one possible implementation, after sending the functional parameter information returned by the cloud server to the framework layer through the sending interface of the interface layer, the method further includes:
[0021] The function parameter information returned by the cloud server is subjected to security verification; and the function parameter information that passes the verification is sent to the protocol route.
[0022] In one possible implementation, after obtaining the functional data information returned by the cloud server, the method further includes:
[0023] The functional data information returned by the cloud server is subjected to security verification and result verification to obtain the verification result;
[0024] Based on the verification result, determine whether the functional data information returned by the cloud server meets the conditions;
[0025] The step of implementing the user-requested function in the target application using the functional data information returned by the cloud server includes:
[0026] If the functional data information meets the conditions, the function requested by the user is implemented in the target application using the functional data information returned by the cloud server.
[0027] In one possible implementation, after determining whether the functional data information returned by the cloud server meets the conditions based on the verification result, the method further includes:
[0028] If the functional data information does not meet the conditions, a prompt message indicating that the user's requested function cannot be implemented will be displayed in the target application.
[0029] This application embodiment also provides a vehicle-to-cloud communication device applied to a target vehicle, wherein the target vehicle is equipped with a target application, and the device includes:
[0030] The invocation unit is used to respond to a user's function triggering request for the target application by invoking the sending interface of the interface layer in the communication component to send the function triggering request to the cloud server; the target application integrates the communication component; the communication component includes the interface layer and the framework layer; the interface layer is used to provide the communication interface of the communication component; the framework layer contains N plug-ins encapsulated with the vehicle-cloud communication protocol; N is a positive integer greater than 0;
[0031] The sending unit is used to send the functional parameter information returned by the cloud server to the framework layer through the sending interface of the interface layer;
[0032] The communication unit is used to call the target vehicle cloud communication protocol encapsulated plugin from the N vehicle cloud communication protocol encapsulated plugins according to the functional parameter information through the protocol routing of the framework layer, so as to communicate with the cloud server through the target vehicle cloud communication protocol and obtain the functional data information returned by the cloud server.
[0033] The implementation unit is used to implement the user-requested function in the target application using the functional data information returned by the cloud server.
[0034] In one possible implementation, the device further includes:
[0035] An encapsulation unit is used to acquire N vehicle-to-cloud communication protocols; to encapsulate the N vehicle-to-cloud communication protocols into plug-in modules, and to save the N vehicle-to-cloud communication protocol encapsulated plug-ins to the framework layer of the communication component.
[0036] The determining unit is configured to initialize the framework layer of the communication component when the target application starts, and determine the target vehicle-to-cloud communication protocol adopted by the target application; the target vehicle-to-cloud communication protocol is at least one of the N vehicle-to-cloud communication protocols.
[0037] The registration unit is used to register the plug-in encapsulated by the target vehicle-to-cloud communication protocol in the framework layer of the communication component.
[0038] The generation unit is used to load the plugin encapsulated in the target vehicle-to-cloud communication protocol after the plugin registration is completed, generate a protocol route, and save the protocol route in the framework layer.
[0039] In one possible implementation, the registration unit includes:
[0040] A filtering subunit is used to filter out the target vehicle-cloud communication protocol encapsulation plugin from the N vehicle-cloud communication protocol encapsulation plugins in the framework layer of the communication component.
[0041] The loading subunit is used to load and initialize the plugin encapsulated in the target vehicle-to-cloud communication protocol, and after the loading and initialization are completed, generate a routing table and protocol routes, and save the processed plugin into the memory of the target application.
[0042] In one possible implementation, the loading subunit is specifically used for:
[0043] The plugin encapsulating the target vehicle-cloud communication protocol is bound to the address and local port number of the cloud server; and certificate verification and identity authentication are performed through the connection established between the plugin encapsulating the target vehicle-cloud communication protocol and the cloud server.
[0044] In one possible implementation, the device further includes:
[0045] The first verification unit is used to perform security verification on the functional parameter information returned by the cloud server; and send the verified functional parameter information to the protocol router.
[0046] In one possible implementation, the device further includes:
[0047] The second verification unit is used to perform security verification and result verification on the functional data information returned by the cloud server, and obtain the verification result.
[0048] The judgment unit is used to determine whether the functional data information returned by the cloud server meets the conditions based on the verification result.
[0049] The implementation unit is specifically used for:
[0050] If the functional data information meets the conditions, the function requested by the user is implemented in the target application using the functional data information returned by the cloud server.
[0051] In one possible implementation, the device further includes:
[0052] The display unit is used to display a prompt message in the target application indicating that the function requested by the user cannot be implemented if it is determined that the functional data information returned by the cloud server does not meet the conditions.
[0053] This application also provides a vehicle-to-cloud communication device, including: a processor, a memory, and a system bus;
[0054] The processor and the memory are connected via the system bus;
[0055] The memory is used to store one or more programs, the one or more programs including instructions, which, when executed by the processor, cause the processor to perform any of the above-described vehicle-to-cloud communication methods.
[0056] This application also provides a computer-readable storage medium storing instructions that, when executed on a terminal device, cause the terminal device to perform any of the above-described vehicle-to-cloud communication methods.
[0057] This application also provides a computer program product, which, when run on a terminal device, causes the terminal device to execute any of the above-described vehicle-to-cloud communication methods.
[0058] This application provides a vehicle-to-cloud communication method, apparatus, storage medium, and device. The method is applied to a target vehicle equipped with a target application and specifically includes: firstly, responding to a user's request to trigger a function of the target application, calling the sending interface of the interface layer in the communication component to send the function trigger request to a cloud server; wherein, the target application integrates a communication component; the communication component includes an interface layer and a framework layer; the interface layer provides the communication interface for the communication component; the framework layer contains N plugins encapsulated with vehicle-to-cloud communication protocols; then, through the sending interface of the interface layer, sending the function parameter information returned by the cloud server to the framework layer; next, through the protocol routing of the framework layer, based on the function parameter information, calling the plugin encapsulated with the target vehicle-to-cloud communication protocol from among the N plugins encapsulated with vehicle-to-cloud communication protocols to communicate with the cloud server through the target vehicle-to-cloud communication protocol, obtaining the function data information returned by the cloud server; and then using the function data information returned by the cloud server, implementing the user-requested function in the target application.
[0059] As can be seen, this application, when responding to user requests for function triggering of the target application, no longer uses only a single fixed communication protocol for vehicle-to-cloud communication. Instead, it dynamically loads and calls the most suitable protocol plugin from various vehicle-to-cloud communication protocol encapsulation plugins included in the communication component to communicate with the cloud server. This not only improves the flexibility and scalability of application communication but also decouples the communication protocol parsing logic from the application business logic, reducing the complexity of protocol maintenance. Furthermore, the plug-in encapsulation approach supports communication protocol customization and rapid integration, improving protocol adaptability. Ultimately, this enhances the communication effect between the target vehicle equipped with the target application and the cloud server, thereby improving the user's riding experience. Attached Figure Description
[0060] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0061] Figure 1 A schematic diagram illustrating a vehicle-to-cloud communication scenario provided in an embodiment of this application;
[0062] Figure 2 A flowchart illustrating a vehicle-to-cloud communication method provided in an embodiment of this application;
[0063] Figure 3 Example structural diagram of the communication component provided in the embodiments of this application;
[0064] Figure 4 This is a schematic diagram illustrating the composition of a vehicle-to-cloud communication device provided in an embodiment of this application;
[0065] Figure 5 This is a schematic diagram of the structure of a vehicle-to-cloud communication device provided in an embodiment of this application. Detailed Implementation
[0066] With the rapid development of vehicle-to-everything (V2X) technology, an increasing number of applications (such as navigation software, audio playback software, and video playback software) are being integrated into vehicles. These in-vehicle applications communicate with cloud servers via vehicle-to-cloud communication protocols to transmit data and provide various interactive functions for in-vehicle users, thereby enhancing their riding experience. Figure 1 As shown.
[0067] The role of vehicle-to-cloud (V2X) communication protocols is to ensure that vehicles and cloud servers can exchange data correctly and securely. In practical applications, V2X communication protocols can be, but are not limited to, HTTP, TCP / IP, Message Queuing Telemetry Transport (MQTT), and socket protocols. However, current V2X communication protocol implementations often employ fixed architectures. For example, a particular in-vehicle application software can only use one specific protocol for V2X communication. Even if communication fails, it can only perform post-failure processing or retry using the same protocol, but cannot use other protocols. For instance, for in-vehicle video software, which uses HTTP for data transmission between the vehicle and the cloud, if a transmission failure occurs, it can only perform post-failure processing or retry the data transmission request using HTTP, but cannot switch to non-HTTP protocols such as MQTT. This results in an inability to flexibly respond to rapid protocol evolution and upgrades, leading to the following problems:
[0068] 1. Poor scalability: The introduction of new vehicle cloud communication protocols often requires modification of the underlying communication code, increasing the complexity of the communication system and making it easy to introduce errors.
[0069] 2. Low development efficiency: For vehicle maintenance personnel, each update to an existing protocol or the addition of a new vehicle cloud communication protocol requires the redevelopment, testing, and deployment of the entire communication system's code, resulting in low efficiency.
[0070] 3. High maintenance costs: Since the parsing logic of the vehicle-cloud communication protocol is often deeply coupled with the code of various applications, if there are protocol updates or the addition of new vehicle-cloud communication protocols in the future, the code of various applications will need to be rewritten, which will lead to high maintenance difficulty.
[0071] For example, if the business function implementation of video software A (such as the function of verifying whether a user has membership benefits) is based on vehicle-to-cloud communication using the HTTP protocol, then the business function code of video software A is completely bound to the HTTP protocol. In other words, all the functional logic code of video software A is written based on the HTTP protocol. If the business function implementation of video software A needs to be changed to use the MQTT protocol or other non-HTTP protocols for vehicle-to-cloud communication, then the developers need to rewrite all the functional logic code of video software A based on the MQTT protocol or other non-HTTP protocols, which is costly.
[0072] 4. Insufficient compatibility: It has weak support for customized protocols from different manufacturers, making it difficult to meet personalized needs.
[0073] It is evident that the existing fixed architecture design for vehicle-to-cloud communication protocols suffers from poor scalability, low development efficiency, insufficient adaptability, and high maintenance costs, which may affect the effectiveness of vehicle-to-cloud communication and consequently reduce the riding experience for in-vehicle users.
[0074] To address the aforementioned shortcomings, this application provides a vehicle-to-cloud communication method. This method is applied to a target vehicle equipped with a target application and specifically includes: First, in response to a user's request to trigger a function of the target application, the method calls the sending interface of the interface layer in the communication component to send the function trigger request to a cloud server. The target application integrates a communication component, which includes an interface layer and a framework layer. The interface layer provides the communication interface for the communication component, and the framework layer contains N plugins encapsulated with vehicle-to-cloud communication protocols. Then, the method sends the function parameter information returned by the cloud server to the framework layer through the sending interface of the interface layer. Next, through protocol routing in the framework layer, based on the function parameter information, the method calls the plugin encapsulated with the target vehicle-to-cloud communication protocol from among the N plugins to communicate with the cloud server via the target vehicle-to-cloud communication protocol, obtaining the function data information returned by the cloud server. Finally, the method utilizes the function data information returned by the cloud server to implement the user-requested function (i.e., the function corresponding to the function trigger request) in the target application.
[0075] As can be seen, this application, when responding to user requests for function triggering of the target application, no longer uses only a single fixed communication protocol for vehicle-to-cloud communication. Instead, it dynamically loads and calls the most suitable protocol plugin from various vehicle-to-cloud communication protocol encapsulation plugins included in the communication component to communicate with the cloud server. This not only improves the flexibility and scalability of application communication but also decouples the communication protocol parsing logic from the application business logic, reducing the complexity of protocol maintenance. Furthermore, the plug-in encapsulation approach supports communication protocol customization and rapid integration, improving protocol adaptability. Ultimately, this enhances the communication effect between the target vehicle equipped with the target application and the cloud server, thereby improving the user's riding experience.
[0076] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0077] First Embodiment
[0078] See Figure 2This is a flowchart illustrating a vehicle-to-cloud communication method provided in this embodiment. The method includes the following steps:
[0079] S201: In response to a user's request to trigger a function for the target application, the sending interface of the interface layer in the communication component is invoked to send the function trigger request to the cloud server; wherein, the target application integrates a communication component; the communication component includes an interface layer and a framework layer; the interface layer is used to provide the communication interface of the communication component; the framework layer contains N plug-ins encapsulating the vehicle-cloud communication protocol; N is a positive integer greater than 0.
[0080] In this embodiment, any vehicle requiring vehicle-to-cloud communication is defined as the target vehicle. This target vehicle carries a target application that needs to interact with the cloud server via a communication protocol. It should be noted that this application does not limit the domain or business functions of the target application; for example, the target application could be a map software with navigation capabilities, or a video playback software with video playback capabilities, etc.
[0081] Furthermore, to improve the vehicle-to-cloud communication performance, this application proposes a vehicle-to-cloud communication protocol processing method based on a plug-in design. This involves pre-acquiring N different types of vehicle-to-cloud communication protocols (such as HTTP, MQTT, and Socket protocols), then encapsulating these N different types of vehicle-to-cloud communication protocols into plug-in modules, resulting in N plug-in modules of the vehicle-to-cloud communication protocol, which are then saved to the framework layer of the communication component. For example, a system can be constructed as follows: Figure 3 The communication component shown is used to encapsulate N vehicle-to-cloud communication protocol plugins and save them to the framework layer of this communication component, such as... Figure 3 The content shown in the "Protocol Plugins" section enables various vehicle-to-cloud communication protocols to be dynamically loaded and managed as plugins, allowing for flexible invocation by various target applications on the target vehicle, thereby improving communication performance. Specifically, this application pre-constructs protocols such as... Figure 3 The communication component shown includes an interface layer and a framework layer. The interface layer provides the communication interface for the communication component, such as... Figure 3The “send()” interface in the middle interface layer can be used to send request data to the cloud server. The framework layer contains N (the specific value is not limited, any positive integer greater than 0) plug-ins encapsulating the vehicle-cloud communication protocol (and modules that manage these plug-ins), which may include, but are not limited to, plug-ins encapsulating protocols such as HTTP, MQTT, and Socket. This application does not limit the encapsulation method of the protocol plug-ins. Existing or future encapsulation methods can be used to abstract different communication protocol logics into independent plug-ins and provide services to the outside world through a unified interface. The encapsulation process may include, but is not limited to, two points: (1) Protocol adaptation: converting specific communication protocols (such as HTTP, MQTT, Socket, etc.) into standard interfaces that meet the requirements of the framework. (2) Interface definition: all plug-ins must implement core methods such as “send()” (send message) and “sub()” (subscribe to message) to ensure the compatibility of communication protocols. Among them, “sub()” is used to listen for messages from the cloud server. For example, in the MQTT protocol, “sub()” can listen to port 1883 to receive data pushed by the cloud server and then forward the data to the business end of the target application to realize the corresponding business function of the target application. Understandably, regardless of how the protocol plugins in the framework layer change, once the interface in the interface layer (such as the "send()" interface) is bound to the target application with communication needs, it does not need to be modified, because the communication needs of the target application are often fixed, such as the communication needs of video playback software to obtain video data.
[0082] Furthermore, to improve the flexibility of the target application's invocation protocol, one possible implementation is to first... Figure 3 The communication component shown is integrated into the target application. Upon the target application's first startup, the framework layer of the communication component is initialized to determine the vehicle-to-cloud communication protocol used by the target application (defined here as the target vehicle-to-cloud communication protocol). This can also be understood as the initialization of the communication component's framework layer after the target application's first startup, allowing the communication component to know which communication protocol the target application uses for vehicle-to-cloud communication (the specific protocol is not limited and can usually be pre-defined by the target application's manufacturer or manually). However, it should be noted that the target vehicle-to-cloud communication protocol must be at least one of N vehicle-to-cloud communication protocols. For example, taking a video playback application as the target application, after the video playback application starts, its integrated communication component's framework layer can be initialized first, informing the communication component that the video playback application uses HTTP and MQTT protocols for vehicle-to-cloud communication. Example interface call code is as follows:
[0083] Communication.init(HTTP,MQTT)
[0084] Next, in the framework layer of the communication component, the plugin encapsulated by the target vehicle-to-cloud communication protocol is registered; and after registration, the plugin encapsulated by the target vehicle-to-cloud communication protocol is loaded, a protocol route is generated, and the protocol route is saved in the framework layer.
[0085] The process of the target application initiating initialization by calling the initialization function interface (i.e., "init()"), and registering the plugin encapsulated in the target vehicle-cloud communication protocol within the framework layer of the communication component, can include the following two steps:
[0086] (1) In the framework layer of the communication component, select the plugin of the target vehicle-cloud communication protocol encapsulated by the target application from N vehicle-cloud communication protocol encapsulation plugins.
[0087] For example, taking a video playback application as the target application, which uses the target vehicle-to-cloud communication protocol as HTTP and MQTT, when registering plugins encapsulated with HTTP and MQTT protocols, it is necessary to first select the plugins encapsulated with HTTP and MQTT protocols from the N vehicle-to-cloud communication protocol encapsulated plugins contained in the framework layer of the communication component.
[0088] (2) Load and initialize the plugin encapsulated in the target vehicle cloud communication protocol, and after the loading and initialization are completed, generate the routing table and protocol route, and save the processed plugin into the memory of the target application.
[0089] Specifically, this application does not limit the specific processing method when loading and initializing the plugin encapsulated in the target vehicle cloud communication protocol. It may involve binding the plugin encapsulated in the target vehicle cloud communication protocol to the address of the cloud server and the local port number; and performing certificate verification and identity authentication processing through the connection established between the plugin encapsulated in the target vehicle cloud communication protocol and the cloud server.
[0090] The local port number refers to an identifier for the communication device within the vehicle's infotainment system, used for communication between different processes or applications. The port number can be understood analogously to a house number in an address, identifying a specific communication service. For example, the HTTP protocol uses port 80 by default, and the MQTT protocol uses port 443 by default. In this application, the local port number may serve two purposes, including but not limited to: (1) Determining the communication listening port: When the cloud server and the local communication device establish a connection, a specific port is typically required for listening and data exchange. (2) Ensuring the correct operation of communication plugins: Different communication protocol plugins may rely on different ports for data transmission; for example, the HTTP protocol plugin may use port 80, and the MQTT protocol plugin may use port 443.
[0091] Furthermore, the local port number is different from the "send()" and "sub()" interfaces mentioned above. The relationship between the two is as follows: "send()" is primarily used to send data to the cloud server. Its underlying implementation may rely on different protocol plugins, such as HTTP or MQTT plugins, and the specific communication process of these plugins may need to be bound to a specific port number. "sub()" is used to listen for messages from the cloud server. For example, in the MQTT protocol, "sub()" can listen on port 1883 to receive data pushed by the cloud server and forward it to the business end.
[0092] Therefore, during the loading and initialization of the plugin encapsulated in the target vehicle-cloud communication protocol, it is necessary to determine the local port number corresponding to the protocol plugin to ensure that the protocol plugin can be correctly bound and provide communication services.
[0093] Furthermore, it should be noted that, to ensure the security of vehicle-to-cloud communication, during the loading and initialization of the plugin encapsulated with the target vehicle-to-cloud communication protocol, a connection must be established between the plugin and the cloud server, and certificate verification and identity authentication must be performed on both parties. Specifically, this includes the following:
[0094] (1) Certificate verification:
[0095] Certificate validity: Confirm that the server certificate was issued by a trusted Certificate Authority (CA) and has not been tampered with.
[0096] Domain name matching: Check whether the Subject Alternative Name (SAN) or Common Name (CN) in the certificate matches the requested domain name.
[0097] Validity period: Verify that the certificate has not expired and has not become effective prematurely.
[0098] Revocation Status: Check that the certificate has not been revoked using the Certificate Revocation List (CRL) or the Online Certificate Status Protocol (OCSP).
[0099] (2) Identity authentication: The purpose is to ensure that the identities of the two parties in the communication are trustworthy, the data is complete and has not been tampered with, and the requests are legal and compliant.
[0100] After loading and initializing the plugins encapsulated in the target vehicle-to-cloud communication protocol, a routing table and protocol routes can be generated, and the processed plugins can be saved in the target application's memory (dictionary). The execution code, using HTTP and MQTT protocol plugins as examples of plugins encapsulated in the target vehicle-to-cloud communication protocol, is as follows:
[0101] {
[0102] "HTTP" → HTTP Protocol Plugin
[0103] "MQTT" → MQTT protocol plugin
[0104] }
[0105] The role of protocol routing is to control which communication protocol plugin the target application (initiating the vehicle-to-cloud communication request) should use to communicate with the cloud, based on the loaded content in the routing table (including but not limited to the number of communication protocols currently available). For example, if a synchronous message is to be sent to the cloud server, the HTTP protocol plugin can be called; if an asynchronous message is to be sent to the cloud server, the Socket protocol plugin can be called.
[0106] Based on this, when an in-vehicle user makes a function trigger request for a target application via voice or manual trigger (such as "finger tap"), which refers to the user's action or instruction to activate or call a specific function in the target application in some way, such as when a user opens a video playback application page and clicks to play a video clip, in response to the user's function trigger request for the target application, the sending interface of the interface layer in the communication component can be called (e.g., ... Figure 3 The “send()” interface shown in the middle interface layer sends the function trigger request (such as a request to play a video clip) to the cloud server to obtain the function parameter information returned by the cloud server, which is used to execute the subsequent step S202.
[0107] For example, taking a video playback application as the target application, when a user opens the page of this video playback application and clicks to play a movie (i.e., makes a request to play a short video), the video playback application calls the "send()" interface in the interface layer of the communication component to obtain the video parameter information returned by the cloud server. An example is shown below:
[0108] The video parameter information returned by the cloud server is obtained by using the method Communication.send(HTTP, video parameters).
[0109] S202: Send the functional parameter information returned by the cloud server to the framework layer through the sending interface of the interface layer.
[0110] In this embodiment, in step S201, in response to the user's request to trigger a function for the target application, the sending interface of the interface layer in the communication component is invoked to send the function trigger request to the cloud server. After obtaining the function parameter information returned by the cloud server (referring to the communication parameter information used to implement the function requested by the vehicle user, such as the video parameter information returned by the cloud server), it can further send the function through the sending interface of the interface layer (such as...). Figure 3 The “send()” interface shown in the middle interface layer sends the function parameter information (such as the video parameter information returned by the cloud server) and the function trigger request returned by the cloud server to the “send()” in the framework layer for parsing and processing of the function parameter information. The specific processing method is not limited. The parsed function parameter information returned by the cloud server and the function trigger request are sent to the protocol route in the framework layer to execute the subsequent step S203.
[0111] S203: Through the protocol routing of the framework layer, based on the functional parameter information, call the plugin encapsulated by the target vehicle cloud communication protocol from among the N plugins encapsulated by the vehicle cloud communication protocol, so as to communicate with the cloud server through the target vehicle cloud communication protocol and obtain the functional data information returned by the cloud server.
[0112] In this embodiment, after sending the function parameter information and function trigger request to the protocol route in the framework layer in step S202, the protocol route can further determine which vehicle-to-cloud communication protocol to use as the target communication protocol based on the function parameter information. For example, based on the video parameter information returned by the cloud server (i.e., the video parameter information returned by the cloud server = Communication.send(HTTP, video parameters)), it can be determined that the target communication protocol to be called is a plugin encapsulated with the HTTP protocol. Then, the plugin encapsulated with the target vehicle-to-cloud communication protocol (such as a plugin encapsulated with the HTTP protocol) is called from among the N plugins encapsulated with vehicle-to-cloud communication protocols. Since the N plugins encapsulated with vehicle-to-cloud communication protocols included in the framework layer can include, but are not limited to, plugins encapsulated with protocols such as HTTP, MQTT, and Socket, and these plugins all provide communication services for the corresponding vehicle-to-cloud communication protocol through a unified interface, it can be understood that the "plugin" in actual application is the corresponding "vehicle-to-cloud communication protocol." Thus, calling a plugin encapsulated with a certain vehicle-to-cloud communication protocol allows communication with the cloud server using the corresponding vehicle-to-cloud communication protocol. For example, calling from among the N plugins encapsulated with vehicle-to-cloud communication protocols... A plugin encapsulated using the target vehicle-cloud communication protocol (such as a plugin encapsulated using the HTTP protocol) can respond to user requests by communicating with the cloud server through the target vehicle-cloud communication protocol (such as the HTTP protocol) corresponding to the plugin encapsulated using the target vehicle-cloud communication protocol. This allows the cloud server to return functional data information (which refers to the specific data required to implement the functions requested by the in-vehicle user (which can also be understood as the data foundation), such as the playback address, playback format, metadata information of the video clip, user permissions, etc. required to implement the playback function of a certain video clip). This functional data information is then returned layer by layer to the business side of the target application through protocol routing to execute the subsequent step S204.
[0113] One optional implementation is to perform security checks and result verification on the functional data returned by the cloud server during the process of returning these functional data to the target application's business side, in order to ensure communication security. The specific verification method is not limited, but the main purpose is to prevent data that does not meet expectations from being returned to the target application's business side.
[0114] S204: Utilize the functional data information returned by the cloud server to implement the user-requested function in the target application.
[0115] In this embodiment, after obtaining the functional data information returned by the cloud server and the verification result through step S203, it is further possible to determine whether the functional data information returned by the cloud server meets the conditions based on the verification result. The specific content of the conditions is not limited. For example, it can be that the functional data information returned by the cloud server can realize the function requested by the user for the target application (e.g., the video data returned by the cloud server can indeed realize the function that the user wants to play a video clip on the video playback software (example of the target application)). If yes, that is, the functional data information returned by the cloud server meets the conditions, the functional data information returned by the cloud server can be used to realize the function requested by the user in the target application, such as playing the video clip that the user wants to play on the video playback software (example of the target application). Conversely, if no, that is, the functional data information returned by the cloud server does not meet the conditions, a prompt message that the function requested by the user cannot be realized can be displayed in the target application, such as displaying the text "Sorry, no xx video clip content was obtained" on the page of the video playback application (example of the target application).
[0116] Thus, by executing the aforementioned steps S201-S204, this application not only applies plug-in design to the processing of vehicle-to-cloud communication protocols, enabling various vehicle-to-cloud communication protocols to be dynamically loaded and managed as plug-ins for flexible use by various application software in the vehicle, thereby improving the flexibility of the communication system; but also solves the customization problem of different communication protocols by designing a unified interface. If a new vehicle-to-cloud communication protocol is added, it can be pre-encapsulated into such a package. Figure 3 The communication components shown can be loaded once during plugin initialization, improving adaptability. At the same time, the parsing logic of the vehicle-to-cloud communication protocol is separated from the code of various applications, reducing the coupling of the communication system, improving maintainability, and lowering maintenance costs. This ultimately enhances the effectiveness of vehicle-to-cloud communication and improves the riding experience for in-vehicle users.
[0117] In summary, this embodiment provides a vehicle-to-cloud communication method applied to a target vehicle equipped with a target application. Specifically, it includes: firstly, responding to a user's request to trigger a function of the target application, calling the sending interface of the interface layer in the communication component to send the function trigger request to the cloud server; wherein, the target application integrates a communication component; the communication component includes an interface layer and a framework layer; the interface layer provides the communication interface for the communication component; the framework layer contains N plugins encapsulated with vehicle-to-cloud communication protocols; then, the function parameter information returned by the cloud server is sent to the framework layer through the sending interface of the interface layer; next, through the protocol routing of the framework layer, based on the function parameter information, the plugin encapsulated with the target vehicle-to-cloud communication protocol is called from among the N plugins encapsulated with vehicle-to-cloud communication protocols to communicate with the cloud server via the target vehicle-to-cloud communication protocol, obtaining the function data information returned by the cloud server; finally, the function requested by the user is implemented in the target application using the function data information returned by the cloud server.
[0118] As can be seen, this application, when responding to user requests for function triggering of the target application, no longer uses only a single fixed communication protocol for vehicle-to-cloud communication. Instead, it dynamically loads and calls the most suitable protocol plugin from various vehicle-to-cloud communication protocol encapsulation plugins included in the communication component to communicate with the cloud server. This not only improves the flexibility and scalability of application communication but also decouples the communication protocol parsing logic from the application business logic, reducing the complexity of protocol maintenance. Furthermore, the plug-in encapsulation approach supports communication protocol customization and rapid integration, improving protocol adaptability. Ultimately, this enhances the communication effect between the target vehicle equipped with the target application and the cloud server, thereby improving the user's riding experience.
[0119] Second Embodiment
[0120] This embodiment will introduce the process of another vehicle-to-cloud communication method. The specific implementation process may include the following steps (1)-(4):
[0121] Step (1): In response to the user's request to trigger a function for the target application, call the sending interface of the interface layer in the communication component to send the function trigger request to the cloud server.
[0122] In this embodiment, when a vehicle user makes a function trigger request for a target application via voice or manual trigger (such as "finger tap"), for example, when a user opens a video playback application page and clicks to play a video clip, in response to the user's function trigger request for the target application, the sending interface of the interface layer in the communication component (such as...) can be called. Figure 3The “send()” interface shown in the middle interface layer sends the function trigger request (such as a request to play a video clip) to the cloud server to obtain the function parameter information returned by the cloud server, which is used to execute the subsequent steps (2).
[0123] Step (2): Send the functional parameter information returned by the cloud server to the framework layer through the sending interface of the interface layer.
[0124] In this embodiment, in response to the user's request to trigger a function for the target application in step (1), the sending interface of the interface layer in the communication component is called to send the function trigger request to the cloud server. After obtaining the function parameter information returned by the cloud server (such as "HTTP, video parameters" and other video parameter information returned by the cloud server), it can further send the function through the sending interface of the interface layer (such as... Figure 3 The “send()” interface shown in the middle interface layer sends the function parameter information returned by the cloud server (such as “HTTP, video parameters” and other video parameter information returned by the cloud server) and the function trigger request to the “send()” in the framework layer for parsing and processing of the function parameter information. The specific processing method is not limited.
[0125] Specifically, in order to ensure the security of data transmission, when parsing and processing the functional parameter information, the functional parameter information returned by the cloud server can be security verified. For example, it can be verified whether there are any non-compliant characters in the functional parameter information returned by the cloud server, or whether there is any content that may cause an attack. If the verification fails, no further processing will be carried out, and the user can be returned with the corresponding prompt information, such as "No playable information found". Conversely, if the verification passes, the content of the functional parameter information returned by the cloud server that has passed the verification (such as "HTTP, video parameters") and the function trigger request (such as the user's request to play a video clip through a video playback application) can be sent to the protocol route in the framework layer to execute the subsequent steps (3).
[0126] Step (3): Through the protocol routing of the framework layer, based on the functional parameter information, call the target vehicle cloud communication protocol encapsulated plugin from among the N vehicle cloud communication protocol encapsulated plugins, so as to communicate with the cloud server through the target vehicle cloud communication protocol and obtain the functional data information returned by the cloud server.
[0127] In this embodiment, after sending the verified functional parameter information and functional trigger request to the protocol route in the framework layer through step (2), the protocol route can further determine which vehicle-to-cloud communication protocol to use as the target communication protocol based on the functional parameter information. Then, the plugin encapsulated by the target vehicle-to-cloud communication protocol is called from among the N plugins encapsulated by the target vehicle-to-cloud communication protocol to respond to the user's request. The plugin encapsulates the target vehicle-to-cloud communication protocol (such as HTTP protocol) corresponding to the target vehicle-to-cloud communication protocol to communicate with the cloud server, obtain the functional data information returned by the cloud server, and return this functional data information layer by layer to the business end of the target application through the protocol route to execute the subsequent step (4).
[0128] Step (4): Use the functional data information returned by the cloud server to implement the user's requested function in the target application.
[0129] In this embodiment, after obtaining the functional data information returned by the cloud server and the verification result of the verification through step (3), the functional data information returned by the cloud server can be used to realize the function of the user's request to trigger the target application (such as the video data returned by the cloud server can indeed realize the function of the user wanting to play a video clip on the video playback software (example of the target application)).
[0130] Third Embodiment
[0131] This embodiment will introduce the process of another vehicle-to-cloud communication method. The specific implementation process may include the following steps ①-④:
[0132] Step 1: In response to the user's request to trigger a function for the target application, call the sending interface in the interface layer of the communication component to send the function trigger request to the cloud server.
[0133] In this embodiment, when a vehicle user makes a function trigger request for a target application via voice or manual trigger (such as "finger tap"), for example, when a user opens a video playback application page and clicks to play a movie, in response to the user's function trigger request for the target application, the sending interface of the interface layer in the communication component (such as...) can be called. Figure 3 The “send()” interface shown in the middle interface layer sends the function trigger request (such as a request to play a movie) to the cloud server to obtain the function parameter information returned by the cloud server, which is used to execute the subsequent step ②.
[0134] Step 2: Send the functional parameter information returned by the cloud server to the framework layer through the sending interface of the interface layer.
[0135] In this embodiment, in step ①, in response to the user's request to trigger a function for the target application, the sending interface of the interface layer in the communication component is called to send the function trigger request to the cloud server. After obtaining the function parameter information returned by the cloud server (such as "HTTP, video parameters" or other video parameter information returned by the cloud server), it can further send the request through the sending interface of the interface layer (such as... Figure 3 The “send()” interface shown in the middle interface layer sends the function parameter information returned by the cloud server (such as “HTTP, video parameters” and other video parameter information returned by the cloud server) and the function trigger request to the “send()” in the framework layer for parsing and processing of the function parameter information. The specific processing method is not limited.
[0136] Specifically, to ensure the security of data transmission, when parsing and processing functional parameter information, security verification can be performed on the functional parameter information returned by the cloud server. For example, it can be verified whether there are any non-compliant characters or content that may cause attacks. If the verification fails, no further processing is performed, and the user can be returned with a corresponding prompt message, such as "No playable movie information found". Conversely, if the verification passes, the verified functional parameter information returned by the cloud server (such as "HTTP, video parameters") and the function trigger request (such as a user's request to play a movie through a video playback application) can be sent to the protocol route in the framework layer to execute subsequent steps ③.
[0137] Step 3: Through the protocol routing of the framework layer, based on the functional parameter information, call the target vehicle cloud communication protocol encapsulated plugin from among the N vehicle cloud communication protocol encapsulated plugins, so as to communicate with the cloud server through the target vehicle cloud communication protocol and obtain the functional data information returned by the cloud server.
[0138] In this embodiment, after sending the verified functional parameter information (such as "HTTP, video parameters") and the function trigger request (such as a user's request to play a movie through a video playback application) to the protocol route in the framework layer in step ②, the protocol route can further determine which vehicle-to-cloud communication protocol to use as the target communication protocol based on the functional parameter information. Then, the plugin encapsulated by the target vehicle-to-cloud communication protocol is called from among the N plugins encapsulated by the target vehicle-to-cloud communication protocol to respond to the user's request. The plugin communicates with the cloud server through the target vehicle-to-cloud communication protocol (such as HTTP) corresponding to the plugin encapsulated by the target vehicle-to-cloud communication protocol to obtain the functional data information returned by the cloud server. This functional data information is then returned layer by layer to the business side of the target application through the protocol route to execute the subsequent step ④.
[0139] Step 4: Use the functional data returned by the cloud server to implement the user-requested functions in the target application.
[0140] In this embodiment, after obtaining the functional data information returned by the cloud server and the verification result through step ③, to further ensure communication security, an optional implementation method is to perform security verification and result verification on the functional data information returned by the cloud server before returning it to the business side of the target application, and obtain the verification result. The specific verification method is not limited, but the main purpose is to prevent data that does not meet expectations from being returned to the business side of the target application, thus affecting the user experience.
[0141] Then, based on the obtained verification results, it can be determined whether the functional data information returned by the cloud server meets the conditions, and the specific content of the conditions is not limited. For example, it can be that the functional data information returned by the cloud server can realize the function that the user previously requested to trigger the target application (such as the video data returned by the cloud server can indeed realize the function that the user wants to play a movie on the video playback software (example of the target application)).
[0142] Specifically, if the functional data returned by the cloud server meets the requirements, it can be used to implement the user's requested function in the target application, such as playing the movie the user wants to watch on a video playback software (example of the target application). Conversely, if the cloud server's functional data does not meet the requirements (e.g., the data returned is not the specific data required for the user's requested function, such as the playback address, playback format, metadata information of the video clip, user permissions, etc.), then a message indicating that the user's requested function cannot be implemented can be displayed in the target application. For example, the video playback application (example of the target application) could display the text "Sorry, no content related to movie xx was found." This improves the user experience.
[0143] Fourth embodiment
[0144] This embodiment will introduce a vehicle-to-cloud communication device; please refer to the above method embodiment for related content.
[0145] See Figure 4 This is a schematic diagram of the composition of a vehicle-to-cloud communication device provided in this embodiment. The device 400 includes:
[0146] Calling unit 401 is used to respond to a user's function triggering request for the target application by calling the sending interface of the interface layer in the communication component to send the function triggering request to the cloud server; the target application integrates the communication component; the communication component includes the interface layer and the framework layer; the interface layer is used to provide the communication interface of the communication component; the framework layer contains N plug-ins encapsulated with the vehicle-cloud communication protocol; N is a positive integer greater than 0;
[0147] Sending unit 402 is used to send the functional parameter information returned by the cloud server to the framework layer through the sending interface of the interface layer;
[0148] The communication unit 403 is used to call the target vehicle cloud communication protocol encapsulated plugin from the N vehicle cloud communication protocol encapsulated plugins according to the functional parameter information through the protocol routing of the framework layer, so as to communicate with the cloud server through the target vehicle cloud communication protocol and obtain the functional data information returned by the cloud server.
[0149] The implementation unit 404 is used to implement the function requested by the user in the target application using the functional data information returned by the cloud server.
[0150] In one possible implementation, the device further includes:
[0151] An encapsulation unit is used to acquire N vehicle-to-cloud communication protocols; to encapsulate the N vehicle-to-cloud communication protocols into plug-in modules, and to save the N vehicle-to-cloud communication protocol encapsulated plug-ins to the framework layer of the communication component.
[0152] The determining unit is configured to initialize the framework layer of the communication component when the target application starts, and determine the target vehicle-to-cloud communication protocol adopted by the target application; the target vehicle-to-cloud communication protocol is at least one of the N vehicle-to-cloud communication protocols.
[0153] The registration unit is used to register the plug-in encapsulated by the target vehicle-to-cloud communication protocol in the framework layer of the communication component.
[0154] The generation unit is used to load the plugin encapsulated in the target vehicle-to-cloud communication protocol after the plugin registration is completed, generate a protocol route, and save the protocol route in the framework layer.
[0155] In one possible implementation, the registration unit includes:
[0156] A filtering subunit is used to filter out the target vehicle-cloud communication protocol encapsulation plugin from the N vehicle-cloud communication protocol encapsulation plugins in the framework layer of the communication component.
[0157] The loading subunit is used to load and initialize the plugin encapsulated in the target vehicle-to-cloud communication protocol, and after the loading and initialization are completed, generate a routing table and protocol routes, and save the processed plugin into the memory of the target application.
[0158] In one implementation of this embodiment, the loading subunit is specifically used for:
[0159] The plugin encapsulating the target vehicle-cloud communication protocol is bound to the address and local port number of the cloud server; and certificate verification and identity authentication are performed through the connection established between the plugin encapsulating the target vehicle-cloud communication protocol and the cloud server.
[0160] In one implementation of this embodiment, the apparatus further includes:
[0161] The first verification unit is used to perform security verification on the functional parameter information returned by the cloud server; and send the verified functional parameter information to the protocol router.
[0162] In one implementation of this embodiment, the apparatus further includes:
[0163] The second verification unit is used to perform security verification and result verification on the functional data information returned by the cloud server, and obtain the verification result.
[0164] The judgment unit is used to determine whether the functional data information returned by the cloud server meets the conditions based on the verification result.
[0165] The implementation unit is specifically used for:
[0166] If the functional data information meets the conditions, the function requested by the user is implemented in the target application using the functional data information returned by the cloud server.
[0167] In one implementation of this embodiment, the apparatus further includes:
[0168] The display unit is used to display a prompt message in the target application indicating that the function requested by the user cannot be implemented if it is determined that the functional data information returned by the cloud server does not meet the conditions.
[0169] Furthermore, embodiments of this application also provide a vehicle-to-cloud communication device, including: a processor, a memory, and a system bus;
[0170] The processor and the memory are connected via the system bus;
[0171] The memory is used to store one or more programs, the one or more programs including instructions, which, when executed by the processor, cause the processor to perform any of the above-described vehicle-to-cloud communication methods.
[0172] refer to Figure 5 The diagram illustrates a structural schematic suitable for implementing the vehicle-to-cloud communication device in the embodiments of this application. The vehicle-to-cloud communication device in the embodiments of this application may include, but is not limited to, fixed terminals such as mobile phones, laptops, PDAs (personal digital assistants), PADs (tablet computers), desktop computers, etc. Figure 5 The vehicle-to-cloud communication device shown is merely an example of an electronic device and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0173] like Figure 5 As shown, the vehicle-to-cloud communication device may include a processor (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. When the vehicle-to-cloud communication device is powered on, the RAM 503 also stores various programs and data required for device operation. The processor 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0174] Typically, the following devices can be connected to I / O interface 505: input devices 506 including, for example, a touchscreen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 507 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 508 including, for example, memory card, hard disk, etc.; and communication devices 509. Communication device 509 allows the electronic device to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 5 A vehicle-to-cloud communication device with various devices is shown; however, it should be understood that implementation or possession of all the devices shown is not required. More or fewer devices may be implemented alternatively.
[0175] Furthermore, embodiments of this application also provide a computer-readable storage medium storing instructions that, when executed on a terminal device, cause the terminal device to perform any of the above-described vehicle-to-cloud communication methods.
[0176] Furthermore, this application embodiment also provides a computer program product, which, when run on a terminal device, causes the terminal device to execute any of the above-described vehicle-to-cloud communication methods.
[0177] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that all or part of the steps in the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, a server, or a network communication device such as a media gateway, etc.) to execute the methods described in various embodiments or some parts of the embodiments of this application.
[0178] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0179] It should also be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0180] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A vehicle-to-cloud communication method, characterized in that, The method is applied to a target vehicle, wherein the target vehicle is equipped with the target application, and the method includes: In response to a user's request to trigger a function for the target application, the sending interface of the interface layer in the communication component is invoked to send the function trigger request to the cloud server; the target application integrates the communication component; the communication component includes the interface layer and the framework layer; the interface layer is used to provide the communication interface of the communication component; the framework layer contains N plug-ins encapsulating the vehicle-cloud communication protocol; N is a positive integer greater than 0; The functional parameter information returned by the cloud server is sent to the framework layer through the sending interface of the interface layer; Through the protocol routing of the framework layer, based on the functional parameter information, the plugin encapsulated by the target vehicle-cloud communication protocol is called from the plugins encapsulated by the N vehicle-cloud communication protocols, so as to communicate with the cloud server through the target vehicle-cloud communication protocol and obtain the functional data information returned by the cloud server. The user-requested function is implemented in the target application using the functional data information returned by the cloud server.
2. The method according to claim 1, characterized in that, Before invoking the sending interface of the interface layer to send the function trigger request to the cloud server in response to a user's function trigger request for the target application, the method further includes: Obtain N vehicle-to-cloud communication protocols; encapsulate the N vehicle-to-cloud communication protocols into plug-in modules to obtain N plug-in modules of vehicle-to-cloud communication protocols and save them to the framework layer of the communication component; When the target application starts, the framework layer of the communication component is initialized, and the target vehicle-to-cloud communication protocol adopted by the target application is determined; the target vehicle-to-cloud communication protocol is at least one of the N vehicle-to-cloud communication protocols. In the framework layer of the communication component, the plugin encapsulated in the target vehicle-to-cloud communication protocol is registered; After the plugin encapsulating the target vehicle-to-cloud communication protocol is registered, the plugin is loaded to generate a protocol route; and the protocol route is stored in the framework layer.
3. The method according to claim 2, characterized in that, The registration of the plugin encapsulated in the target vehicle-to-cloud communication protocol within the framework layer of the communication component includes: In the framework layer of the communication component, the target vehicle-cloud communication protocol encapsulation plugin is selected from the N vehicle-cloud communication protocol encapsulation plugins; The plugin encapsulated by the target vehicle-to-cloud communication protocol is loaded and initialized. After the loading and initialization are completed, a routing table and protocol routes are generated, and the processed plugin is saved to the memory of the target application.
4. The method according to claim 3, characterized in that, The loading and initialization process of the plugin encapsulated in the target vehicle-to-cloud communication protocol includes: The plugin encapsulating the target vehicle-cloud communication protocol is bound to the address and local port number of the cloud server; and certificate verification and identity authentication are performed through the connection established between the plugin encapsulating the target vehicle-cloud communication protocol and the cloud server.
5. The method according to any one of claims 1-4, characterized in that, After the function parameter information returned by the cloud server is sent to the framework layer through the sending interface of the interface layer, the method further includes: The function parameter information returned by the cloud server is subjected to security verification; and the function parameter information that passes the verification is sent to the protocol route.
6. The method according to any one of claims 1-5, characterized in that, After obtaining the functional data information returned by the cloud server, the method further includes: The functional data information returned by the cloud server is subjected to security verification and result verification to obtain the verification result; Based on the verification result, determine whether the functional data information returned by the cloud server meets the conditions; The step of implementing the user-requested function in the target application using the functional data information returned by the cloud server includes: If the functional data information meets the conditions, the function requested by the user is implemented in the target application using the functional data information returned by the cloud server.
7. The method according to claim 6, characterized in that, After determining whether the functional data information returned by the cloud server meets the conditions based on the verification result, the method further includes: If the functional data information does not meet the conditions, a prompt message indicating that the user's requested function cannot be implemented will be displayed in the target application.
8. A vehicle-to-cloud communication device, characterized in that, Applied to a target vehicle, wherein the target vehicle is equipped with the target application, the device includes: The invocation unit is used to respond to a user's function triggering request for the target application by invoking the sending interface of the interface layer in the communication component to send the function triggering request to the cloud server; the target application integrates the communication component; the communication component includes the interface layer and the framework layer; the interface layer is used to provide the communication interface of the communication component; the framework layer contains N plug-ins encapsulated with the vehicle-cloud communication protocol; N is a positive integer greater than 0; The sending unit is used to send the functional parameter information returned by the cloud server to the framework layer through the sending interface of the interface layer; The communication unit is used to call the target vehicle cloud communication protocol encapsulated plugin from the N vehicle cloud communication protocol encapsulated plugins according to the functional parameter information through the protocol routing of the framework layer, so as to communicate with the cloud server through the target vehicle cloud communication protocol and obtain the functional data information returned by the cloud server. The implementation unit is used to implement the user-requested function in the target application using the functional data information returned by the cloud server.
9. A vehicle-to-cloud communication device, characterized in that, include: Processor, memory, system bus; The processor and the memory are connected via the system bus; The memory is used to store one or more programs, the one or more programs including instructions that, when executed by the processor, cause the processor to perform the method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed on a terminal device, cause the terminal device to perform the method described in any one of claims 1-7.
