Method for automatically generating signal analysis in Vehile Hal

Through the automatic signal generation analysis method, the Vehicle Hal layer has solved the problem of large development volume and high error probability in the vehicle-mounted Android operating system, and has realized automated hosting, which improves development efficiency and code standardization.

CN119829214APending Publication Date: 2025-04-15ZHONGLING ZHIXING (CHENGDU) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411925623.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

In the on-board Android operating system, the Vehicle Hal layer needs to process a large amount of signal data type conversion and adaptation logic, resulting in large development volume and high probability of errors.

Method used

Through the automatic signal analysis method, the Vehicle Hal layer obtains the signal data of the external device, obtains the signal function correspondence table, automatically generates tables and ProtoBuf data types, and performs business logic processing through the application layer, and finally converts the processing results into ProtoBuf data types suitable for cross-system transmission.

Benefits of technology

Automatic mapping and generation of signal data definitions and business logic codes that need to be used and converted in the Vehicle Hal layer are realized, which reduces the need for developers to manually develop logic, improves development efficiency, reduces the probability of errors, and enhances the flexibility and standardization of the code.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119829214A_ABST
    Figure CN119829214A_ABST
Patent Text Reader

Abstract

The invention discloses a method for automatically generating a signal analysis in a Vehile Hal, the method is applied to an intelligent cockpit controller based on an Android operating system, the intelligent cockpit controller is connected with at least one external device of a non-Android operating system, the Android operating system comprises a Vehile Hal layer and an application layer, the Vehile Hal layer is connected with the external device, and the application layer is connected with the intelligent cockpit controller. The method comprises the following steps: acquiring signal data of the external equipment through the Vehile Hal layer, and performing data type conversion on the signal data to be used by the application layer: acquiring a signal function corresponding relation table which is obtained according to a demand document, a DBC file and a CAN signal table; automatically generating a table according to the signal function corresponding relation table, wherein the table comprises a PropertyValue data structure and a Vehile Hal table for an application layer to perform corresponding function comparison; the method comprises the following steps of: performing serialization processing on signal data to obtain a ProtoBuf data type, performing corresponding service logic processing on the signal data through an application layer, and sending a processing result to a Vehile Hal layer.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer resource management, and in particular to a method for automatically generating signal analysis in Vehicle Hal. Background Art

[0002] Android is an open-source mobile operating system developed by Google and has gradually become one of the most popular mobile operating systems in the world. It is based on the Linux kernel and provides a rich application framework and development tools that enable developers to create various types of applications and services, including mobile phones, tablets, smart watches, TVs and other smart devices. Our technology is mainly applicable to the Android operating system for vehicles. The biggest difference between the Android operating system for vehicles and the Android operating system for other devices is that it needs to be connected to various vehicle peripherals such as instruments, air conditioners, seats, etc. in the car, and a large amount of cross-system communication is required to realize data signal interaction.

[0003] The HAL (Hardware Abstraction Interface) layer in the Android source code framework mainly handles signal data and other services of external devices in the Android architecture, including external Camera, Bluetooth, Audio, body controller, etc., while the Vehicle Hal layer is the main module used to connect external vehicle peripherals across systems. In order to adapt to the use of data in the application layer in the Android system and the use of other peripheral data during cross-system data interaction, the Vehicle Hal layer needs to do a lot of data type conversion and adaptation logic.

[0004] Since the Vehicle Hal layer involves many external devices and business functions, and is the core module of the entire vehicle-mounted intelligent cockpit, the amount of signal data that needs to be adapted and converted is as many as thousands. In actual development, the amount of development required is often very large, and the probability of error increases with the increase in business volume and business complexity. The signal data types of different peripherals can often be integrated and converted into four categories in the Vehicle Hal, and the specific business types can also be encapsulated in the defined data structure. Summary of the invention

[0005] The object of the present invention is to provide a method for automatically generating signal analysis in Vehicle Hal, so as to realize automatic mapping and generation of signal data definition and business logic code required to be used and converted in the Vehicle Hal layer.

