A method, apparatus, medium, and equipment for querying vehicle configuration data.
By constructing a configuration mapping set, the heterogeneous data sources of the vehicle software platform are unified and abstracted, which decouples business modules from data sources, simplifies the maintenance and expansion of vehicle functions, and improves the accuracy and flexibility of configuration queries.
Patent Information
- Application Number
- CN202611235539.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-14
- Publication Date
- 2026-11-17
AI Technical Summary
In existing technologies, in-vehicle software platforms need to handle configuration data from multiple heterogeneous data sources, resulting in high system coupling and a significant increase in maintenance costs and expansion difficulties.
By constructing a configuration mapping set, data sources of different origins and formats are uniformly abstracted into a metadata structure indexed by configuration keys. Business modules can obtain configuration values through a single query interface, reducing the differences in data source access interfaces.
This decouples business modules from data sources, simplifies the maintenance and expansion of vehicle functions, improves the accuracy and flexibility of configuration queries, and reduces maintenance costs.
Smart Images

Figure CN123115190A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of vehicle software configuration management, and particularly relates to a configuration data query method and device applied to a vehicle, a medium and equipment. BACKGROUND
[0002] In the electronic and electrical architecture of an intelligent automobile, a vehicle software platform needs to cope with configuration data from multiple heterogeneous data sources such as a hardware controller, a local configuration file, an upgrade compressed package and a mounted external storage. Different function modules of different vehicle models often need to dynamically adjust their behaviors according to the configuration data. In the related art, each business module directly writes special reading logic, which is deeply bound to the location, format and access protocol of a specific physical data source, resulting in high coupling of the system. When the type of configuration source increases or the way of storing data changes, the business modules often need to be separately adapted and modified, and the maintenance cost and extension difficulty of the software significantly increase. SUMMARY
[0003] The present application aims to provide a configuration data query method and device applied to a vehicle, a medium and equipment, so as to reduce the coupling between a business module that sends a query request and a data source.
[0004] To achieve the above-mentioned purpose, the technical solution adopted by the present application is as follows: A configuration data query method applied to a vehicle, the method comprising: obtaining a configuration mapping set preset for multiple data sources of the vehicle, the configuration mapping set comprising multiple configuration items, and each configuration item comprising a configuration key, a data source corresponding to the configuration key and position information of the configuration key; receiving a query request for a target configuration key; based on the query request, determining the data source corresponding to the target configuration key and the position information of the target configuration key from the configuration mapping set; based on the data source corresponding to the target configuration key and the position information of the target configuration key, extracting a configuration value of the target configuration key; returning the configuration value, which is used to control at least one function module of the vehicle.
[0005] Based on the aforementioned technical methods, a configuration mapping set is first obtained. Then, based on the received query request, the data source and location information corresponding to the target configuration key are determined from the configuration mapping set. Finally, the configuration value of the target configuration key can be extracted based on the data source and location information corresponding to the target configuration key. In other words, by pre-constructing a configuration mapping set for multiple heterogeneous data sources for the vehicle, data sources of different origins and formats are uniformly abstracted into a metadata structure indexed by configuration keys. Business modules only need to pass a query request for the target configuration key through a single unified query interface to obtain the configuration value from any data source, without needing to be aware of the type, format, storage location, or access protocol of the underlying data source. This approach eliminates the differences between access interfaces of different data sources, reduces the coupling between business modules and data sources, and facilitates the maintenance and expansion of vehicle functions.
[0006] Furthermore, the data source belongs to types including bit field types and file configuration types; If the data source corresponding to the configuration key belongs to the bit field type, the position information of the configuration key includes the byte index, start bit, and stop bit; If the data source corresponding to the configuration key belongs to the file configuration type, the location information of the configuration key includes the file path and the query key name.
[0007] Based on the aforementioned technical means, by different types of data sources, the configuration mapping set can describe the specific storage location of configuration values in the data source in a unified and deterministic way, so that subsequent extraction operations can execute the corresponding parsing logic according to the category, thereby ensuring the unified processing capability for multiple data sources.
[0008] Furthermore, the step of extracting the configuration value of the target configuration key based on the data source corresponding to the target configuration key and the location information of the target configuration key includes: If the data source corresponding to the target configuration key belongs to the bit field type, the corresponding byte is located from the bit field byte array corresponding to the data source based on the byte index in the position information of the target configuration key, and the configuration value of the target configuration key is parsed from the corresponding byte based on the start bit and the end bit in the position information of the target configuration key; If the data source corresponding to the target configuration key belongs to the file configuration type, the target configuration file is located based on the file path in the location information of the target configuration key, and the configuration value of the target configuration key corresponding to the query key name is obtained from the target configuration file based on the query key name in the location information of the target configuration key.
[0009] Based on the above technical means, by defining the extraction steps for two types of data sources, namely bit field type and file configuration type, the configuration value can be accurately parsed or read according to the characteristics of the data source, avoiding value retrieval errors caused by differences in data format and ensuring the accuracy of configuration value extraction.
[0010] Furthermore, if the data source corresponding to the configuration key belongs to the file configuration type, the location information of the configuration key also includes the conversion key name; The step of retrieving the configuration value of the target configuration key corresponding to the query key name from the target configuration file based on the query key name in the location information of the target configuration key includes: In response to the fact that the transformation key name in the location information of the target configuration key is empty, the configuration value of the target configuration key corresponding to the query key name is obtained from the target configuration file based on the query key name in the location information of the target configuration key; The method further includes: In response to the fact that the conversion key name in the location information of the target configuration key is not empty, the configuration value of the target configuration key corresponding to the conversion key name is obtained from the target configuration file based on the conversion key name in the location information of the target configuration key.
[0011] Based on the above technical means, by introducing conversion key names into the location information, the automatic mapping of query interface request key names to file internal key names is realized, without the caller needing to be aware of the naming differences, thus improving the compatibility and flexibility of configuration queries.
[0012] Further, determining the data source corresponding to the target configuration key and the location information of the target configuration key from the configuration mapping set based on the query request includes: Based on the query request, a query is performed in the configuration mapping set. In response to the existence of a configuration item corresponding to the target configuration key in the configuration mapping set, the data source corresponding to the target configuration key and the location information of the target configuration key are obtained from the configuration item corresponding to the target configuration key.
[0013] Based on the above technical means, the configuration item corresponding to the target configuration key can be efficiently determined by direct key matching, ensuring timely response of the query process, thereby meeting the low latency requirements of business modules for reading configuration values.
[0014] Furthermore, before returning the configuration value, the method further includes: In response to the absence of a configuration item corresponding to the target configuration key in the configuration mapping set, the target configuration file is obtained; Based on the query request, determine the query key name of the target configuration key; Based on the query key name of the target configuration key, the configuration value of the target configuration key corresponding to the query key name is obtained from the target configuration file.
[0015] Based on the above technical means, when there is no configuration item corresponding to the target configuration key in the configuration mapping set, the configuration value can be directly obtained from the target configuration file based on the query of the target configuration key. This method allows newly added file configuration type configuration items to be queried normally by the business side without pre-expanding to the configuration mapping set, which improves the speed of new configuration value deployment and reduces the maintenance cost of the configuration mapping set.
[0016] Furthermore, before returning the configuration value, the method further includes: If it fails to retrieve the configuration value of the target configuration key corresponding to the query key name from the target configuration file, the preset default value will be determined as the configuration value of the target configuration key.
[0017] Based on the above technical means, by introducing a preset default value as a fallback, a definite value can be returned under any abnormal or unconfigured circumstances, avoiding business interruption or errors caused by missing configuration values, and significantly enhancing the robustness and fault tolerance of the query process.
[0018] Furthermore, the target configuration file is determined in the following manner: Obtain vehicle identification and configuration level; Generate a configuration file name based on the vehicle identifier and the configuration level; Based on the configuration file name, obtain the first configuration file from the local asset directory and the second configuration file from the compressed configuration package under the candidate resource directory; If the configuration version number of the first configuration file is higher than the configuration version number of the second configuration file, the first configuration file is determined as the target configuration file; otherwise, the second configuration file is determined as the target configuration file.
[0019] By using the aforementioned technical means, the newest configuration is used through version comparison, ensuring that business modules always run based on the latest configuration values, avoiding functional deviations caused by outdated versions, and guaranteeing the timeliness of queries.
[0020] Furthermore, the compressed configuration package under the candidate resource directory is updated in the following way: In response to the existence of an external configuration package in the mount directory, the resource description file of the external configuration package is obtained. The resource description file of the external configuration package includes the configuration version number of the external configuration package and the first digest value of the external configuration package. Determine whether the record version number of the vehicle is inconsistent with the configuration version number of the external configuration package; If so, copy the external configuration package to the candidate resource directory to obtain the copied external configuration package; Determine the second digest value of the copied external configuration package. If the second digest value is consistent with the first digest value, update the record version number to the configuration version number of the external configuration package, and use the copied external configuration package to update the compressed configuration package under the candidate resource directory.
[0021] Based on the above technical means, through dual verification of version number comparison and digest verification, it is ensured that the external configuration package is only updated to the candidate resource directory when it is indeed a new version and the file is complete and undamaged, thereby improving the reliability of configuration updates and the stability of vehicle operation.
[0022] Furthermore, the compressed configuration package under the candidate resource directory is updated in the following way: In response to the detection of a change in the record version number of the vehicle, the upgrade configuration package under the upgrade resource directory is copied to the candidate resource directory to obtain the copied upgrade configuration package; Obtain the resource description file of the upgrade configuration package, wherein the resource description file of the upgrade configuration package includes the third digest value of the resource configuration package; Determine the fourth digest value of the copied upgrade configuration package. If the fourth digest value is consistent with the third digest value, update the compressed configuration package under the candidate resource directory using the copied upgrade configuration package.
[0023] Based on the above technical means, by monitoring version number changes and performing copy updates with digest verification, automatic and secure updates of compressed configuration packages in online upgrade scenarios are supported. This avoids incomplete or damaged compressed configuration packages from taking effect due to direct replacement, and ensures the continuity and reliability of configuration services during the upgrade process.
[0024] Furthermore, obtaining a preset set of configuration mappings for multiple data sources targeting the vehicle includes: Obtain the configuration mapping file from the compressed configuration package in the candidate resource directory; The configuration mapping file is parsed to obtain a set of preset configuration mappings for multiple data sources for the vehicle.
[0025] Based on the above technical means, the configuration mapping file is included as part of the compressed configuration package, which enables the configuration mapping set and configuration data to be updated synchronously and distributed as a whole, simplifying the deployment and upgrade process of the configuration service and ensuring that the mapping relationship always matches the actual configuration data.
[0026] A configuration data query device for vehicles, the device comprising: The acquisition unit is configured to acquire a preset set of configuration mappings for multiple data sources for the vehicle. The set of configuration mappings includes multiple configuration items, each including a configuration key, a data source corresponding to the configuration key, and location information of the configuration key. The receiving unit is configured to receive query requests for a target configuration key; The query unit is configured to determine, based on the query request, the data source corresponding to the target configuration key and the location information of the target configuration key from the configuration mapping set; The extraction unit is configured to extract the configuration value of the target configuration key based on the data source corresponding to the target configuration key and the location information of the target configuration key; The return unit is configured to return the configuration value, which is used to control at least one functional module of the vehicle.
[0027] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in the embodiments of the present invention.
[0028] An electronic device, comprising: One or more processors; and A memory associated with the one or more processors, the memory being used to store program instructions that, when read and executed by the one or more processors, perform the steps of the method described in the embodiments of the present invention.
[0029] A computer program product includes a computer program that, when executed by a processor, implements the steps of the method described in the embodiments of the present invention.
[0030] The beneficial effects of this invention are: This invention first obtains a configuration mapping set. Based on the received query request, it determines the data source and location information corresponding to the target configuration key from the configuration mapping set. Then, based on the data source and location information corresponding to the target configuration key, it can extract the configuration value of the target configuration key. In other words, by pre-constructing a configuration mapping set for multiple heterogeneous data sources for the vehicle, data sources of different origins and formats are uniformly abstracted into a metadata structure indexed by configuration keys. Business modules only need to pass a query request for the target configuration key through a single unified query interface to obtain the configuration value from any data source, without needing to be aware of the type, format, storage location, or access protocol of the underlying data source. This approach eliminates the differences between access interfaces of different data sources, reduces the coupling between business modules and data sources, and facilitates the maintenance and expansion of vehicle functions. Attached Figure Description
[0031] Figure 1 This is a system architecture diagram to which the present invention applies.
[0032] Figure 2 The flowchart illustrates the vehicle configuration data query method provided by this invention.
[0033] Figure 3 This is a schematic diagram illustrating the process of updating a compressed configuration package in a candidate resource directory, as provided by the present invention.
[0034] Figure 4 This is a schematic diagram illustrating another process for updating the compressed configuration package in the candidate resource directory provided by the present invention.
[0035] Figure 5 This is a schematic block diagram of a vehicle configuration data query device provided by the present invention.
[0036] Figure 6 A schematic block diagram of the electronic device provided by the present invention. Detailed Implementation
[0037] The embodiments of the present invention will be described below with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention and not for limiting the scope of protection of the present invention.
[0038] The terminology used in the embodiments of this invention is for the purpose of describing particular embodiments only and is not intended to limit the invention. The singular forms “a,” “the,” and “the” as used in the embodiments of this invention and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.
[0039] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0040] Depending on the context, the word "if" as used here can be interpreted as "when," "when," "in response to determination," or "in response to detection." Similarly, depending on the context, the phrase "if determination" or "if detection (of the stated condition or event)" can be interpreted as "when determination," "in response to determination," "when detection (of the stated condition or event)," or "in response to detection (of the stated condition or event)."
[0041] In the field of vehicle software configuration management, in order to provide the configuration data required for the operation of various business modules of the vehicle, the common practice in related technologies is that the business modules connect to the corresponding reading interfaces according to the storage form of the configuration data. That is, the business modules determine the data source type where the required configuration data is located, and then call the parsing or reading logic that matches the data source type to retrieve the configuration value from the corresponding storage location.
[0042] However, current in-vehicle software platforms need to simultaneously handle configuration data from various heterogeneous data sources, including local asset catalogs, upgrade configuration packages under upgrade resource catalogs, external configuration packages under mount catalogs, offline bit-field configuration data provided by vehicle controllers, ADSP configuration data, FD04 extended configuration data, and F197 optional configuration data. The aforementioned approach is not ideal in this scenario. Specifically, to retain the native access efficiency of various data sources, business modules must directly perceive the type, format, and location details of each data source. This tightly binds business logic to the underlying storage format, meaning that any adjustment or addition to any data source will affect numerous business modules. For example, on the same vehicle platform, configuration data that was carried as bit fields in specified bytes and bit segments of the controller data frame in earlier versions may be stored as key-value pairs in local configuration files in later versions. The original byte-indexed and bit-segmented call paths of the business modules become invalid, requiring modification in the code to read by file path and key name, thus increasing adaptation costs.
[0043] In view of this, this application provides a new approach. To facilitate understanding of this application, the system architecture on which this application is based will first be described. Figure 1 An exemplary system architecture that can be applied to embodiments of this application is shown, such as Figure 1 As shown, the system architecture may include: a configuration service system, business modules, and functional modules.
[0044] The configuration service system is deployed within the vehicle's onboard computing platform. This platform connects to relevant controllers in the vehicle's electronic and electrical architecture via in-vehicle communication links and provides configuration query services to one or more business modules running on the onboard software platform. Functional modules reside in the vehicle's application layer and refer to the physical or software entities that actually implement a specific function on the vehicle, such as luxury seat control, ambient lighting control, autonomous driving assistance functions, and electronic suspension adjustment.
[0045] In one specific embodiment, the configuration service system logically includes a data acquisition module, a rule parsing module, a consistency verification module, a target configuration generation module, a configuration output module, and a notification module. These modules are interconnected through internal function calls or inter-process communication, forming a processing link from the data source side to the business side.
[0046] The data acquisition module is located on the data access side of the configuration service system and is connected to various data sources. These data sources include the local asset catalog, upgrade configuration packages under the upgrade resource catalog, external configuration packages under the mount catalog, offline bit-domain configuration data provided by the vehicle controller, ADSP configuration data, FD04 extended configuration data, and F197 optional configuration data.
[0047] The rule parsing module is connected to the data acquisition module. It reads configuration mapping files from the resources accessed by the data acquisition module and maintains a set of configuration mappings parsed from these files within the configuration service system. This set of configuration mappings is retrieved by the configuration output module when responding to query requests.
[0048] The consistency verification module is connected to the data acquisition module and the version record items stored in the configuration service system. It is used to perform mount status checks, version number readings, and digest value calculations when external configuration packages and upgrade configuration packages change, and write the external configuration packages or upgrade configuration packages that pass the verification to the candidate resource directory.
[0049] The target configuration generation module is connected to the data acquisition module and the consistency verification module. On one side, it receives the vehicle identifier and configuration level as input, and on the other side, it reads the candidate configuration files from the compressed configuration packages under the local asset directory and the candidate resource directory, and provides the selected candidate configuration file as the currently effective target configuration file to the configuration output module.
[0050] The configuration output module is located on the external service side of the configuration service system, providing a unified configuration query interface to business modules. Business modules pass in the target configuration key through this interface. The configuration output module, based on the configuration mapping set maintained by the rule parsing module and the target configuration file determined by the target configuration generation module, retrieves the configuration value from the corresponding data source and returns it to the business module along the original call path. The returned configuration value is used to control the functional modules of the vehicle corresponding to the business module.
[0051] The notification module is connected to the configuration output module and the consistency verification module. It outputs status signals to the business module or other registration parties' processes to trigger subsequent processing by the business module after the configuration service system is first loaded and after the configuration is changed.
[0052] Figure 2 This is a flowchart of a configuration data query method for vehicles provided in an embodiment of this application. This method can be... Figure 1 The configuration service system in the system shown is executed. For example... Figure 2 As shown, the method may include the following steps: Step 201: Obtain a set of preset configuration mappings for multiple data sources for the vehicle. The set of configuration mappings includes multiple configuration items, each including a configuration key, the data source corresponding to the configuration key, and the location information of the configuration key.
[0053] Step 202: Receive a query request for the target configuration key.
[0054] Step 203: Based on the query request, determine the data source corresponding to the target configuration key and the location information of the target configuration key from the configuration mapping set.
[0055] Step 204: Extract the configuration value of the target configuration key based on the data source corresponding to the target configuration key and the location information of the target configuration key.
[0056] Step 205: Return the configuration value, which is used to control at least one functional module of the vehicle.
[0057] As can be seen from the above process, this invention first obtains a configuration mapping set, and then determines the data source and location information corresponding to the target configuration key from the configuration mapping set based on the received query request. Furthermore, it can extract the configuration value of the target configuration key based on the data source and location information corresponding to the target configuration key. In other words, by pre-constructing a configuration mapping set for multiple heterogeneous data sources of the vehicle, data sources of different origins and formats are uniformly abstracted into a metadata structure indexed by configuration keys. Business modules only need to pass a query request for the target configuration key through a single unified query interface to obtain the configuration value from any data source, without needing to be aware of the type, format, storage location, or access protocol of the underlying data source. This approach eliminates the differences between access interfaces of different data sources, reduces the coupling between business modules and data sources, and facilitates the maintenance and expansion of vehicle functions.
[0058] The following describes in detail each step of the above process and the effects that can be further produced, with reference to the embodiments. It should be noted that the terms "first" and "second" involved in this disclosure do not have limitations in terms of size, order, or quantity, but are only used to distinguish them in name. For example, "first digest value" and "second digest value" are used to distinguish between two types of digest values.
[0059] First, the above step 201, namely "obtaining a preset configuration mapping set for multiple data sources for the vehicle, the configuration mapping set including multiple configuration items, the configuration items including configuration keys, the data source corresponding to the configuration keys, and the location information of the configuration keys", will be described in detail with reference to the embodiments.
[0060] One possible approach is to obtain a pre-defined set of configuration mappings for multiple data sources specific to the vehicle. This set can be stored directly in the local storage space of the in-vehicle computing platform. Alternatively, the configuration mapping set can be obtained and instantiated within the in-vehicle computing platform. Specifically, configuration mapping files can be retrieved from compressed configuration packages in the candidate resource directory and parsed to obtain the pre-defined set of configuration mappings for multiple data sources specific to the vehicle.
[0061] In one specific embodiment, the configuration mapping file can be an XML file. The rule parsing module parses this XML file, converting each configuration item recorded therein into a record in the configuration mapping set, and writing fields such as configuration key, data source, and location information into each configuration item. Of course, the configuration mapping file can also use JSON, YAML, or other structured description formats, and the rule parsing module will use the corresponding parsing method accordingly.
[0062] As a further optional implementation, when the compressed configuration package in the candidate resource directory is missing or its configuration mapping file is incomplete, the rule parsing module can fall back to the default configuration mapping file in the local storage space. After parsing this default configuration mapping file, a set of configuration mappings is obtained, ensuring that the configuration service system still has basic unified query capabilities even in extreme scenarios. Distributing the configuration mapping file as part of the compressed configuration package along with the configuration data ensures that the mapping relationships and configuration data are kept synchronized and distributed as a whole, simplifying the deployment and upgrade process of the configuration service.
[0063] It should be noted that the configuration mapping set includes multiple configuration items. Each configuration item includes a configuration key, the data source corresponding to the configuration key, and the location information of the configuration key. Among them, the data source corresponding to the configuration key includes, but is not limited to, the local asset directory, the upgrade configuration package under the upgrade resource directory, the external configuration package under the mount directory, the offline bit field configuration data provided by the vehicle controller, the ADSP configuration data, the FD04 extended configuration data, and the F197 optional configuration data.
[0064] One specific implementation approach is to record, in key-value pairs, the data source type, byte index, start bit, end bit, query key name, and transformation key name corresponding to the configuration key. Another specific implementation approach is to record, in key-value pairs, the data source, byte index, start bit, end bit, query key name, and transformation key name corresponding to the configuration key.
[0065] Using the above method, the stored information in heterogeneous data sources can be abstracted into a unified metadata structure, facilitating subsequent query processing according to a unified logic. More generally, the organization of the configuration mapping set can include, but is not limited to, hash tables, dictionaries, tree-structured indexes, or database tables. These organizational forms all enable the function of quickly retrieving the corresponding metadata based on the configuration key.
[0066] In this application, a configuration key can refer to a name or identifier used to uniquely identify a configuration item. It can refer to a feature key related to vehicle functions, or it can encompass other key names related to the vehicle cockpit, vehicle control, display, or optional functions. A data source can refer to the specific carrier or storage medium carrying the configuration value; it can be a bit-field byte array returned by the vehicle controller, or a configuration file stored in the file system. Location information can refer to a set of parameters required to locate a specific configuration value from the data source, and it can have different field compositions depending on the data source type.
[0067] In a preferred embodiment, the data source types of the configuration keys recorded in the configuration mapping set include two categories: bit field types and file configuration types. If the data source type corresponding to a configuration key in a configuration item is a bit field type, then the position information of the configuration key includes the byte index, start bit, and stop bit; if the data source type corresponding to a configuration key in a configuration item is a file configuration type, then the position information of the configuration key includes the file path and query key name.
[0068] Specifically, when the data source is offline bit-field configuration data, ADSP configuration data, FD04 extended configuration data, or F197 optional configuration data, its type is bit-field type. In this case, the position information of the configuration key is presented in a field structure of byte index, start bit, and stop bit. For example, for a configuration item whose data source is offline bit-field configuration data, its byte index can indicate which byte the target bit segment is located in in the offline bit-field byte array, and the start bit and stop bit indicate the start and end boundaries of the target bit segment in that byte. Optionally, the start bit and stop bit can also be replaced with the start bit and target bit segment length, which is not specifically limited in this application.
[0069] When the data source is a local asset directory, an upgrade configuration package under an upgrade resource directory, or an external configuration package under a mount directory, its type is file configuration. In this case, the location information of the configuration key is presented as a field structure of file path and query key name. The file path can be an absolute path, a relative path to a preset root directory, or a path dynamically constructed based on the data source according to a predefined naming rule. The query key name is used to locate the corresponding key-value pair in the target configuration file (e.g., a TOML format configuration file).
[0070] By adopting the aforementioned typified location information structure, the configuration mapping set can describe the storage location of configuration values in bit-field type data sources and file configuration type data sources in a unified and deterministic manner. This allows subsequent extraction operations to execute the corresponding parsing logic according to the category, thereby ensuring accurate processing capability for multiple data sources while maintaining interface uniformity.
[0071] The following describes step 202, namely "receiving a query request for the target configuration key", in detail with reference to the embodiments.
[0072] The system receives a query request for a target configuration key. Specifically, the business module initiates a query request to the configuration service system through a unified query interface, carrying the target configuration key. As a specific implementation, the unified query interface can be represented as a function call like "getValue(key)". When a business module needs to read any configuration item, it passes the target configuration key it is interested in through this interface, without needing to know the underlying data source type, storage format, or storage location corresponding to that configuration key. Optionally, the query request can also carry additional contextual information, such as caller identifier and timestamps, for auxiliary logging or statistical analysis, but this additional information does not constitute a limitation of this embodiment.
[0073] The following describes in detail step 203, namely, "determining the data source corresponding to the target configuration key and the location information of the target configuration key from the configuration mapping set based on the query request," with reference to an embodiment.
[0074] Based on the query request, the data source corresponding to the target configuration key and the location information of the target configuration key are determined from the configuration mapping set. In some embodiments, after receiving the query request, the configuration service system matches the target configuration key in the configuration mapping set, and reads the recorded data source identifier and location information after matching the corresponding configuration item. For example, if the data source identifier of the configuration item record corresponding to the target configuration key in the configuration mapping set indicates that its source type is bit field type, then the corresponding location information includes byte index, start bit, and stop bit; if the data source identifier of the configuration item record corresponding to the target configuration key in the configuration mapping set indicates that its source type is file configuration type, then the corresponding location information includes file path and query key name.
[0075] The following describes in detail step 204, namely "extracting the configuration value of the target configuration key based on the data source corresponding to the target configuration key and the location information of the target configuration key", with reference to the embodiments.
[0076] Based on the data source corresponding to the target configuration key and the location information of the target configuration key, the configuration value of the target configuration key is extracted. The configuration output module points to the corresponding data source interface according to the data source determined in the previous step, and parses or reads the configuration value of the target configuration key from the data source according to the positioning method described by the location information. Specific means to implement the above extraction function may include: when the data source is a bit field type, the target bit field can be extracted from the corresponding byte through bit operations to restore the configuration value; when the data source is a file configuration type, the configuration value corresponding to the corresponding configuration key can be read through a file parsing library.
[0077] Specifically, if the data source corresponding to the target configuration key is a bit-field type, the configuration output module locates the corresponding byte in the bit-field byte array corresponding to the data source based on the byte index in the position information of the target configuration key, and parses the configuration value of the target configuration key from the corresponding byte based on the start and stop bits in the position information. As a specific implementation, the above parsing process can be achieved through bitwise shifting and masking operations. For example, the corresponding byte is first shifted to the right by the number of bits indicated by the start bit, and then a bitwise AND operation is performed with the mask determined by the start and stop bits to obtain the value corresponding to the target bit segment. Optionally, for extended data sources such as ADSP, FD04, or F197, the configuration output module can first select the corresponding extended data array according to the source type, and then complete the extraction according to the same byte index, start bit, and stop bit rules.
[0078] If the data source corresponding to the target configuration key is a file configuration type, the configuration output module locates the target configuration file based on the file path in the location information of the target configuration key, and then retrieves the configuration value of the target configuration key corresponding to the query key name from the target configuration file based on the query key name in the location information. For example, the target configuration file can be a currently effective TOML format configuration file. The configuration output module can read the corresponding configuration value by calling the corresponding TOML parsing function (e.g., readToml) and passing in the query key name. By defining the extraction steps for bit fields and files respectively, the configuration service system can accurately parse or read configuration data according to the characteristics of the data source, avoiding value retrieval errors caused by differences in data format, thereby further enhancing the accuracy and stability of the unified query interface in heterogeneous data source scenarios.
[0079] To accommodate scenarios where the query key name used for configuration queries differs from the key name within the configuration file, this application also provides the following preferred solution. In a preferred embodiment, if the data source corresponding to the configuration key is of type file configuration, the location information of the configuration key includes not only the file path and query key name but also the conversion key name. Accordingly, the aforementioned process of obtaining configuration values from the target configuration file can be further refined as follows: In response to an empty conversion key name in the location information of the target configuration key, the configuration output module obtains the configuration value of the target configuration key corresponding to the query key name from the target configuration file based on the query key name in the location information of the target configuration key; in response to a non-empty conversion key name in the location information of the target configuration key, the configuration output module obtains the configuration value of the target configuration key corresponding to the conversion key name from the target configuration file based on the conversion key name in the location information of the target configuration key.
[0080] This constraint aims to achieve automatic mapping between the request key name used by the query interface and the key name inside the target configuration file. For example, a business module may habitually initiate queries using bit-field style key names (such as carfeaturex), while the corresponding field in the target configuration file may use different names (such as car_feature_x or feature.carX). In this case, the conversion key name can be set to the actual key name inside the target configuration file in the configuration item corresponding to the configuration mapping set. When the configuration output module detects that the conversion key name is not empty, it replaces the original query key name with the conversion key name for file reading, thus eliminating the need for the caller to perceive the naming difference. The introduction of the above-mentioned conversion key name allows the configuration mapping set and the target configuration file to evolve independently in terms of naming system. Its advantage is that adjustments to the naming rules on either side only require modification of the conversion key name to achieve adaptation, without modifying the calling code of the business module. Those skilled in the art will understand that alternative structures that achieve the same purpose include: maintaining a separate key name mapping table outside the configuration mapping set, or maintaining a key name alias dictionary inside the configuration output module, etc. These solutions are equivalent in effect to the conversion key name field in this embodiment.
[0081] The above process relies on the existence of a configuration item corresponding to the target configuration key in the configuration mapping set. Only then can the data source corresponding to the target configuration key and the location information of the target configuration key be obtained from the configuration item corresponding to the target configuration key. To avoid direct query failure and business function interruption when the requested target configuration key is not included in the configuration mapping set, this application also provides the following preferred solution. In a preferred embodiment, in response to the absence of a configuration item corresponding to the target configuration key in the configuration mapping set, the configuration output module obtains the target configuration file; determines the query key name of the target configuration key based on the query request; and obtains the configuration value of the target configuration key corresponding to the query key name from the target configuration file based on the query key name of the target configuration key.
[0082] As a specific implementation, the query key used here can directly take the target configuration key carried in the query request. That is, in the case of missing rules, the target configuration key is used as the query key name to directly read the same key value from the currently effective TOML format configuration file (i.e., the target configuration file). This file rollback mechanism allows newly added file type configuration items to be queried normally by the business side without having to be pre-extended to the configuration mapping set. Its advantage lies in reducing the strong coupling between the configuration mapping set and the target configuration file. The query service still has basic availability when the configuration mapping set is not synchronously extended, thereby improving the scalability and deployment speed of the query service system and reducing the maintenance cost of the query service.
[0083] To prevent business logic exceptions caused by the absence of required configuration keys in the target configuration file during file rollback or file configuration reading, this application also provides the following preferred solutions. In a preferred embodiment, if retrieving the configuration value of the target configuration key corresponding to the query key name from the target configuration file fails, a preset default value is determined as the configuration value of the target configuration key. As a specific implementation, the preset default value can be a sentinel value matching the type of the target configuration key. For example, -1 can be used in integer scenarios, and an empty string or null value can be used in string scenarios. For bit-field data sources, if the length of the corresponding configuration value does not meet the preset valid length (e.g., the length of the configuration value obtained from ADSP configuration data or FD04 extended configuration data does not reach the preset valid length), the configuration output module can also directly return the preset default value (e.g., -1) to prevent the business side from continuing to use invalid data. Optionally, the preset default value can be specified separately for different configuration keys, or uniformly specified according to the category of configuration keys, or adjusted through external configuration items. By introducing a default value as a fallback, the query service system can return a definite value in any abnormal or unconfigured situation, thereby avoiding business interruption or errors caused by missing configuration values and further enhancing the robustness and fault tolerance of the unified configuration service.
[0084] It should be noted that the target configuration file mentioned above can directly use the configuration file pre-stored in the local storage space, or it can use a higher version of the configuration file. Specifically, the target configuration generation module first obtains the vehicle identifier (e.g., carId) and configuration level (e.g., carLevel); then it generates a configuration file name based on the vehicle identifier and configuration level, for example, by combining a fixed prefix, carId, and carLevel into a TOML format configuration file name such as prefix_carId_carLevel.toml according to a preset naming rule; next, based on the configuration file name, it obtains candidate configuration files, that is, it obtains the first configuration file from the local asset directory and the second configuration file from the compressed configuration package under the candidate resource directory; finally, if the configuration version number of the first configuration file is higher than the configuration version number of the second configuration file, the first configuration file is determined as the target configuration file, otherwise the second configuration file is determined as the target configuration file.
[0085] In some scenarios, the vehicle identifier may not be ready when the vehicle is first powered on. In this case, the target configuration generation module cannot obtain the vehicle identifier. However, the target configuration generation module does not immediately terminate the process but continues to obtain the vehicle identifier using a delayed retry method until the vehicle identifier is valid before proceeding with subsequent filename concatenation and candidate configuration file reading. As a specific implementation, the configuration version numbers of the first and second configuration files can be recorded internally in a dedicated field (e.g., a version field) or read from their accompanying resource description file. Those skilled in the art can easily combine the target configuration file determination process in this embodiment with the target configuration file acquisition process in the aforementioned file rollback embodiment, thereby enabling file rollback reading based on a newer version of the target configuration file even in scenarios where rules are missing.
[0086] To ensure that when an external configuration package appears in the mount directory during vehicle operation, the external configuration package is safely and completely applied to the local configuration query to replace the old configuration, this application also provides the following preferred solution. In a preferred embodiment, the compressed configuration package under the candidate resource directory is updated in the following manner, such as... Figure 3As shown: In response to the existence of an external configuration package in the mount directory, the consistency verification module obtains the resource description file of the external configuration package. The resource description file includes the configuration version number of the external configuration package and the first digest value of the external configuration package. The consistency verification module determines whether the vehicle's record version number is inconsistent with the configuration version number of the external configuration package. If they are inconsistent, the external configuration package is copied to the candidate resource directory to obtain the copied external configuration package. Then, the second digest value of the copied external configuration package is determined. If the second digest value is consistent with the first digest value, the record version number is updated to the configuration version number of the external configuration package, and the compressed configuration package in the candidate resource directory is updated using the copied external configuration package.
[0087] As a specific implementation, the consistency verification module can first determine whether the mounted directory has been successfully mounted using a preset verification file. If the verification file does not exist, it continuously verifies the directory's availability through a loop retry mechanism until the mounted directory is readable and writable before performing a version comparison. The first and second digest values can be calculated using the MD5 digest algorithm, or other message digest algorithms such as SHA-1 and SHA-256; these algorithms can detect file corruption or incomplete writing that may occur during the copying process with high confidence. Optionally, if the second digest value is inconsistent with the first digest value, the consistency verification module can re-execute the copying and verification process until the digests are consistent or the preset retry limit is reached. Through dual verification of version number comparison and digest verification, the configuration service system can only introduce an external configuration package into the candidate resource directory if it is indeed a new version and the file is complete and undamaged. This prevents configuration corruption or inconsistency caused by Over-the-Air (OTA) overwriting, mounting anomalies, etc., from being loaded, thus improving the reliability of configuration updates and the stability of vehicle operation.
[0088] To ensure secure updating of the compressed configuration package in the candidate resource directory from the upgrade resource directory when the configuration version number changes directly due to OTA or other reasons during system operation, this application also provides the following preferred solution. In a preferred embodiment, the compressed configuration package in the candidate resource directory can also be updated in the following way, such as... Figure 4 As shown: In response to a detected change in the vehicle's record version number, the consistency verification module copies the upgrade configuration package from the upgrade resource directory to the candidate resource directory to obtain the copied upgrade configuration package; at the same time, it obtains the resource description file of the upgrade configuration package, which includes the third digest value of the upgrade configuration package; then it determines the fourth digest value of the copied upgrade configuration package. If the fourth digest value is consistent with the third digest value, the copied upgrade configuration package is used to update the compressed configuration package in the candidate resource directory.
[0089] As a specific implementation, the consistency verification module can monitor version number changes by listening to the version record entries corresponding to the version number. When a version change is detected, the replication, digest verification, and configuration loading processes are executed sequentially. The third and fourth digest values can also be calculated using message digest algorithms such as MD5 and SHA series. By listening for version number changes and executing replication updates with digest verification, the configuration service system supports automatic and secure updates of compressed configuration packages in online upgrade scenarios, avoiding the incomplete or corrupted configuration packages from direct replacement, thereby ensuring the continuity and reliability of the configuration service during the upgrade process. Those skilled in the art can easily combine the update method based on the upgrade resource directory in this embodiment with the aforementioned update method based on the mount directory to jointly cover two typical configuration change scenarios: external overlay and online upgrade.
[0090] It should be noted that to prevent repeated loading caused by frequent writes or event jitter, the consistency verification module has set up a re-entry protection mechanism for this change process. Specifically, when a change in the vehicle's record version number or the presence of an external configuration package in the mount directory is detected, the consistency verification module first checks and sets a global change processing flag. If the change processing flag is already set, it indicates that a copy verification process is already in progress, and the current triggering event is ignored. If the change processing flag is not set, it is set, and a new round of copy verification process continues. After the current round of copying, verification, and subsequent target configuration file reselection and notification processes are completed, the consistency verification module resets the change processing flag, thus allowing the response to the next event of a change in the record version number or the presence of an external configuration package in the mount directory.
[0091] The following describes step 205, namely "returning configuration values, which are used to control at least one functional module of the vehicle," in detail with reference to the embodiments.
[0092] The system returns a configuration value, which is used to control at least one functional module of the vehicle. Specifically, the configuration value is used to adjust the operating status and / or behavioral parameters of at least one functional module. The configuration service system returns the configuration value extracted in step 104 to the business module along the original call path. After obtaining the configuration value, the business module uses it to determine whether to enable, disable, select a mode, or set parameter values for the corresponding vehicle function. For example, the business module can control the display mode of the cockpit theme based on the configuration value corresponding to the target configuration key "themedisplaymode", or determine whether a certain optional function is visible to the user based on the configuration value corresponding to the target configuration key "carfeaturex".
[0093] In a specific embodiment, the target configuration key is "high beam automatic switching sensitivity threshold". The business model obtains its configuration value as "0.8" from the configuration query system. This configuration value is used to represent: "only when the brightness of the headlights of the vehicle in front exceeds 80% of the preset value will it automatically switch to low beam". Subsequently, the business module sends the configuration value to the corresponding functional module so that the corresponding functional module can set according to the configuration value.
[0094] Next, a specific embodiment will be used to fully describe the present invention. Specifically, after a smart electric vehicle undergoes offline maintenance, the external configuration package is placed in the mount directory. Simultaneously, the vehicle file system also contains a first configuration file in the local asset directory and a compressed configuration package within a resource archive. Upon power-up, the configuration service system running on the vehicle computing platform first obtains the vehicle identifier and configuration level. After confirming the vehicle identifier is ready, it concatenates a fixed prefix, the vehicle identifier, and the configuration level into a TOML format configuration file name according to a preset naming rule, for example, prefix_VIN12345_High.toml.
[0095] Meanwhile, the configuration service system detects the presence of an external configuration package in the mount directory, and the consistency verification module immediately initiates a secure loading process. It first verifies that the mount directory has been successfully mounted and is readable and writable using a preset verification file. Next, it reads the record version number stored in the vehicle and compares it with the configuration version number recorded in the resource description file of the external configuration package. If they are inconsistent, it indicates the presence of a new configuration resource. Subsequently, the consistency verification module copies the entire external configuration package to the candidate resource directory, reads the first digest value from the resource description file, and calculates the second digest value of the copied external configuration package, comparing the two for consistency. If the digest values match, it proves that the copying process was complete and undamaged. Therefore, the record version number is updated to the configuration version number of the external configuration package, and the compressed configuration package in the candidate resource directory is updated using the copied external configuration package.
[0096] Subsequently, the rule parsing module reads and parses configuration mapping files (such as feature.xml) from the compressed configuration package in the candidate resource directory, establishing a configuration mapping set indexed by configuration keys. Each configuration item in the configuration mapping set records the configuration key, the corresponding data source, and location information. For configuration items whose data source is a bit field type, the location information includes the byte index, start bit, and stop bit; for configuration items whose data source is a file configuration type, the location information includes the file path and query key name, and some configuration items also have a conversion key name.
[0097] Meanwhile, the target configuration generation module searches for candidate configuration files based on their configuration file names in the compressed configuration packages under the local asset directory and the candidate resource directory, respectively, and obtains their internal configuration version numbers. After comparison, the second configuration file in the compressed configuration package under the candidate resource directory has a higher configuration version number, and is therefore selected as the currently effective target configuration file. At this point, the configuration service system has completed the loading of the basic environment, the notification module sends an initialization completion notification, and each business module begins to obtain the required configuration data based on the unified configuration interface.
[0098] At this point, a functional module of the vehicle needs to be configured. For example, the cockpit theme display module needs to obtain the current theme display mode. The business module calls the unified query interface provided by the configuration service system, passing in the target configuration key "themedisplaymode". The configuration output module searches in the configuration mapping set and finds a configuration item whose source type is file configuration. The file path in its location information points to the currently effective target configuration file, and the query key name is "themedisplaymode", with the conversion key name being empty. Based on this, the configuration service system reads the key value corresponding to the query key name from the target configuration file through the file system interface, obtaining the configuration value "night", and returns it to the cockpit theme display module along the call path. The cockpit theme display module switches the cockpit theme to night mode based on this configuration value. Throughout the entire process, the business module does not need to care whether the configuration value originates from the local asset directory or a compressed resource package, nor does it need to know its storage format. It only needs a unified key name to obtain the required parameters, significantly reducing the coupling between modules.
[0099] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0100] According to another embodiment, a configuration data query device for vehicles is provided. Figure 5 This diagram illustrates a schematic block diagram of a configuration data query device for a vehicle according to one embodiment, the device being disposed in... Figure 1 The configuration service system in the illustrated architecture. For example... Figure 5 As shown, the device 500 includes an acquisition unit 501, a receiving unit 502, a query unit 503, an extraction unit 504, and a return unit 505, and further includes a file determination unit 506 and a directory update unit 507. The main functions of each component unit are as follows: The acquisition unit 501 is configured to acquire a preset set of configuration mappings for multiple data sources for the vehicle. The set of configuration mappings includes multiple configuration items, each including a configuration key, the data source corresponding to the configuration key, and the location information of the configuration key.
[0101] The receiving unit 502 is configured to receive query requests for a target configuration key.
[0102] Query unit 503 is configured to determine the data source corresponding to the target configuration key and the location information of the target configuration key from the configuration mapping set based on the query request.
[0103] Extraction unit 504 is configured to extract the configuration value of the target configuration key based on the data source corresponding to the target configuration key and the location information of the target configuration key.
[0104] Return unit 505 is configured to return a configuration value, which is used to control at least one functional module of the vehicle.
[0105] As one possible approach, the data source can be either a bit field type or a file configuration type. If the data source corresponding to the configuration key is a bit field type, the location information of the configuration key includes the byte index, start bit, and stop bit. If the data source corresponding to the configuration key is a file configuration type, the location information of the configuration key includes the file path and the query key name.
[0106] As one possible implementation method, the extraction unit 504, when extracting the configuration value of the target configuration key based on the data source corresponding to the target configuration key and the location information of the target configuration key, can be specifically configured as follows: if the data source corresponding to the target configuration key belongs to a bit field type, the corresponding byte is located from the bit field byte array corresponding to the data source based on the byte index in the location information of the target configuration key, and the configuration value of the target configuration key is parsed from the corresponding byte based on the start and stop bits in the location information of the target configuration key; if the data source corresponding to the target configuration key belongs to a file configuration type, the target configuration file is located based on the file path in the location information of the target configuration key, and the configuration value of the target configuration key corresponding to the query key name is obtained from the target configuration file based on the query key name in the location information of the target configuration key.
[0107] As one possible approach, if the data source corresponding to the configuration key is of the file configuration type, the location information of the configuration key also includes the conversion key name.
[0108] When the extraction unit 504 retrieves the configuration value of the target configuration key corresponding to the query key name from the target configuration file based on the query key name in the location information of the target configuration key, it can be specifically configured as follows: in response to the transformation key name being empty in the location information of the target configuration key, the configuration value of the target configuration key corresponding to the query key name is retrieved from the target configuration file based on the query key name in the location information of the target configuration key.
[0109] Extraction unit 504 can also be configured to: in response to the fact that the conversion key name in the location information of the target configuration key is not empty, obtain the configuration value of the target configuration key corresponding to the conversion key name from the target configuration file based on the conversion key name in the location information of the target configuration key.
[0110] As one possible implementation method, when the query unit 503 determines the data source corresponding to the target configuration key and the location information of the target configuration key from the configuration mapping set based on the query request, it can be specifically configured to: perform a query in the configuration mapping set based on the query request, and in response to the existence of a configuration item corresponding to the target configuration key in the configuration mapping set, obtain the data source corresponding to the target configuration key and the location information of the target configuration key from the configuration item corresponding to the target configuration key.
[0111] As one possible implementation, the extraction unit 504 can also be configured to: in response to the absence of a configuration item corresponding to the target configuration key in the configuration mapping set, obtain the target configuration file; determine the query key name of the target configuration key based on the query request; and obtain the configuration value of the target configuration key corresponding to the query key name from the target configuration file based on the query key name of the target configuration key.
[0112] As one possible implementation method, the extraction unit 504 can also be configured to: if it fails to obtain the configuration value of the target configuration key corresponding to the query key name from the target configuration file, the preset default value will be determined as the configuration value of the target configuration key.
[0113] As one possible implementation method, the file determination unit 506, when determining the target configuration file, can be specifically configured to: obtain the vehicle identifier and configuration level; generate a configuration file name based on the vehicle identifier and configuration level; obtain a first configuration file from the local asset directory and a second configuration file from the compressed configuration package under the candidate resource directory based on the configuration file name; if the configuration version number of the first configuration file is higher than the configuration version number of the second configuration file, the first configuration file is determined as the target configuration file; otherwise, the second configuration file is determined as the target configuration file.
[0114] As one possible implementation method, the directory update unit 507, when updating the compressed configuration package under the candidate resource directory, can be specifically configured as follows: in response to the existence of an external configuration package in the mount directory, obtain the resource description file of the external configuration package, the resource description file of the external configuration package including the configuration version number of the external configuration package and the first digest value of the external configuration package; determine whether the record version number of the vehicle is inconsistent with the configuration version number of the external configuration package; if so, copy the external configuration package to the candidate resource directory to obtain the copied external configuration package; determine the second digest value of the copied external configuration package, if the second digest value is consistent with the first digest value, update the record version number to the configuration version number of the external configuration package, and use the copied external configuration package to update the compressed configuration package under the candidate resource directory.
[0115] As one possible implementation method, when updating the compressed configuration package in the candidate resource directory, the directory update unit 507, in response to detecting a change in the vehicle's record version number, copies the upgrade configuration package in the upgrade resource directory to the candidate resource directory to obtain the copied upgrade configuration package; obtains the resource description file of the upgrade configuration package, which includes the third digest value of the resource configuration package; determines the fourth digest value of the copied upgrade configuration package, and if the fourth digest value is consistent with the third digest value, updates the compressed configuration package in the candidate resource directory using the copied upgrade configuration package.
[0116] As one possible implementation method, when obtaining the preset configuration mapping set of multiple data sources for the vehicle, the acquisition unit 501 can be specifically configured to: obtain the configuration mapping file from the compressed configuration package under the candidate resource directory; parse the configuration mapping file to obtain the preset configuration mapping set of multiple data sources for the vehicle.
[0117] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments. 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. Those skilled in the art can understand and implement this without creative effort.
[0118] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0119] In addition, embodiments of this application also provide a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the method described in any of the foregoing method embodiments.
[0120] And an electronic device, comprising: One or more processors; and A memory associated with the one or more processors, the memory being used to store program instructions that, when read and executed by the one or more processors, perform the steps of the method described in any of the foregoing method embodiments.
[0121] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the method described in any of the foregoing method embodiments.
[0122] in, Figure 6 An exemplary architecture of an electronic device is shown, which may include a processor 610, a video display adapter 611, a disk drive 612, an input / output interface 613, a network interface 614, and a memory 620. The processor 610, video display adapter 611, disk drive 612, input / output interface 613, network interface 614, and memory 620 can communicate with each other via a communication bus 630.
[0123] The processor 610 can be implemented using a general-purpose CPU, microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits to execute relevant programs and implement the technical solution provided in this application.
[0124] The memory 620 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 620 can store the operating system 621 for controlling the operation of the electronic device 600, and the basic input / output system (BIOS) 622 for controlling the low-level operations of the electronic device 600. Additionally, it can store a web browser 623, a data storage management system 624, and a vehicle virtual interior display device 500, etc. The aforementioned vehicle virtual interior display device 500 can be the application program that specifically implements the aforementioned steps in this embodiment. In summary, when implementing the technical solution provided in this application through software or firmware, the relevant program code is stored in the memory 620 and executed by the processor 610.
[0125] Input / output interface 613 is used to connect input / output modules to realize information input and output. Input / output modules can be configured as components in the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touch screens, microphones, various sensors, etc., and output devices may include displays, speakers, vibrators, indicator lights, etc.
[0126] Network interface 614 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0127] Bus 630 includes a pathway for transmitting information between various components of the device, such as processor 610, video display adapter 611, disk drive 612, input / output interface 613, network interface 614, and memory 620.
[0128] It should be noted that although the above-described device only shows the processor 610, video display adapter 611, disk drive 612, input / output interface 613, network interface 614, memory 620, bus 630, etc., in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the solution of this application, and does not necessarily include all the components shown in the figures.
[0129] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that this application 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 computer program product. This computer program 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, server, or network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of this application.
[0130] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for querying configuration data of vehicles, characterized in that, The method includes: Obtain a preset configuration mapping set for multiple data sources for the vehicle. The configuration mapping set includes multiple configuration items, each including a configuration key, the data source corresponding to the configuration key, and the location information of the configuration key. Receive query requests for the target configuration key; Based on the query request, the data source corresponding to the target configuration key and the location information of the target configuration key are determined from the configuration mapping set; Based on the data source corresponding to the target configuration key and the location information of the target configuration key, extract the configuration value of the target configuration key; Return the configuration value, which is used to control at least one functional module of the vehicle.
2. The method according to claim 1, characterized in that, The data source belongs to either bit field type or file configuration type; If the data source corresponding to the configuration key belongs to the bit field type, the position information of the configuration key includes the byte index, start bit, and stop bit; If the data source corresponding to the configuration key belongs to the file configuration type, the location information of the configuration key includes the file path and the query key name.
3. The method according to claim 2, characterized in that, The step of extracting the configuration value of the target configuration key based on the data source corresponding to the target configuration key and the location information of the target configuration key includes: If the data source corresponding to the target configuration key belongs to the bit field type, the corresponding byte is located from the bit field byte array corresponding to the data source based on the byte index in the position information of the target configuration key, and the configuration value of the target configuration key is parsed from the corresponding byte based on the start bit and the end bit in the position information of the target configuration key; If the data source corresponding to the target configuration key belongs to the file configuration type, the target configuration file is located based on the file path in the location information of the target configuration key, and the configuration value of the target configuration key corresponding to the query key name is obtained from the target configuration file based on the query key name in the location information of the target configuration key.
4. The method according to claim 3, characterized in that, If the data source corresponding to the configuration key belongs to the file configuration type, the location information of the configuration key also includes the conversion key name; The step of retrieving the configuration value of the target configuration key corresponding to the query key name from the target configuration file based on the query key name in the location information of the target configuration key includes: In response to the fact that the transformation key name in the location information of the target configuration key is empty, the configuration value of the target configuration key corresponding to the query key name is obtained from the target configuration file based on the query key name in the location information of the target configuration key; The method further includes: In response to the fact that the conversion key name in the location information of the target configuration key is not empty, the configuration value of the target configuration key corresponding to the conversion key name is obtained from the target configuration file based on the conversion key name in the location information of the target configuration key.
5. The method according to claim 1, characterized in that, The step of determining the data source corresponding to the target configuration key and the location information of the target configuration key from the configuration mapping set based on the query request includes: Based on the query request, a query is performed in the configuration mapping set. In response to the existence of a configuration item corresponding to the target configuration key in the configuration mapping set, the data source corresponding to the target configuration key and the location information of the target configuration key are obtained from the configuration item corresponding to the target configuration key.
6. The method according to claim 5, characterized in that, Before returning the configuration value, the method further includes: In response to the absence of a configuration item corresponding to the target configuration key in the configuration mapping set, the target configuration file is obtained; Based on the query request, determine the query key name of the target configuration key; Based on the query key name of the target configuration key, the configuration value of the target configuration key corresponding to the query key name is obtained from the target configuration file.
7. The method according to claim 6, characterized in that, Before returning the configuration value, the method further includes: If it fails to retrieve the configuration value of the target configuration key corresponding to the query key name from the target configuration file, the default value will be set as the configuration value of the target configuration key.
8. The method according to any one of claims 3, 4, 6 and 7, characterized in that, The target configuration file is determined in the following way: Obtain vehicle identification and configuration level; Generate a configuration file name based on the vehicle identifier and the configuration level; Based on the configuration file name, obtain the first configuration file from the local asset directory and the second configuration file from the compressed configuration package under the candidate resource directory; If the configuration version number of the first configuration file is higher than the configuration version number of the second configuration file, the first configuration file is determined as the target configuration file; otherwise, the second configuration file is determined as the target configuration file.
9. The method according to claim 8, characterized in that, The compressed configuration package under the candidate resource directory is updated in the following way: In response to the existence of an external configuration package in the mount directory, the resource description file of the external configuration package is obtained. The resource description file of the external configuration package includes the configuration version number of the external configuration package and the first digest value of the external configuration package. Determine whether the record version number of the vehicle is inconsistent with the configuration version number of the external configuration package; If so, copy the external configuration package to the candidate resource directory to obtain the copied external configuration package; Determine the second digest value of the copied external configuration package. If the second digest value is consistent with the first digest value, update the record version number to the configuration version number of the external configuration package, and use the copied external configuration package to update the compressed configuration package under the candidate resource directory.
10. The method according to claim 8, characterized in that, The compressed configuration package under the candidate resource directory is updated in the following way: In response to the detection of a change in the record version number of the vehicle, the upgrade configuration package under the upgrade resource directory is copied to the candidate resource directory to obtain the copied upgrade configuration package; Obtain the resource description file of the upgrade configuration package, wherein the resource description file of the upgrade configuration package includes the third digest value of the resource configuration package; Determine the fourth digest value of the copied upgrade configuration package. If the fourth digest value is consistent with the third digest value, update the compressed configuration package under the candidate resource directory using the copied upgrade configuration package.
11. The method according to claim 1, characterized in that, The step of obtaining a preset set of configuration mappings for multiple data sources for the vehicle includes: Obtain the configuration mapping file from the compressed configuration package in the candidate resource directory; The configuration mapping file is parsed to obtain a set of preset configuration mappings for multiple data sources for the vehicle.
12. A configuration data query device for vehicles, characterized in that, The device includes: The acquisition unit is configured to acquire a preset set of configuration mappings for multiple data sources for the vehicle. The set of configuration mappings includes multiple configuration items, each including a configuration key, a data source corresponding to the configuration key, and location information of the configuration key. The receiving unit is configured to receive query requests for a target configuration key; The query unit is configured to determine, based on the query request, the data source corresponding to the target configuration key and the location information of the target configuration key from the configuration mapping set; The extraction unit is configured to extract the configuration value of the target configuration key based on the data source corresponding to the target configuration key and the location information of the target configuration key; The return unit is configured to return the configuration value, which is used to control at least one functional module of the vehicle.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the method according to any one of claims 1 to 11.
14. An electronic device, characterized in that, include: One or more processors; as well as A memory associated with the one or more processors, the memory being used to store program instructions that, when read and executed by the one or more processors, perform the steps of the method according to any one of claims 1 to 11.
15. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program performs the steps of the method described in any one of claims 1 to 11.
