Access method and device of vehicle-mounted equipment, storage medium and electronic device
By detecting the communication interface and installing protocol files in the vehicle's operating system, the problems of long development cycles, high OTA upgrade costs, and poor compatibility for in-vehicle equipment access have been solved, enabling rapid access and remote upgrades and improving the development efficiency and compatibility of in-vehicle equipment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHONGQING CHANGAN AUTOMOBILE CO LTD
- Filing Date
- 2026-05-28
- Publication Date
- 2026-07-10
Smart Images

Figure CN122372422A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of vehicle technology, and more specifically, to a method and apparatus for accessing in-vehicle equipment, a storage medium, and an electronic device. Background Technology
[0002] In related technologies, with the development of automotive intelligence, an increasing number of third-party in-vehicle devices (such as car refrigerators, dashcams, and child seats) need to be integrated into the vehicle's system. In existing in-vehicle application development, application upgrades typically rely on over-the-air (OTA) updates for the entire vehicle or version updates from app stores. OTA updates require updating the entire vehicle software system, a complex and time-consuming process that can impact normal vehicle use. App store updates require users to manually download and install the new version, which is inconvenient and cannot achieve seamless updates. Furthermore, traditional in-vehicle application development often employs a single technical framework, requiring developers to develop according to the specific requirements of the in-vehicle operating system. This limits the range of technical options available to developers and increases development costs.
[0003] Current in-vehicle device access methods suffer from the following problems: Long vehicle-side customized development cycle: Accessing a new device requires modifying the underlying code of the in-vehicle system, involving multiple stages such as hardware adaptation, driver development, and system integration. The development cycle typically takes several months or even longer. High OTA upgrade cost: Each new device or function upgrade requires the OEM to create and push a complete OTA package. The upgrade package is large, testing and verification are complex, and it may affect the stability of other functions. Poor compatibility: Different brands and models of in-vehicle devices have significantly different interface protocols, requiring the vehicle-side to develop a separate adaptation layer for each device, resulting in high maintenance costs.
[0004] No efficient and accurate solution has yet been found to address the aforementioned issues in the relevant technologies. Summary of the Invention
[0005] This invention provides a method and apparatus for accessing vehicle-mounted devices, a storage medium, and electronic devices to solve technical problems in related technologies.
[0006] According to an embodiment of the present invention, a method for accessing an in-vehicle device is provided, comprising: detecting a newly accessed external in-vehicle device through the communication interface of the in-vehicle operating system of a target vehicle; reading device information of the external in-vehicle device; obtaining an application protocol file of the external in-vehicle device based on the device information; and installing a micro-application of the external in-vehicle device in a micro-application container of the in-vehicle operating system using the application protocol file.
[0007] Optionally, obtaining the application protocol file of the external vehicle device based on the device information includes: determining whether the external vehicle device is a standard protocol device based on the device information; if the external vehicle device is a standard protocol device, obtaining the object model protocol file of the external vehicle device from the object model list of the vehicle operating system; if the external vehicle device is not a standard protocol device, obtaining the plug-in protocol file of the external vehicle device.
[0008] Optionally, obtaining the plug-in protocol file of the external vehicle device includes: reading device identification information from the device information; sending the device identification information to a cloud server, wherein the target vehicle is communicatively connected to the cloud server; and receiving the plug-in protocol file issued by the cloud server after performing security authentication on the external vehicle device based on the device identification information.
[0009] Optionally, if the application protocol file is a plugin protocol file, installing the micro-application of the external vehicle device in the micro-application container of the vehicle operating system using the application protocol file includes: obtaining the plugin installation package of the external vehicle device based on the plugin protocol file; extracting the signature information of the plugin installation package and verifying the plugin installation package based on the signature information; if the verification is successful, decompressing the plugin installation package to obtain a device description file and an Android application package (APK) file; loading the APK file in the plugin container of the vehicle operating system, registering the plugin information in the device description file to the device registry of the vehicle operating system, and assigning a unique identifier.
[0010] Optionally, loading the APK file into the plug-in container of the vehicle operating system includes: using the vehicle operating system as the host APP; controlling the plug-in loading engine in the host APP to create an independent class loader; using the class loader to load plug-in data in the APK file, wherein the plug-in data includes classes and resources; instantiating the device plug-in of the plug-in data through reflection and calling the initialization method; and establishing a communication channel between the device plug-in and the external vehicle device through an Interface Definition Language (IDL) to complete the loading of the APK file.
[0011] Optionally, obtaining the application protocol file of the external vehicle device based on the device information includes: obtaining the physical button information and vehicle communication mode of the external vehicle device based on the device information; finding the basic control model of the physical button information; obtaining the vehicle information of the target vehicle and the user information of the registered users of the target vehicle; finding the personalized parameters of the external vehicle device based on the vehicle information and the user information, wherein the micro-application includes the basic control model and the personalized parameters; finding the micro-application version information matching the personalized parameters; obtaining routing information based on the vehicle communication mode; and obtaining the micro-application version information and the corresponding micro-application package download link based on the basic control model and the personalized parameters, wherein the application protocol file includes: the routing information, the micro-application version information, and the micro-application package download link.
[0012] Optionally, installing the micro-application of the external vehicle device in the micro-application container of the vehicle operating system using the application protocol file includes: reading the micro-application version information in the application protocol file, wherein the application protocol file includes: routing information, the micro-application version information, and a micro-application package download link; determining whether an offline installation package exists locally on the vehicle operating system based on the micro-application version information; if an offline installation package exists locally on the vehicle operating system, installing the micro-application of the external vehicle device in the micro-application container using the offline installation package and the routing information; if an offline installation package does not exist locally on the vehicle operating system, downloading an online installation package from the cloud according to the micro-application package download link, and installing the micro-application of the external vehicle device in the micro-application container using the online installation package and the routing information.
[0013] According to another embodiment of the present invention, an access device for an in-vehicle device is provided, comprising: a detection module for detecting newly accessed external in-vehicle devices through the communication interface of the in-vehicle operating system of a target vehicle; a reading module for reading device information of the external in-vehicle device; an acquisition module for acquiring an application protocol file of the external in-vehicle device based on the device information; and an installation module for installing the micro-application of the external in-vehicle device in a micro-application container of the in-vehicle operating system using the application protocol file.
[0014] Optionally, the acquisition module includes: a judgment unit, used to judge whether the external vehicle device is a standard protocol device based on the device information; and an acquisition unit, used to acquire the object model protocol file of the external vehicle device from the object model list of the vehicle operating system if the external vehicle device is a standard protocol device; and to acquire the plug-in protocol file of the external vehicle device if the external vehicle device is not a standard protocol device.
[0015] Optionally, the acquisition unit includes: a reading subunit for reading device identification information from the device information; a sending subunit for sending the device identification information to a cloud server, wherein the target vehicle is communicatively connected to the cloud server; and a receiving subunit for receiving a plug-in protocol file issued by the cloud server after performing security authentication on the external vehicle device based on the device identification information.
[0016] Optionally, if the application protocol file is a plugin protocol file, the installation module includes: an acquisition unit, used to acquire the plugin installation package of the external vehicle device based on the plugin protocol file; a verification unit, used to extract the signature information of the plugin installation package and verify the plugin installation package based on the signature information; a decompression unit, used to decompress the plugin installation package if the verification is successful, to obtain a device description file and an Android application package (APK) file; and a loading unit, used to load the APK file into the plugin container of the vehicle operating system, register the plugin information in the device description file to the device registry of the vehicle operating system, and assign a unique identifier.
[0017] Optionally, the loading unit includes: a creation subunit, used to control the plugin loading engine in the host APP to create an independent class loader, with the vehicle operating system as the host APP; a loading subunit, used to load plugin data in the APK file using the class loader, wherein the plugin data includes classes and resources; a processing subunit, used to instantiate the device plugin of the plugin data through reflection and call the initialization method; and an establishment subunit, used to establish a communication channel between the device plugin and the external vehicle device through an interface definition language (IDL) to complete the loading of the APK file.
[0018] Optionally, the acquisition module includes: a first acquisition unit, used to acquire the physical button information and vehicle communication mode of the external vehicle device according to the device information; a first search unit, used to search for the basic control model of the physical button information; a second acquisition unit, used to acquire the vehicle information of the target vehicle and the user information of the registered user of the target vehicle; a second search unit, used to search for the personalized parameters of the external vehicle device according to the vehicle information and the user information, wherein the micro-application includes the basic control model and the personalized parameters; a third search unit, used to search for the micro-application version information matching the personalized parameters; and a third acquisition unit, used to acquire routing information according to the vehicle communication mode, and acquire the micro-application version information and the corresponding micro-application package download link according to the basic control model and the personalized parameters, wherein the application protocol file includes: the routing information, the micro-application version information, and the micro-application package download link.
[0019] Optionally, the installation module includes: a reading unit for reading the micro-application version information in the application protocol file, wherein the application protocol file includes: routing information, the micro-application version information, and a micro-application package download link; a judging unit for judging whether an offline installation package exists locally on the vehicle operating system based on the micro-application version information; and an installation unit for installing the micro-application of the external vehicle device in the micro-application container if an offline installation package exists locally on the vehicle operating system, using the offline installation package and the routing information; and if an offline installation package does not exist locally on the vehicle operating system, downloading an online installation package from the cloud according to the micro-application package download link, and installing the micro-application of the external vehicle device in the micro-application container using the online installation package and the routing information.
[0020] According to another aspect of the embodiments of this application, a storage medium is also provided, the storage medium including a stored program that executes the above steps when the program is run.
[0021] According to another aspect of the embodiments of this application, an electronic device is also provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; wherein: the memory is used to store computer programs; and the processor is used to execute the steps in the above method by running the programs stored in the memory.
[0022] This application also provides a computer program product containing instructions that, when run on a computer, cause the computer to perform the steps in the above-described method.
[0023] The beneficial effects of this invention are: 1. Provides a system and method for dynamic adaptation and OTA upgrade of vehicle devices based on Android plug-in architecture, which solves the problems of long development cycle, high cost of OTA upgrade, poor compatibility and limited scalability of traditional vehicle devices, and realizes rapid access, adaptation and remote upgrade of vehicle devices; 2. The micro-application container supports multiple development frameworks such as React Native, H5, and mini-programs, and realizes the hot update function of micro-applications to solve the pain point of difficult upgrades mentioned above. It also allows developers to choose the development framework of object model or plugins according to their own technology stack for micro-application development, thereby improving development efficiency and reducing development costs. Attached Figure Description
[0024] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings: Figure 1 This is a hardware structure block diagram of a vehicle according to an embodiment of the present invention; Figure 2 This is a flowchart of a method for accessing an in-vehicle device according to an embodiment of the present invention; Figure 3 This is an overall architecture diagram of the vehicle-machine object model framework in an embodiment of the present invention; Figure 4 This is an architecture diagram of the plug-in service in an embodiment of the present invention; Figure 5 This is a flowchart illustrating the loading process of the micro-application according to an embodiment of the present invention; Figure 6 This is a structural block diagram of an access device for an in-vehicle device according to an embodiment of the present invention. Detailed Implementation
[0025] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, and not all of them. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present application. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of the present application can be combined with each other.
[0026] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0027] Example 1 The method embodiment provided in Embodiment 1 of this application can be executed in a vehicle, vehicle controller, processor, computer, or similar processing device. Taking its operation in a vehicle as an example, Figure 1 This is a hardware structure block diagram of a vehicle according to an embodiment of the present invention. For example... Figure 1 As shown, a vehicle may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. Optionally, the vehicle may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the vehicle described above. For example, the vehicle may also include components that are larger than... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0028] The memory 104 can be used to store vehicle programs, such as application software programs and modules, like the vehicle program corresponding to a vehicle in-vehicle device access method in an embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the vehicle program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the vehicle via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0029] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the vehicle's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0030] This embodiment provides a method for accessing vehicle-mounted devices. Figure 2 This is a flowchart of a method for accessing an in-vehicle device according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps: Step S201: Detect newly connected external vehicle-mounted devices through the communication interface of the target vehicle's in-vehicle operating system; In this embodiment, the vehicle's operating system is Android. Optionally, external in-vehicle devices can be such as car refrigerators, dashcams, child seats, etc. Newly connected external in-vehicle devices can be detected via communication interfaces such as CAN bus, 5G, and Bluetooth.
[0031] Step S202: Read the device information of the external vehicle-mounted device; Optional equipment information includes equipment manufacturer, equipment identifier, equipment model, equipment type, etc.
[0032] Step S203: Obtain the application protocol file of the external vehicle device based on the device information; Step S204: Install the micro-application of the external vehicle device in the micro-application container of the vehicle operating system using the application protocol file.
[0033] Through the above steps, newly connected external vehicle devices are detected through the communication interface of the target vehicle's in-vehicle operating system; the device information of the external vehicle devices is read; the application protocol file of the external vehicle devices is obtained based on the device information; and the micro-application of the external vehicle devices is installed in the micro-application container of the in-vehicle operating system using the application protocol file. This solves the technical problem in the prior art that the in-vehicle operating system needs to be upgraded via OTA to connect to new devices, realizes the rapid access, adaptation and remote upgrade of external vehicle devices, and improves the compatibility and scalability of the in-vehicle operating system.
[0034] In one embodiment of this example, obtaining the application protocol file of the external vehicle device based on the device information includes: determining whether the external vehicle device is a standard protocol device based on the device information; if the external vehicle device is a standard protocol device, obtaining the object model protocol file of the external vehicle device from the object model list of the vehicle operating system; if the external vehicle device is not a standard protocol device, obtaining the plug-in protocol file of the external vehicle device.
[0035] The micro-application container in this embodiment includes an object model service and a plugin management service. This micro-application container supports multiple development frameworks such as React Native, H5, and mini-programs, and realizes the hot update function of micro-applications to solve the pain point of difficult upgrades mentioned above. It also allows developers to choose the corresponding development framework for micro-application development according to their own technology stack, thereby improving development efficiency and reducing development costs.
[0036] The vehicle-mounted vehicle (V2V) device model service constructs a layered architecture framework, comprising the following core modules: Data Perception Layer: Unifies multi-source heterogeneous data interfaces (such as CAN bus, 5G, and Bluetooth), supporting device discovery and protocol parsing. Model Abstraction Layer: Defines standardized device profile templates, including device attributes (such as temperature and location), services (such as remote control), and events (such as fault alarms). Edge Computing Layer: Deploys a lightweight rule engine on the vehicle side to achieve localized data processing and decision-making (such as prioritizing emergency braking signals). Secure Communication Layer: A dynamic key negotiation mechanism based on national cryptographic algorithms, combined with blockchain technology to achieve data traceability. For example, the V2V system discovers the smart air conditioning device via Bluetooth, loads its device model (including temperature adjustment services), the edge computing layer triggers air conditioning adjustment commands based on in-vehicle temperature sensor data, and the secure communication layer signs the commands to ensure data integrity. Figure 3 This is an overall architecture diagram of the vehicle-machine object model framework in this embodiment of the invention, including a support module, a basic module, and an extension module. The support module has the functions of testing and verification, data storage, logging and monitoring. The basic module has the functions of object model definition, parser, service call engine and communication adapter. The extension module includes the functions of rule engine, security and authentication, edge computing support and multi-protocol adaptation.
[0037] In one example, obtaining the plug-in protocol file of the external vehicle device includes: reading device identification information from the device information; sending the device identification information to a cloud server, wherein the target vehicle is communicatively connected to the cloud server; and receiving the plug-in protocol file issued by the cloud server after performing security authentication on the external vehicle device based on the device identification information.
[0038] In one example, if the application protocol file is a plugin protocol file, installing the micro-application of the external vehicle device in the micro-application container of the vehicle's operating system using the application protocol file includes: obtaining the plugin installation package of the external vehicle device based on the plugin protocol file; extracting the signature information of the plugin installation package and verifying the plugin installation package based on the signature information; if the verification is successful, decompressing the plugin installation package to obtain a device description file and an Android application package (APK) file; loading the APK file in the plugin container of the vehicle's operating system, registering the plugin information in the device description file to the device registry of the vehicle's operating system, and assigning a unique identifier.
[0039] Optionally, loading the APK file into the plug-in container of the vehicle operating system includes: using the vehicle operating system as the host APP; controlling the plug-in loading engine in the host APP to create an independent class loader; using the class loader to load plug-in data in the APK file, wherein the plug-in data includes classes and resources; instantiating the device plug-in of the plug-in data through reflection and calling the initialization method; and establishing a communication channel between the device plug-in and the external vehicle device through an Interface Definition Language (IDL) to complete the loading of the APK file.
[0040] In a plug-in architecture, the host app loads plug-ins through Android's class loading mechanism. Each plug-in is an independent APK file. When loading a plug-in, the host app creates a custom ClassLoader to load the classes and resources within the plug-in. Simultaneously, an Interface Definition Language (IDL) defines the communication interface between the host app and the plug-in, ensuring that the host app can correctly call the plug-in's functionality, and that the plug-in can interact with the host app.
[0041] Figure 4 This is an architecture diagram of the plug-in service in this embodiment of the invention, including a plug-in kernel and plug-ins. The plug-in kernel has the functions of plug-in registration, plug-in discovery, plug-in scheduling and plug-in management. The plug-in management includes a class loader, a resource loader and four major component loaders. Plugins include bytecode files (.dex), resource files (.arsc), four major component files (.dex), native libraries (.so), and manifest.xml.
[0042] In this example, the device detection and plugin matching process includes: the device management center detects new device access via interfaces such as USB and Bluetooth; reads device identification information (such as manufacturer ID and device model) and sends it to the cloud service platform for security authentication; the cloud service platform matches the corresponding plugin based on the device information and pushes a download link.
[0043] The plugin download and installation process includes: the vehicle system downloads the plugin package and verifies the signature; the device plugin manager decompresses the plugin package and parses the device description file; the plugin information is registered to the device registry and a unique identifier is assigned.
[0044] The plugin loading and initialization process includes: the plugin loading engine creating an independent ClassLoader to load the plugin class; instantiating the device plugin through reflection and calling the initialization method; and the device plugin establishing a communication channel with the physical device through the hardware abstraction layer.
[0045] Device plugins register the supported functions and services with the device management center; upper-layer applications access device functions through a unified interface without needing to concern themselves with the underlying implementation details.
[0046] In one embodiment of this example, obtaining the application protocol file of the external vehicle device based on the device information includes: obtaining the physical button information and vehicle communication mode of the external vehicle device based on the device information; searching the basic control model of the physical button information; obtaining the vehicle information of the target vehicle and the user information of the registered users of the target vehicle; searching the personalized parameters of the external vehicle device based on the vehicle information and the user information, wherein the micro-application includes the basic control model and the personalized parameters; searching the micro-application version information matching the personalized parameters; obtaining routing information based on the vehicle communication mode; and obtaining the micro-application version information and the corresponding micro-application package download link based on the basic control model and the personalized parameters, wherein the application protocol file includes: the routing information, the micro-application version information, and the micro-application package download link.
[0047] The personalized parameters in this embodiment are configuration parameters that match vehicle information and user information. Taking an external vehicle device as a car refrigerator as an example, the basic control model includes function keys (such as power button, temperature rise, temperature fall, mode selection, etc.) corresponding to the physical buttons of the car refrigerator. Based on the cooling method and cooling capacity of the target vehicle, the temperature control range of the car refrigerator is determined. User information is used to configure the initial refrigeration temperature or the initial freezing temperature.
[0048] In one embodiment of this example, installing the micro-application of the external vehicle device in the micro-application container of the vehicle operating system using the application protocol file includes: reading the micro-application version information in the application protocol file, wherein the application protocol file includes: routing information, the micro-application version information, and a micro-application package download link; determining whether an offline installation package exists locally on the vehicle operating system based on the micro-application version information; if an offline installation package exists locally on the vehicle operating system, installing the micro-application of the external vehicle device in the micro-application container using the offline installation package and the routing information; if an offline installation package does not exist locally on the vehicle operating system, downloading an online installation package from the cloud according to the micro-application package download link, and installing the micro-application of the external vehicle device in the micro-application container using the online installation package and the routing information.
[0049] Figure 5 This is a flowchart of the loading process for a micro-application according to an embodiment of the present invention, including: Step 51, Vehicle system request: When the Device Manager App launches the application, it sends a request to the micro-application management backend carrying user information and vehicle information; Step 52, Backend parsing and push strategy formulation: The micro-application management backend parses the user information and vehicle information. Based on the user information and vehicle information, it retrieves the micro-application version information required by the application and performs personalized push. For example, different micro-applications are deployed according to different regions, or different versions of the application are pushed when the vehicle condition is poor (such as poor chassis condition). The micro-application management backend generates a protocol file containing routing information, micro-application version information, micro-application package download link, etc., and sends it to the application terminal. Step 53, Application terminal parsing and micro-application package processing: The application terminal parses the sent protocol file and checks whether the offline package of the micro-application exists locally based on the micro-application name. If the offline package of the micro-application does not exist locally, the corresponding micro-application package is retrieved according to the information in the protocol file. If the offline package of the micro-application exists locally, the version information of the offline package is compared with the version information in the protocol file. If the versions are the same, the micro-application in the offline package is rendered directly; if the versions are different, the micro-application package of the corresponding version in the protocol file is retrieved. Step 54, Micro-application rendering: Render the micro-application in the corresponding container according to different micro-application types.
[0050] This embodiment provides a system and method for dynamic adaptation and OTA upgrade of in-vehicle devices based on Android plug-in architecture. It addresses the problems of long development cycles, high OTA upgrade costs, poor compatibility, and limited scalability associated with traditional in-vehicle device access, enabling rapid access, adaptation, and remote upgrades of in-vehicle devices. The overall architecture comprises three parts: a micro-application container, a device model service, and a plug-in management service. The micro-application container enables dynamic updates at the application layer, decoupling from OTA and achieving seamless application upgrades, thus improving user experience. The device model service standardizes the device access process, addressing the pain point of requiring customized development for hardware devices. The plug-in management service, based on Android plug-in architecture, enables dynamic updates for some personalized devices even if they do not access according to the standard device model service, even if the in-vehicle system is customized for access.
[0051] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, 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 is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0052] Example 2 This embodiment also provides an access device for an in-vehicle device, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0053] Figure 6 This is a structural block diagram of an access device for an in-vehicle device according to an embodiment of the present invention, such as... Figure 6 As shown, the device includes: The detection module 61 is used to detect newly connected external vehicle-mounted devices through the communication interface of the vehicle's infotainment system. Reading module 62 is used to read the device information of the external vehicle-mounted device; The acquisition module 63 is used to acquire the application protocol file of the external vehicle device based on the device information; Installation module 64 is used to install the micro-application of the external vehicle device in the micro-application container of the vehicle operating system using the application protocol file.
[0054] Optionally, the acquisition module includes: a judgment unit, used to judge whether the external vehicle device is a standard protocol device based on the device information; and an acquisition unit, used to acquire the object model protocol file of the external vehicle device from the object model list of the vehicle operating system if the external vehicle device is a standard protocol device; and to acquire the plug-in protocol file of the external vehicle device if the external vehicle device is not a standard protocol device.
[0055] Optionally, the acquisition unit includes: a reading subunit for reading device identification information from the device information; a sending subunit for sending the device identification information to a cloud server, wherein the target vehicle is communicatively connected to the cloud server; and a receiving subunit for receiving a plug-in protocol file issued by the cloud server after performing security authentication on the external vehicle device based on the device identification information.
[0056] Optionally, if the application protocol file is a plugin protocol file, the installation module includes: an acquisition unit, used to acquire the plugin installation package of the external vehicle device based on the plugin protocol file; a verification unit, used to extract the signature information of the plugin installation package and verify the plugin installation package based on the signature information; a decompression unit, used to decompress the plugin installation package if the verification is successful, to obtain a device description file and an Android application package (APK) file; and a loading unit, used to load the APK file into the plugin container of the vehicle operating system, register the plugin information in the device description file to the device registry of the vehicle operating system, and assign a unique identifier.
[0057] Optionally, the loading unit includes: a creation subunit, used to control the plugin loading engine in the host APP to create an independent class loader, with the vehicle operating system as the host APP; a loading subunit, used to load plugin data in the APK file using the class loader, wherein the plugin data includes classes and resources; a processing subunit, used to instantiate the device plugin of the plugin data through reflection and call the initialization method; and an establishment subunit, used to establish a communication channel between the device plugin and the external vehicle device through an interface definition language (IDL) to complete the loading of the APK file.
[0058] Optionally, the acquisition module includes: a first acquisition unit, used to acquire the physical button information and vehicle communication mode of the external vehicle device according to the device information; a first search unit, used to search for the basic control model of the physical button information; a second acquisition unit, used to acquire the vehicle information of the target vehicle and the user information of the registered user of the target vehicle; a second search unit, used to search for the personalized parameters of the external vehicle device according to the vehicle information and the user information, wherein the micro-application includes the basic control model and the personalized parameters; a third search unit, used to search for the micro-application version information matching the personalized parameters; and a third acquisition unit, used to acquire routing information according to the vehicle communication mode, and acquire the micro-application version information and the corresponding micro-application package download link according to the basic control model and the personalized parameters, wherein the application protocol file includes: the routing information, the micro-application version information, and the micro-application package download link.
[0059] Optionally, the installation module includes: a reading unit for reading the micro-application version information in the application protocol file, wherein the application protocol file includes: routing information, the micro-application version information, and a micro-application package download link; a judging unit for judging whether an offline installation package exists locally on the vehicle operating system based on the micro-application version information; and an installation unit for installing the micro-application of the external vehicle device in the micro-application container if an offline installation package exists locally on the vehicle operating system, using the offline installation package and the routing information; and if an offline installation package does not exist locally on the vehicle operating system, downloading an online installation package from the cloud according to the micro-application package download link, and installing the micro-application of the external vehicle device in the micro-application container using the online installation package and the routing information.
[0060] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.
[0061] Example 3 Embodiments of the present invention also provide a storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments when running.
[0062] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps: S1 detects newly connected external vehicle devices through the communication interface of the target vehicle's in-vehicle operating system; S2, Read the device information of the external vehicle-mounted device; S3, Obtain the application protocol file of the external vehicle-mounted device based on the device information; S4, the micro-application of the external vehicle device is installed in the micro-application container of the vehicle operating system using the application protocol file.
[0063] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0064] Embodiments of the present invention also provide an electronic device including a memory and a processor, the memory storing a computer program and the processor being configured to run the computer program to perform the steps in any of the above method embodiments.
[0065] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0066] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program: S1 detects newly connected external vehicle devices through the communication interface of the target vehicle's in-vehicle operating system; S2, Read the device information of the external vehicle-mounted device; S3, Obtain the application protocol file of the external vehicle-mounted device based on the device information; S4, the micro-application of the external vehicle device is installed in the micro-application container of the vehicle operating system using the application protocol file.
[0067] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.
[0068] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0069] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented using software plus a general-purpose hardware platform, or of course, using hardware. Based on this understanding, the above technical solutions, in essence or the parts that contribute to the related technology, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable 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, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0070] It should be understood that the terminology used herein is for the purpose of describing particular exemplary embodiments only and is not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms “a,” “an,” and “described” as used herein may also include the plural forms. The terms “comprising,” “including,” “containing,” and “having” are inclusive and therefore indicate the presence of the stated features, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, elements, components, and / or combinations thereof. The method steps, processes, and operations described herein are not construed as requiring them to be performed in a particular order described or illustrated unless the order of performance is explicitly indicated. It should also be understood that additional or alternative steps may be used.
[0071] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the invention. 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 the invention. Therefore, the present invention 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 claimed herein.
Claims
1. A method for accessing an in-vehicle device, characterized in that, include: Newly connected external vehicle devices are detected through the communication interface of the target vehicle's in-vehicle operating system. Read the device information of the external vehicle-mounted device; Obtain the application protocol file of the external vehicle-mounted device based on the device information; The micro-application of the external vehicle device is installed in the micro-application container of the vehicle's operating system using the application protocol file.
2. The method according to claim 1, characterized in that, The application protocol file of the external vehicle-mounted device obtained based on the device information includes: Based on the device information, determine whether the external vehicle-mounted device is a standard protocol device; If the external vehicle device is a standard protocol device, the object model protocol file of the external vehicle device is obtained from the object model list of the vehicle operating system; if the external vehicle device is not a standard protocol device, the plug-in protocol file of the external vehicle device is obtained.
3. The method according to claim 2, characterized in that, Obtaining the plug-in protocol file of the external vehicle device includes: Read the device identification information from the device information; The device identification information is sent to a cloud server, wherein the target vehicle is communicatively connected to the cloud server; The system receives a plug-in protocol file from the cloud server after performing security authentication on the external vehicle device based on the device identification information.
4. The method according to claim 1, characterized in that, If the application protocol file is a plug-in protocol file, installing the micro-application of the external vehicle device in the micro-application container of the vehicle's operating system using the application protocol file includes: Obtain the plug-in installation package for the external vehicle device based on the plug-in protocol file; Extract the signature information of the plugin installation package, and verify the plugin installation package based on the signature information; If the verification is successful, the plugin installation package is decompressed to obtain the device description file and the Android application package APK file; The APK file is loaded into the plug-in container of the vehicle operating system, the plug-in information in the device description file is registered to the device registry of the vehicle operating system, and a unique identifier is assigned.
5. The method according to claim 4, characterized in that, Loading the APK file into the plug-in container of the vehicle's operating system includes: The in-vehicle operating system serves as the host APP; Control the plugin loading engine in the host APP to create an independent class loader; The class loader is used to load plugin data from the APK file, wherein the plugin data includes classes and resources; The device plugin for the plugin data is instantiated using reflection, and the initialization method is invoked. A communication channel is established between the device plugin and the external vehicle device using the Interface Definition Language (IDL) to load the APK file.
6. The method according to claim 1, characterized in that, The application protocol file of the external vehicle-mounted device obtained based on the device information includes: Based on the device information, obtain the physical button information and vehicle communication mode of the external vehicle device; The basic control model for locating the physical button information; Obtain the vehicle information of the target vehicle, and obtain the user information of the registered user of the target vehicle; The personalized parameters of the external vehicle device are retrieved based on the vehicle information and the user information, wherein the micro-application includes the basic control model and the personalized parameters; Find the micro-application version information that matches the personalized parameters; The routing information is obtained according to the vehicle communication mode, and the micro-application version information and the corresponding micro-application package download link are obtained according to the basic control model and the personalized parameters. The application protocol file includes the routing information, the micro-application version information, and the micro-application package download link.
7. The method according to claim 1, characterized in that, The micro-application for installing the external vehicle device in the micro-application container of the vehicle's operating system using the application protocol file includes: Read the micro-application version information from the application protocol file, wherein the application protocol file includes: routing information, the micro-application version information, and the micro-application package download link; Based on the micro-application version information, determine whether an offline installation package exists locally on the vehicle's operating system. If an offline installation package exists locally on the vehicle's operating system, the micro-application of the external vehicle device is installed in the micro-application container using the offline installation package and the routing information; if an offline installation package does not exist locally on the vehicle's operating system, an online installation package is downloaded from the cloud according to the micro-application package download link, and the micro-application of the external vehicle device is installed in the micro-application container using the online installation package and the routing information.
8. A device for accessing vehicle-mounted equipment, characterized in that, include: The detection module is used to detect newly connected external vehicle-mounted devices through the communication interface of the target vehicle's in-vehicle operating system. The reading module is used to read the device information of the external vehicle-mounted device; The acquisition module is used to acquire the application protocol file of the external vehicle device based on the device information; An installation module is used to install the micro-application of the external vehicle device in the micro-application container of the vehicle operating system using the application protocol file.
9. A storage medium, characterized in that, The storage medium stores a computer program, wherein the computer program is configured to execute the method described in any one of claims 1 to 7 when it is run.
10. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the method as described in any one of claims 1 to 7.