[0006] An embodiment of the present invention provides a method for automatically generating a signal analysis in a Vehicle Hal, the method being applied to an intelligent cockpit controller based on an Android operating system, the intelligent cockpit controller being connected to at least one external device that is not an Android operating system, the Android operating system including a Vehicle Hal layer and an application layer, the method comprising:

[0007] The signal data of the external device is obtained through the Vehicle Hal layer, and the data type of the signal data is converted for use by the application layer:

[0008] Obtain a signal function correspondence table, wherein the signal function correspondence table is obtained according to the requirement document, the DBC file and the CAN signal table;

[0009] Automatically generate a table according to the signal function correspondence table, the table including a Property Value data structure and a Vehicle Hal table for the application layer to perform corresponding function comparison;

[0010] Serializing the signal data to obtain a ProtoBuf data type;

[0011] The signal data is processed by the application layer with corresponding business logic, and the processing result is sent to the Vehicle Hal layer, so that the Vehicle Hal layer performs logic adaptation on the processing result and sends the processing result to the external device.

[0012] Further, the Vehicle Hal layer performs logic adaptation on the processing result and sends the processing result to the external device, including:

[0013] According to the pre-configured automation logic, the processing result is automatically converted into the ProtoBuf data type provided by Google through a conversion script, and the processing result of the ProtoBuf data type is sent to the external device.

[0014] Furthermore, the processing result is automatically converted into the ProtoBuf data type provided by Google through a conversion script according to the pre-configured automation logic, including:

[0015] Generate the types.hal file for the interface according to the Vehicle Hal table mapping.

[0016] Automatically generate DefaultConfig data according to the types.hal file, wherein the DefaultConfig data contains all signal data initial values, maximum values, minimum values, data types, prop ids, transmission types, and system types;

[0017] The processing result is serialized according to the DefaultConfig data, and converted into a ProtoBuf data type suitable for cross-system transmission through a conversion script.

[0018] Furthermore, the automatically generating a table according to the signal function correspondence table includes:

[0019] According to the signal function correspondence table, a parsing script is used to automatically generate a Property Value data structure corresponding to the signal functions and requirements in the table, as well as a Vehicle Hal table. The Property Value data structure includes prop id, vehicle prop id, area id, and value. The dependency of the Vehicle Hal table is the PropertyValue data structure.

[0020] Furthermore, before the processing result is serialized according to the DefaultConfig data and converted into a ProtoBuf data type suitable for cross-system transmission through a conversion script, the following steps are also included:

[0021] When the Vehicle Hal service is initialized, the DefaultConfig is dynamically loaded into the cache area of ​​the service.

[0022] The present invention has at least the following beneficial effects:

[0023] The present invention obtains the signal data of the external device through the Vehicle Hal layer, automatically generates the corresponding table through the script, and converts the signal data into the ProtoBuf data type used by the application layer. After the application layer performs corresponding business logic processing on the converted signal data, the processing result is sent to the Vehicle Hal layer. The Vehicle Hal layer then adaptively generates the ProtoBuf data type transmitted to the corresponding external device through the script according to the data type, signal type and transmission mode in the demand document, that is, the ProtoBuf data type transmitted across the system, and the external device parses the ProtoBuf data type transmitted across the system into the required signal data, thereby responding to the corresponding function and logic. The present invention can automatically generate the corresponding logic, without the need to develop the logic separately, realizes fully automated hosting, saves the development time consumed by the developer in the adaptation of the business function when developing the Vehicle Hal layer, improves the development efficiency of the developer, and at the same time, the present invention can flexibly select the demand code logic, effectively separate the demand stage and the development stage, ensure the isolation of the development process and the flexibility of code development, thereby strengthening the standardization of the business in the entire module and avoiding software vulnerabilities caused by human errors.

[0024] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 A flow chart of a method for automatically generating signal analysis in Vehicle Hal provided by the present invention;

[0026] Figure 2 A simplified diagram of the vehicle-mounted Android architecture provided by the present invention;

[0027] Figure 3 A schematic diagram of the data flow involved in the Vehicle Hal layer provided by the present invention;

[0028] Figure 4 A simplified diagram of data conversion involved in the Vehicle Hal layer provided by the present invention;

[0029] Figure 5 A schematic diagram of the automated signal data mapping script generation provided by the present invention. DETAILED DESCRIPTION

[0030] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.

[0031] In the description of the present invention, it is necessary to understand that the terms "upper", "lower", "front", "back", "left", "right", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship are based on the orientation or position relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.

[0032] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0033] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0034] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0035] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0036] Before introducing a method for automatically generating a signal analysis in a Vehicle Hal provided by an embodiment of the present disclosure, the application scenario of the present disclosure is first introduced. Figure 2, shows a schematic diagram of an in-vehicle Android architecture, including an APP application layer, a Framework layer and a hal hardware abstraction layer, wherein the hal hardware abstraction layer communicates with an external device through the Vehicle HAL layer to obtain external device data, and different external devices may have different operating systems, such as Linux, QNX, MCU and other operating systems in the figure. The Vehicle HAL layer transmits the acquired data to the android car layer in the Framework layer. The android car layer passes the data to the corresponding app application according to the needs of the in-vehicle application. The app application uses the data to perform corresponding business logic processing, and then passes the processing result or command to the android car layer in the Framework layer. The android car layer in the Framework layer passes the result or command to the VehicleHAL layer. Finally, the Vehicle HAL layer sends the result or command to the corresponding external device.

[0037] like Figure 3 and Figure 4 , shows a schematic diagram of data flow and data conversion in the above process, including the Vehicle HAL layer obtaining data from the external device through the Protocol stack, first converting the data into the protobuf data type, then converting it into the Property Value data structure, and then converting the Property Value data structure into data that the upper layer can recognize. After the upper layer processes the data, it transmits the processing result to the VehicleHAL layer as the data type. The Vehicle HAL layer then converts the data into the Property Value data structure, and then converts it into the Protobuf data type for external device recognition. The external device is then parsed by each module into the required signal signal data to respond to the corresponding functions and logic.

[0038] As mentioned in the background technology, the Vehicle Hal layer is the main module used to connect external vehicle peripherals across systems. In order to adapt to the use of data in the application layer of the Android system and the use of other peripheral data during cross-system data interaction, the Vehicle Hal layer needs to do a lot of data type conversion and adaptation logic, and the probability of error increases with the increase of business volume and business complexity.

[0039] In order to solve the above problems, an embodiment of the present disclosure provides a method for automatically generating signal analysis in Vehicle Hal, the method is applied to an intelligent cockpit controller based on an Android operating system, the intelligent cockpit controller is connected to at least one external device that is not an Android operating system, and the Android operating system includes a Vehicle Hal layer and an application layer, such as Figure 1 and Figure 5 As shown, the method includes:

[0040] S100, acquiring signal data of the external device through the Vehicle Hal layer, and performing data type conversion on the signal data for use by the application layer.

[0041] S101 . Obtain a signal function correspondence table, wherein the signal function correspondence table is obtained according to a requirement document, a DBC file and a CAN signal table.

[0042] First collect the requirements documents, DBC files and CAN signal tables provided by the manufacturer or customer (such as Figure 5 The CAN signal matrix table shown in the figure is then reorganized into a signal function correspondence table (as shown in the figure) according to the requirements. Figure 5 ).

[0043] S102: Automatically generate a table according to the signal function correspondence table, wherein the table includes a PropertyValue data structure and a Vehicle Hal table for the application layer to perform corresponding function comparison.

[0044] S103: Serialize the signal data to obtain a ProtoBuf data type.

[0045] S104, performing corresponding business logic processing on the signal data through the application layer, and sending the processing result to the Vehicle Hal layer, so that the Vehicle Hal layer performs logic adaptation on the processing result and sends the processing result to the external device.

[0046] By adopting the above scheme, the signal data of the external device is obtained through the Vehicle Hal layer, the corresponding table is automatically generated through the script, and the signal data is converted into the ProtoBuf data type used by the application layer. After the application layer performs corresponding business logic processing on the converted signal data, the processing result is sent to the Vehicle Hal layer. The Vehicle Hal layer then adaptively generates the ProtoBuf data type transmitted to the corresponding external device through the script according to the data type, signal type and transmission mode in the demand document, that is, the ProtoBuf data type transmitted across the system, and the external device parses the ProtoBuf data type transmitted across the system into the required signal data, thereby responding to the corresponding function and logic. The present invention can automatically generate the corresponding logic, without the need to develop logic separately, realize fully automated hosting, save the development time consumed by developers in the adaptation of business functions when developing the Vehicle Hal layer, and improve the development efficiency of developers. At the same time, the present invention can flexibly select the demand code logic, effectively separate the demand stage and the development stage, ensure the isolation of the development process and the flexibility of code development, thereby strengthening the standardization of the business in the entire module and avoiding software vulnerabilities caused by human errors.

[0047] In order to make it easier for those skilled in the art to understand the solution provided by the present disclosure, a detailed description is given below.

[0048] In some embodiments, the Vehicle Hal layer logically adapting the processing result and sending the processing result to the external device may include:

[0049] According to the pre-configured automation logic, the processing result is automatically converted into the ProtoBuf data type provided by Google through a conversion script, and the processing result of the ProtoBuf data type is sent to the external device.

[0050] That is, when transmitting to different systems outside the Android system, data mapping and conversion can be further performed, and finally the generated data can be transmitted across systems to the corresponding peripherals. The external devices will then parse the data into the required signal data and respond to the corresponding functions and logic.

[0051] In some embodiments, Figure 5 As shown, the Vehicle Hal layer automatically converts the processing results into the ProtoBuf data type provided by Google through a conversion script according to the pre-configured automation logic, including:

[0052] Generate types.hal file for interface according to the Vehicle Hal table mapping;

[0053] Automatically generate DefaultConfig data according to the types.hal file, wherein the DefaultConfig data contains all signal data initial values, maximum values, minimum values, data types, prop ids, transmission types, and system types;

[0054] The processing result is serialized according to the DefaultConfig data, and converted into a ProtoBuf data type suitable for cross-system transmission through a conversion script.

[0055] Specifically, the serialization logic of converting the processing results into the ProtoBuf data provided by Google can be automatically completed by the script. Since it involves the business logic of the Vehicle Hal layer, the automation logic can be further refined:

[0056] Generate the types.hal file for the interface in the Vehicle Hal layer by mapping the Vehicle Hal table. The types.hal file contains the docking data of the Vehicle Hal layer to the Framework layer and App layer interfaces.

[0057] Automatically generate the DefaultConfig data used in the Vehicle Hal layer based on the generated types.hal file. The DefaultConfig data contains all signal data initial values, maximum values, minimum values, data types, prop ids, transmission types, system types and other data information. When the Vehicle Hal service is initialized, the DefaultConfig data will be dynamically loaded into the service cache for real-time query.

[0058] The downstream data in the corresponding transmission process is serialized and converted into the ProtoBuf data type required for cross-system use.

[0059] In some embodiments, automatically generating a table according to the signal-function correspondence table includes:

[0060] According to the signal function correspondence table, a parsing script is used to automatically generate a Property Value data structure corresponding to the signal functions and requirements in the table, as well as a Vehicle Hal table. The Property Value data structure includes prop id, vehicle prop id, area id, and value. The dependency of the Vehicle Hal table is the PropertyValue data structure.

[0061] In this way, according to the sorted signal function correspondence table, the script automatically generates the Property Value data structure corresponding to the signal functions and requirements in the table. The Property Value data structure includes prop id, vehicleprop id, area id, value, etc. Since the specific function and signal data are one-to-one, the generated Property Value data is unique.

[0062] Since the data needs to be provided to the Framework layer and App layer for use, and the signal parsing relationship is required for each system-related peripheral, and different modules need to be adapted and accessed according to different business scenarios, a Vehicle Hal table needs to be automatically generated through a script at the same time for application layer developers to perform corresponding function comparisons. The Vehicle Hal table depends on the Property Value data structure.

[0063] In some embodiments, before serializing the processing result according to the DefaultConfig data and converting it into a ProtoBuf data type suitable for cross-system transmission through a conversion script, the process further includes:

[0064] When the Vehicle Hal service is initialized, the DefaultConfig is dynamically loaded into the cache area of ​​the service.

[0065] It should also be noted that the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of further restrictions, the elements defined by the sentence "includes one..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements. The words "first", "second" and the like are used to indicate names, but do not indicate any specific order. The above schematically describes the invention and its implementation methods, which is not restrictive. The invention can be implemented in other specific forms without departing from the spirit or basic features of the invention. What is shown in the accompanying drawings is only one of the implementation methods of the invention, and the actual structure is not limited thereto. Any figure mark in the claims should not limit the claims involved. Therefore, if a person of ordinary skill in the art is inspired by it, and does not deviate from the purpose of the invention, and designs a structural mode and an embodiment similar to the technical solution without creativity, they should all belong to the scope of protection of this patent.

Claims

1. A method for automatically generating signal analysis in Vehicle Hal, characterized in that: The method is applied to an intelligent cockpit controller based on an Android operating system, the intelligent cockpit controller is connected to at least one external device that is not an Android operating system, the Android operating system includes a Vehicle Hal layer and an application layer, and the method includes: The signal data of the external device is obtained through the Vehicle Hal layer, and the data type of the signal data is converted for use by the application layer: Obtain a signal function correspondence table, wherein the signal function correspondence table is obtained according to the requirement document, the DBC file and the CAN signal table; Automatically generate a table according to the signal function correspondence table, the table including a Property Value data structure and a Vehicle Hal table for the application layer to perform corresponding function comparison; Serializing the signal data to obtain a ProtoBuf data type; The signal data is processed by the application layer with corresponding business logic, and the processing result is sent to the Vehicle Hal layer, so that the Vehicle Hal layer performs logic adaptation on the processing result and sends the processing result to the external device.

2. A method for automatically generating signal analysis in Vehicle Hal according to claim 1, characterized in that: The Vehicle Hal layer performs logic adaptation on the processing result and sends the processing result to the external device, including: According to the pre-configured automation logic, the processing result is automatically converted into the ProtoBuf data type provided by Google through a conversion script, and the processing result of the ProtoBuf data type is sent to the external device.

3. A method for automatically generating signal analysis in Vehicle Hal according to claim 2, characterized in that: The processing result is automatically converted into the ProtoBuf data type provided by Google through a conversion script according to the pre-configured automation logic, including: Generate the types.hal file for the interface according to the Vehicle Hal table mapping. Automatically generate DefaultConfig data according to the types.hal file, wherein the DefaultConfig data contains all signal data initial values, maximum values, minimum values, data types, prop ids, transmission types, and system types; The processing result is serialized according to the DefaultConfig data, and converted into a ProtoBuf data type suitable for cross-system transmission through a conversion script.

4. The method for automatically generating signal analysis in Vehicle Hal according to claim 1, characterized in that: The automatically generating a table according to the signal function correspondence table comprises: According to the signal function correspondence table, a parsing script is used to automatically generate a Property Value data structure corresponding to the signal functions and requirements in the table, as well as a Vehicle Hal table. The Property Value data structure includes propid, vehicle prop id, area id, and value. The dependency of the Vehicle Hal table is the Property Value data structure.

5. The method for automatically generating signal analysis in Vehicle Hal according to claim 1, characterized in that: Before serializing the processing result according to the DefaultConfig data and converting it into a ProtoBuf data type suitable for cross-system transmission through a conversion script, the method further includes: When the Vehicle Hal service is initialized, the DefaultConfig is dynamically loaded into the cache area of ​​the service.