Domain controller configuration method and system, storage medium and program product

The configuration information is generated by the configuration tool and written directly into the ROM of the domain controller, which solves the problem of tedious configuration process of the domain controller, realizes efficient and safe configuration updates, and supports dynamic configuration and safe partition switching.

CN118534875AInactive Publication Date: 2024-08-23上海适宇智能科技有限公司
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202410596486.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-14
Publication Date
2024-08-23
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The domain controller configuration process is cumbersome and inefficient, requiring the entire project file to be recompiled, resulting in low configuration efficiency and insufficient security.

Method used

Provides a domain controller configuration method. Configuration information, including data to be configured and storage address, is generated through a configuration tool and written directly into the ROM of the domain controller. It supports dynamic configuration and takes effect during operation. The data to be configured uses ROM. Partition switching and write protection functions ensure the security and efficiency of configuration updates.

Benefits of technology

It significantly simplifies the configuration process of domain controllers, improves configuration efficiency and security, supports dynamic configuration, avoids unavailability caused by configuration update errors, and reduces the demand for transmission bandwidth.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118534875A
    Figure CN118534875A
Patent Text Reader

Abstract

The invention relates to the technical field of automobiles, and provides a domain controller configuration method and system, a storage medium and a program product. The domain controller configuration method comprises the steps that a configuration tool generates configuration information and sends the configuration information to a domain controller, and the configuration information comprises to-be-configured data and a storage address of the to-be-configured data; the domain controller receives the configuration information and writes the to-be-configured data into an ROM of the domain controller according to a storage address of the to-be-configured data in the configuration information; and the domain controller takes effect of the to-be-configured data. According to the method, when a configuration tool generates configuration information, a storage address of to-be-configured data in an ROM (Read Only Memory) has been planned, so that after a domain controller receives the configuration information, the to-be-configured data can be directly written into a proper position in the ROM based on the address in the configuration information, and configuration updating is completed; and the whole project file does not need to be recompiled, so that the configuration process of the domain controller is remarkably simplified, and the configuration efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of automobile technology, and in particular to a domain controller configuration method and system, a storage medium and a program product. Background Art

[0002] The emergence of the Domain Control Unit (DCU) stems from a series of problems such as the lengthening of the bus caused by the increase in the number of Electronic Control Units (ECUs) in the development of automobiles. The scattered ECUs are divided according to functional domains, integrated and upgraded into domain controllers with stronger computing power. Different vehicle manufacturers have their own design concepts for the specific division of functional domains. For example, some manufacturers divide them according to the power domain, chassis domain, cockpit domain, autonomous driving domain, and body domain.

[0003] During the development and testing of domain controllers, it is often necessary to configure the domain controllers. The current configuration process includes: determining the configuration list that needs to be modified, modifying the configuration according to the configuration list to generate a configuration file, replacing the original configuration file with the new configuration file, compiling the project file to generate a burn-in file, and flashing the burn-in file into the domain controller. It can be seen that the configuration process is cumbersome and the configuration efficiency is low. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a domain controller configuration method and system, storage medium and program product to improve the above technical problems.

[0005] To achieve the above objectives, this application provides the following technical solutions:

[0006] In a first aspect, an embodiment of the present application provides a domain controller configuration method, wherein the domain controller is applied to a vehicle, and the method comprises: a configuration tool generates configuration information, and sends the configuration information to the domain controller, wherein the configuration information comprises data to be configured and a storage address of the data to be configured; the domain controller receives the configuration information, and writes the data to be configured into a read-only memory (ROM) of the domain controller according to the storage address of the data to be configured in the configuration information; and the domain controller validates the data to be configured.

[0007] When generating configuration information, the configuration tool in the above method has planned the storage address of the data to be configured in the ROM, so that after receiving the configuration information, the domain controller can directly write the data to be configured to the appropriate location in the ROM based on the address therein, thereby completing the configuration update without the need to recompile the entire project file, thereby significantly simplifying the configuration process of the domain controller and improving the configuration efficiency. In addition, this configuration method can be executed during the operation of the domain controller, that is, the domain controller can be dynamically configured.

[0008] In an implementation of the first aspect, the domain controller validates the data to be configured, including: the domain controller restarts based on the ROM in which the data to be configured is written, so as to validate the data to be configured.

[0009] In the above implementation, newly configured data can be quickly put into effect by restarting the domain controller.

[0010] In an implementation of the first aspect, the ROM includes a first partition and a second partition, only one of the two partitions is in a running state at the same time, and the running state of the partition is marked by a startup flag; the domain controller writes the data to be configured into the ROM according to the storage address of the data to be configured in the configuration file, including: if the domain controller determines that the startup flag indicates running the first partition, then according to the storage address of the data to be configured in the configuration file, the data to be configured is written into the second partition, and the startup flag is set to indicate running the second partition; if the domain controller determines that the startup flag indicates running the second partition, then according to the storage address of the data to be configured in the configuration file, the data to be configured is written into the first partition, and the startup flag is set to indicate running the first partition; the domain controller restarts based on the ROM with the data to be configured written, including: the domain controller restarts based on the partition indicated to be running by the startup flag.

[0011] In the above implementation, since the ROM of the domain controller includes two partitions, the act of writing the data to be configured into the ROM will not affect the normal operation of the current partition. The domain controller can be restarted at an appropriate time (such as when parking) to switch the running partition, so that the configuration update process can be carried out safely and smoothly.

[0012] In an implementation of the first aspect, the method further includes: if the domain controller fails to restart the partition running based on the startup flag indication, and the number of consecutive failures exceeds a threshold, setting the startup flag to indicate that another partition of the two partitions is running, and restarting based on the other partition.

[0013] In the above implementation, if the domain controller fails to restart continuously based on the partition after the configuration update, it can be changed to run based on the partition before the configuration update, thereby avoiding the situation where the domain controller is unavailable due to configuration update errors and improving the security of the configuration process.

[0014] In an implementation of the first aspect, the configuration information also includes a write flag corresponding to each item of data to be configured; the domain controller writes the data to be configured into the ROM according to the storage address of the data to be configured in the configuration information, including: if the write flag corresponding to an item of data to be configured indicates that writing is required, then the domain controller writes the data to be configured into the ROM according to the storage address of the data to be configured in the configuration information.

[0015] In the above implementation, the write flag is set to control whether each item of data to be configured in the configuration information is to be written into the ROM, so that the writing of the data to be configured is more accurate, flexible and efficient.

[0016] In an implementation of the first aspect, before the configuration tool sends the configuration information to the domain controller, the method further includes: the configuration tool compressing the configuration information; before the domain controller writes the data to be configured into the ROM according to the storage address of the data to be configured in the configuration information, the method further includes: the domain controller decompressing the configuration information.

[0017] In the above implementation, the configuration tool compresses the configuration information before transmission, which is beneficial to reduce the amount of data to be transmitted, thereby reducing the demand for transmission bandwidth and improving configuration efficiency.

[0018] In an implementation of the first aspect, before the configuration tool sends the configuration information to the domain controller, the method further includes: the configuration tool verifying the configuration information to determine input correctness of the configuration information.

[0019] In the above implementation, by verifying the correctness of the input configuration information, it is helpful to reduce configuration errors and improve the security of the configuration process.

[0020] In an implementation of the first aspect, before the configuration tool sends the configuration information to the domain controller, the method further includes: the configuration tool sends a key to the domain controller; the domain controller verifies the key and sends a verification result to the configuration tool; and the configuration tool determines that the verification result is verification passed.

[0021] In the above implementation, the use authority of the configuration function is controlled through key verification, which is conducive to improving the security of the configuration process.

[0022] In an implementation manner of the first aspect, after the domain controller receives the configuration information, the method further includes: the domain controller verifying the configuration information to determine transmission correctness of the configuration information.

[0023] In the above implementation, by verifying the transmission correctness of the configuration information, it is helpful to reduce configuration errors and improve the security of the configuration process.

[0024] In an implementation of the first aspect, before the domain controller writes the data to be configured into the ROM according to the storage address of the data to be configured in the configuration information, the method includes: the domain controller releases the write protection function of the ROM; after the domain controller writes the data to be configured into the ROM of the domain controller according to the storage address of the data to be configured in the configuration information, the method includes: the domain controller enables the write protection function of the ROM.

[0025] In the above implementation, a write protection function is provided for the ROM of the domain controller, and the write protection function is temporarily released only when data needs to be written, thereby preventing the data in the ROM from being tampered with arbitrarily and improving the security of the configuration process.

[0026] In an implementation of the first aspect, the data to be configured includes at least one of the following data: system / driver Os / Driver layer data: including tasks in the real-time operating system and parameters in the underlying driver software; middleware layer data: including a diagnostic protocol stack, a communication protocol stack and a database; runtime environment (RTE) layer data: including interface functions of the application layer calling the Os / Driver layer; application layer data: including executable files of the application.

[0027] In the above implementation, it is supported to configure the data of each layer in the domain controller software stack, so that the domain controller can be customized in various dimensions to meet the testing needs of different users. In addition, each layer of data follows the same configuration logic, and the configuration process is simple and efficient. In addition, the above layers are compatible with the AUTomotiveOpen System Architecture (AUTOSAR), which makes the configuration method have a wide range of applicability.

[0028] In an implementation of the first aspect, the data to be configured includes the switch status of the function in the diagnostic protocol stack and / or the diagnostic database, and the method also includes: the domain controller starts the diagnostic service according to the switch status, and the diagnostic service uses the enabled function in the diagnostic protocol stack; the domain controller receives the diagnostic request sent by the diagnostic instrument through the diagnostic service, searches the diagnostic database according to the diagnostic request, and if the diagnostic request matches a known fault in the diagnostic database, calls the RTE interface function corresponding to the diagnostic request to obtain fault data, and returns the fault data to the diagnostic instrument.

[0029] In the above implementation, by configuring the diagnostic protocol stack and / or the diagnostic database, the diagnostic function of the domain controller can be better supported.

[0030] In an implementation of the first aspect, the configuration tool includes configuration software and a host computer, the host computer is installed on the domain controller and is detachable, the configuration software is deployed on the host computer, and / or the configuration software is deployed on a remote server, and the server and the host computer exchange data through a network.

[0031] In the above implementation, if the configuration software is deployed on the server, the remote configuration of the domain controller can be realized through the host computer. If the configuration software is deployed on the host computer, the local configuration of the domain controller can be realized, and the local configuration does not depend on the network. Alternatively, the configuration software can be deployed on the server and the host computer at the same time. When the server and the host computer are interconnected, remote configuration is mainly used. When the server cannot be interconnected with the host computer network, local configuration can be performed directly on the host computer, that is, the configuration of the domain controller can be realized in different scenarios. In addition, the host computer is detachable. It can be installed on the domain controller during the development and testing phase of the domain controller, and the host computer can be removed during the mass production phase to save manufacturing costs.

[0032] In a second aspect, an embodiment of the present application provides a domain controller configuration system, comprising: a configuration tool, used to generate configuration information and send the configuration information to the domain controller, wherein the configuration information includes data to be configured and a storage address of the data to be configured; a domain controller, used to receive the configuration information and, according to the storage address of the data to be configured in the configuration information, write the data to be configured into the ROM of the domain controller, and validate the data to be configured.

[0033] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are read and executed by a processor, the method provided by the first aspect or any one of the implementations of the first aspect is executed.

[0034] In a fourth aspect, an embodiment of the present application provides a computer program product, comprising computer program instructions, which, when read and executed by a processor, execute the method provided by the first aspect or any one of the implementations of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0036] Figure 1 A deployment method of the configuration tool provided in an embodiment of the present application is shown;

[0037] Figure 2 Another deployment method of the configuration tool provided in the embodiment of the present application is shown;

[0038] Figure 3 A possible process of the domain controller configuration method provided in an embodiment of the present application is shown;

[0039] Figure 4 Another possible process of the domain controller configuration method provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0040] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.

[0041] The terms "comprises," "comprising," or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.

[0042] Relational terms such as "first" and "second" and the like are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.

[0043] Figure 1 A deployment method of the configuration tool provided in the embodiment of the present application is shown. Figure 1 The domain controller here refers to the domain controller used in the vehicle. The domain controller can be installed in the vehicle or in a simulation test environment. The specific type of the domain controller is not limited. For example, it can be a domain controller in the body domain, a domain controller in the chassis domain, and so on.

[0044] The domain controller includes a main control chip and other hardware units. These circuit elements can be installed on a printed circuit board (PCB). The main control chip is responsible for the overall control and scheduling of the domain controller. For example, the main control chip can be a microcontroller unit (MCU), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, and discrete hardware components. The number of main control chips can be one or more. Figure 1 Only one is shown.

[0045] The main control chip is internally provided with a ROM for storing the data and / or computer program instructions required for the operation of the domain controller. The main control chip can read these instructions and data and execute them to realize the corresponding functions. The ROM here is erasable, for example, it can be a programmable read-only memory (Programmable Read-Only Memory, referred to as PROM), an erasable programmable read-only memory (Erasable Programmable Read-Only Memory, referred to as EPROM), an electrically erasable programmable read-only memory (Electric Erasable Programmable Read-Only Memory, referred to as EEPROM), a flash memory, etc. Optionally, the ROM can also be located outside the main control chip, but can be accessed by the main control chip, so that the ROM can also be called the ROM of the domain controller.

[0046] The configuration tool is used to configure the domain controller, that is, the configuration information can be written into the ROM of the domain controller to add or update the configuration information originally stored in the ROM. The configuration tool includes configuration software and a host computer, wherein the host computer is installed on the domain controller and is detachable, and the host computer can exchange data with the domain controller through a specific interface, such as an Ethernet interface, a controller area network (Controller Area Network, CAN) interface, a serial interface, etc. The configuration software is deployed on a remote server (relative to the domain controller), and the server and the host computer exchange data through a network, such as the Internet.

[0047] The configuration software may further include a front-end page and a back-end service. The user may access the front-end page through the terminal device (referred to as user terminal, such as a mobile phone, PC, etc.) used by the user, and perform visual configuration operations on the front-end page. The back-end service generates configuration information in response to these operations, and sends the configuration information to the host computer. The host computer is located between the configuration software and the domain controller, and it mainly plays the role of communication transfer, and is responsible for forwarding the received configuration information to the domain controller, and finally writes it into the ROM of the domain controller. Of course, it is not ruled out that the host computer will process the configuration information in the process of forwarding the configuration information. It should be understood that although the host computer is a hardware device, software is also run on it, which is responsible for coordinating the hardware to complete the transfer of configuration information. Optionally, the configuration software may not include the front-end page, and for example, the back-end service may also be accessed through a command line tool.

[0048] In the development and testing phase of the domain controller, it is often necessary to configure the domain controller, for example, it is necessary to repeatedly configure the values ​​of certain parameters to calibrate their optimal values. At this time, the host computer needs to be installed on the domain controller to receive the configuration information and forward it to the domain controller. In the mass production phase of the domain controller, since the configuration of the domain controller has been basically fixed and will not be easily changed, the host computer can be removed to save manufacturing costs. Of course, after the host computer is removed, the domain controller can also interact with the outside world through other means to realize functions such as Over-the-Air Technology (OTA). Of course, it is not ruled out that the host computer is retained after the mass production of the domain controller, that is, it is not ruled out that the domain controller is continued to be configured using the configuration software and the host computer after the mass production of the domain controller. In addition, in some implementations, the functions of the host computer may also be integrated into the domain controller, rather than as a separate hardware device.

[0049] Figure 1Mainly for the situation where the server and the host computer can communicate with each other through the network, the configuration software can realize the remote configuration of the domain controller through the host computer, so that the user does not have to go to the site to configure the domain controller, which significantly reduces the operation and maintenance burden.

[0050] Figure 2 Another deployment method of the configuration tool provided in the embodiment of the present application is shown. Figure 2 , Figure 2 Domain controllers and Figure 1 Similarly, no further elaboration is required. The configuration tool also includes configuration software and a host computer, wherein the configuration software is directly deployed on the host computer, and the host computer is installed on the domain controller and is detachable, and the host computer can interact with the domain controller through a specific interface. Similarly, the configuration software may further include a front-end page and a back-end service, and the user can access the front-end page through a user terminal, perform visual configuration operations on the front-end page, and the back-end service generates configuration information in response to these operations and sends the configuration information to the domain controller. For example, the user terminal and the host computer can be located in a local area network, so that the front-end page can be accessed based on the local area network protocol. Optionally, the configuration software may not include a front-end page, for example, the back-end service can also be accessed through a command line tool. Optionally, the user terminal may also be directly connected to the host computer by wired means instead of through a local area network and interact with data.

[0051] Figure 2 Mainly for the situation where the server and the host computer cannot communicate through the network (or there is no Internet environment), the configuration software deployed on the host computer can realize the local configuration of the domain controller. Of course, the user needs to be on-site at this time.

[0052] Furthermore, Figure 1 and Figure 2 The deployment methods in can also be combined, that is, the configuration software deploys an instance on the server and the host computer respectively. The functions of these two instances are basically the same. When the server and the host computer are interconnected, the configuration software instance deployed on the server is mainly used for remote configuration. When the server cannot communicate with the host computer network, the configuration software instance deployed on the host computer is used for local configuration. That is, the configuration of the domain controller can be realized in different scenarios.

[0053] Whether Figure 1 still Figure 2 The deployment method of the domain controller provided in the embodiment of the present application is applicable to the method for configuring the domain controller provided in the embodiment of the present application. The method needs to be executed by the configuration tool and the domain controller in cooperation. The specific steps of the method will be described later. It should be pointed out that although Figure 1 and Figure 2The arrows in the figure are all unidirectional, but in practice there may be bidirectional data interaction. For example, after the configuration tool sends configuration information to the domain controller, the domain controller can also return the configuration result to the configuration tool. It should also be pointed out that Figure 1 and Figure 2 This is just an example, and other deployment methods of the configuration tool are possible.

[0054] Figure 3 A possible process of the domain controller configuration method provided in the embodiment of the present application is shown. Figure 3 , the method comprising:

[0055] Step S110: The configuration tool generates configuration information and sends the configuration information to the domain controller.

[0056] The configuration information includes the data to be configured and the storage address of the data to be configured. The data to be configured is the data that needs to be written into the ROM of the domain controller. The storage address here refers to the storage address in the ROM of the domain controller, that is, the address to be written into the data to be configured in step S120. The storage address of each data to be configured is pre-planned when the configuration information is generated, that is, the configuration tool will plan the storage layout of the data in the ROM. The configuration information can be in the form of a file, or it can be just a data stream.

[0057] Configuration information can be generated in a variety of ways: for example, a user can directly create a new configuration file and edit it on the front-end page of the configuration software, and the background service of the configuration software generates configuration information in a specific format or data structure based on the file content edited by the user; for another example, a user can import an existing configuration file (such as a json or xml file) on the front-end page of the configuration software, and can modify the file content on this basis, and the background service of the configuration software generates configuration information in a specific format or data structure based on the file content edited by the user; for another example, a user can directly write a program that calls the interface provided by the configuration software and passes the data to be configured to the configuration software, and the configuration software organizes the data to be configured into the format or data structure required by the configuration information, and so on.

[0058] Note that during configuration, the user can only focus on the content of the data to be configured, while the storage address of the data to be configured in the ROM is automatically planned by the configuration tool to reduce the configuration burden of the user.

[0059] For example, for Figure 1 In the deployment method, the configuration software on the server can generate configuration information and send the configuration information to the host computer, which then sends the configuration information to the domain controller. Figure 2 In the deployment method, the configuration information can be generated by the configuration software on the host computer and sent to the domain controller.

[0060] Step S120: The domain controller receives the configuration information, and writes the data to be configured into the ROM of the domain controller according to the storage address of the data to be configured in the configuration information.

[0061] The domain controller in steps S120 and S130 should be understood to include the hardware of the domain controller and the software of the domain controller, wherein the computer program instructions corresponding to the software of the domain controller need to be written into the ROM of the domain controller in advance (this writing can be done in a traditional way), so that the subsequent operation of the software of the domain controller can implement the steps performed by the domain controller in the domain controller configuration method provided in the embodiment of the present application.

[0062] The domain controller may write all or part of the data to be configured in the configuration information into the ROM, and write according to the storage address in the configuration information. Optionally, the ROM may contain different storage areas, and each time the domain controller writes configuration information, it may write to the same storage area or to different storage areas, as shown in the following examples.

[0063] Step S130: The domain controller validates the data to be configured.

[0064] To validate the data to be configured refers to the operation of making the data to be configured written into the ROM in a usable state. For example, the domain controller can be restarted based on the storage area in the ROM where the data to be configured is written, so as to validate the data to be configured. Among them, restarting the domain controller can mean that the entire domain controller is powered on again, but it can also mean restarting only some components of the domain controller, such as the main control chip. For another example, in the case where only a small number of parameters are changed during the configuration process, it is also possible to simply re-execute the initialization program in the domain controller to validate these parameters. For example, if the baud rate parameters of the CAN module in the domain controller are modified, the modified baud rate can be validated by restarting the initialization program of the CAN module.

[0065] Brief summary Figure 3The method in which the configuration tool in the method has planned the storage address of the data to be configured in the ROM of the domain controller when generating the configuration information, so that after receiving the configuration information, the domain controller can directly write the data to be configured to the appropriate position in the ROM based on the address therein, thereby completing the configuration update without the need to recompile the entire project file. Because the essence of compilation (including static linking) is also to allocate memory addresses for sections and symbols in the target file, the configuration tool in the method of the present application has already planned the storage address for the data to be configured, and there is no need to allocate the address through compilation. Thus, the method significantly simplifies the configuration process of the domain controller and improves the configuration efficiency. In addition, this configuration method can be executed during the operation of the domain controller, that is, the domain controller can be dynamically configured, making the configuration process more flexible and efficient.

[0066] Figure 4 Another possible process of the domain controller configuration method provided in the embodiment of the present application is shown. This process can also be regarded as Figure 3 An embodiment of the process in FIG. Figure 4 , introduces more implementation methods of domain controller configuration methods, in Figure 4 In the figure, the left side is the configuration tool and the right side is the domain controller. The two can exchange data through the Ethernet interface Eth. Figure 4 The main control chip of the domain controller is the MCU, and the ROM of the domain controller is the ROM inside the MCU.

[0067] Step S200: The configuration tool generates configuration information.

[0068] Step S200 can refer to step S110, and the repeated parts will not be elaborated. Optionally, the software in the domain controller is a layered architecture, and each layer is relatively independent. In principle, each layer can only call the interface provided by the layer below and provide an interface for the layer above it. This layered architecture is also called a software stack. For example, the software architecture of the domain controller can be divided from bottom to top into: Os / Driver layer, middleware layer, RTE layer and application layer, and the Os / Driver layer can be connected to the hardware of the domain controller. These layers can also be mapped to each other with the automotive industry standard software architecture AUTOSAR. For example, the Os / Driver layer and the middleware layer can be mapped to the basic software layer in AUTOSAR, the RTE layer can be mapped to the RTE layer in AUTOSAR, and the application layer can be mapped to the application layer in AUTOSAR.

[0069] The data to be configured in the configuration information can be data in any one or more of the above four layers, that is, it supports the configuration of each layer of data in the domain controller software stack, so that the domain controller can be customized in various dimensions to meet the usage requirements of different users for the domain controller. In addition, each layer of data follows the same configuration logic (i.e., the logic of steps S200 to S219), and the configuration process is simple and efficient. Moreover, the compatibility with AUTOSAR also makes the domain controller configuration method provided in the embodiment of the present application have a wider applicability.

[0070] Specifically, the data of each layer are as follows:

[0071] (1) Os / Driver layer data: including tasks in the real-time operating system (the operating system used by the domain controller) and parameters in the underlying driver software (corresponding to various peripherals of the MCU). For example, tasks to be executed in the real-time operating system can be added or deleted through configuration; for example, the CAN driver software can configure the mode (CAN, CANFD), channel, baud rate, frame data (ID, length, interactive interface) and other data; the Local Interconnect Network (LIN) driver software can configure the mode (host, slave), channel, baud rate, frame data (ID, length, interactive interface); the analog to digital conversion (ADC) driver software can configure the channel and other data; the pulse width modulation (PWM) driver software can configure the mode (output, acquisition), frequency, duty cycle, channel and other data; the Ethernet driver software can configure the frame data (target MAC address, length) and other data.

[0072] (2) Middleware layer data: including diagnostic protocol stack, communication protocol stack and database. Taking the diagnostic protocol stack as an example (other protocol stacks can be analyzed similarly), the diagnostic protocol stack is mainly used to support vehicle fault diagnosis. For example, the diagnostic protocol stack of Unified Diagnostic Services (UDS) mainly includes the following three functional modules:

[0073] A: Diagnostic Event Manager (DEM): responsible for processing diagnostic events and storing diagnostic events and data related to diagnostic events. DEM also includes sub-function modules such as diagnostic data identification (DID) and diagnostic trouble code (DTC).

[0074] B: Diagnostic Communication Manager (DCM): responsible for processing the diagnostic request of the external diagnostic instrument. The data of the diagnostic request may be the DID value or the DTC status word. After receiving the diagnostic request, the DCM performs a specific inspection and performs a specific service action (it may be necessary to obtain DTC related information from the DEM), and then sends a positive response or a specific NRC (Negative Response Code) negative response. The DCM also includes sub-function modules such as the diagnostic session layer (DSL), the diagnostic session layer (DSD), and the diagnostic service processing (DSP).

[0075] C: Fault Mitigation Manager (FIM): Disables specific functions of software components based on Event Status. FIM has no sub-functions.

[0076] The data to be configured may include the switch status of each functional module (including sub-functional modules) in the diagnostic protocol stack. The complete functional code of the diagnostic protocol stack is written in advance in the ROM of the MCU. The domain controller can enable or disable the relevant functions in the diagnostic protocol stack based on the switch status in the configuration information, thereby achieving the effect of dynamically generating the diagnostic protocol stack and avoiding the tedious operation of generating the diagnostic protocol stack by recompiling. It should be understood that there are dependencies between some functions of the diagnostic protocol stack, so this dependency needs to be considered when configuring the switch status.

[0077] The data to be configured may also include data used within each functional module (including sub-functional modules) in the diagnostic protocol stack. For example, for the DTC module, if a new diagnostic fault code is to be added, in addition to configuring the new fault code, a series of processing logic executable codes related to the fault code must also be configured.

[0078] The data to be configured may also include data in the diagnostic database. The diagnostic database can be logically regarded as a fault list, which contains known fault identifiers, fault codes or other fault description information, so that fault queries can be performed based on the diagnostic database. If you need to add, delete or modify the fault description information in the diagnostic database, you can configure it in the configuration information.

[0079] (3) RTE layer data: including the interface functions of the application layer calling the Os / Driver layer. The application layer usually cannot directly obtain the values ​​of variables in the Os / Driver layer, and needs to call the interface functions of the RTE layer to obtain them. These interface functions can be increased, decreased or modified through configuration.

[0080] (4) Application layer data: includes the application's executable files, such as .elf files. These executable files can be used to replace the original executable files in the domain controller's application (of course, new ones may also be added), thereby upgrading the application.

[0081] Step S201: The configuration tool performs configuration information input verification.

[0082] Input verification mainly verifies the correctness of the input of configuration information, such as whether the format of the data to be configured is correct, whether the data type is correct, or whether the value is within a reasonable range, etc., especially when the data to be configured is manually input by the user, there may be input errors due to the user's lack of understanding of the data specification or misoperation. Input verification is conducive to reducing configuration errors and improving the security of the configuration process. If the verification passes, continue to execute step S202. If the verification fails, return to step S200. For example, a prompt message can be output to allow the user to modify the format, type, value, etc. of the data to be configured, and regenerate the configuration information based on the modified data to be configured.

[0083] Step S201 is an optional step. It should also be noted that the input verification can be performed after the configuration information is generated, or during the process of generating the configuration information. For example, when the user enters the data to be configured on the front-end page, the verification can be performed in real time, and the user can be reminded to modify the wrong input in time.

[0084] For configuration tools including configuration software and host computer implementation, the input verification of configuration information can be completed in the configuration software. Figure 4 The other steps executed by the configuration tool can also be understood as being mainly completed by the configuration software, and the host computer only plays the role of information transfer.

[0085] Step S202: The configuration tool compresses the configuration information.

[0086] The compression algorithm of the configuration information is not limited, for example, an algorithm based on entropy coding can be used. The configuration information can be compressed as a whole using the same compression algorithm, or a corresponding compression algorithm can be used according to the characteristics of different data to be configured in the configuration information (no compression can also be regarded as a special compression algorithm). If the configuration information is in the form of a file, the compressed configuration information can be in .7z, .zip or private binary file format. The configuration tool compresses the configuration information before transmission, which helps to reduce the amount of data to be transmitted, thereby reducing the demand for transmission bandwidth and improving configuration efficiency.

[0087] Step S202 is an optional step. If step S202 is executed, the configuration information sent in step S207 is compressed configuration information, and accordingly, the configuration information is also decompressed in step S214a or step S214d. If step S202 is not executed, the configuration information sent in step S207 is uncompressed configuration information, and accordingly, there is no need to execute step S214a or step S214d to decompress the configuration information.

[0088] For configuration tools including configuration software and host computer implementation, configuration information compression can be completed in the configuration software. Figure 1 Since the configuration information is compressed in the configuration software, whether it is from the server to the host computer or from the host computer to the domain controller, what is transmitted is compressed configuration information, which is helpful to reduce the demand for transmission bandwidth.

[0089] Step S203: The configuration tool sends the key to the domain controller.

[0090] Step S204: The domain controller receives the key and verifies the key.

[0091] Step S205: The domain controller sends a key verification result signal to the configuration tool.

[0092] Step S206: The configuration tool receives a key verification result signal.

[0093] Steps S203 to S206 are combined for introduction. The key type here is not limited, it can be a symmetric key or an asymmetric key. For a symmetric key, the domain controller can verify whether the received key is consistent with the locally saved key. If they are consistent, the verification passes; otherwise, it fails; for an asymmetric key, the configuration tool can send a private key signature, and the domain controller can use the public key to verify the signature. The key verification result signal includes the key verification result.

[0094] The key may be generated when step S203 is executed, or may be generated earlier and used only in step S203. Optionally, the process of generating the key may involve negotiation between the configuration tool and the domain controller. Figure 4 Optionally, when generating a key, the identity information of the user who is currently using the configuration tool for configuration may also be included, so that the key at this time can be regarded as a request for the user to use the domain controller configuration permission.

[0095] If the domain controller passes the key verification, the domain controller continues to execute step S208 after executing step S205. If the domain controller fails to verify the key, the domain controller returns to step S204 after executing step S205, waiting to receive a new key and re-verify. At the same time, the domain controller also sends a key verification result signal to the configuration tool. If the configuration tool determines that the key verification is passed according to the key verification result signal, the configuration tool continues to execute step S207 after executing step S206, otherwise it returns to step S203 to resend the key.

[0096] Steps S203 to S206 are all optional steps. Through key verification, the use authority of the configuration function is controlled, which is conducive to improving the security of the configuration process. Optionally, steps related to key verification can also be placed before configuration information compression or configuration information input verification.

[0097] Step S207: The configuration tool sends configuration information to the domain controller.

[0098] Step S208: The domain controller receives the configuration information.

[0099] Optionally, when the configuration tool sends the configuration information to the domain controller, the configuration information may be encrypted to further improve the security of the configuration information transmission. The encryption key and the key in step S203 may be the same key or different keys. If the configuration tool encrypts the configuration information when sending it, the domain controller also needs to decrypt it at an appropriate time after receiving the configuration information (for example, in step S214).

[0100] Step S209: The domain controller performs configuration information transmission verification.

[0101] Step S210: The domain controller sends a transmission verification result signal to the configuration tool.

[0102] Step S211: The configuration tool receives a transmission verification result signal.

[0103] Steps S209 to S211 are introduced together. The transmission check mainly checks the transmission correctness of the configuration information. For example, the domain controller can verify the transmission correctness by calculating the hash value or checksum of the configuration information to confirm that the configuration information is not lost, transmitted incorrectly or tampered with during the transmission process. This is conducive to reducing configuration errors and improving the security of the configuration process. The transmission check result signal includes the transmission check result.

[0104] If the domain controller transmission verification passes, the domain controller continues to execute step S212 after executing step S210. If the domain controller transmission verification fails, the domain controller returns to step S208 after executing step S210, waiting to receive new configuration information and re-verify. At the same time, the domain controller also sends a transmission verification result signal to the configuration tool. If the configuration tool determines that the transmission verification passes according to the transmission verification result signal, the configuration tool continues to execute step S219 after executing step S211, otherwise it returns to step S207 to resend the configuration information.

[0105] Steps S209 to S211 are all optional steps. In addition to the domain controller being able to perform transmission verification, if the configuration tool uses Figure 1 In the deployment method in , transmission verification can also be performed on the host computer.

[0106] Step S212: The domain controller releases the ROM write protection of the MCU.

[0107] ROM write protection is a function that comes with the MCU. The domain controller can control the MCU to release or enable this function. When the domain controller configuration is not required, the ROM write protection can be enabled, and data cannot be written to the ROM at this time. When the domain controller configuration is required, the ROM write protection can be temporarily released to allow data to be written to the ROM. In this way, the ROM write protection is in a very limited state of being released (only during steps S212 to S216), which is conducive to reducing the probability of data in the ROM being tampered with and improving the security of the configuration process.

[0108] Step S212 is an optional step. If the ROM of the domain controller does not have a write protection function, or if write protection does not need to be enabled in a special environment (write protection is always maintained in a released state), step S212 may not be performed.

[0109] Step S213: The domain controller writes the configuration information into the file system.

[0110] Step S213 is optional. The domain controller may first write the configuration information into a file system in the form of a file, and then write the configuration information from the file system into a suitable location in the ROM. The file system may be FAT32, NTFS, or other custom file systems.

[0111] Step S214: The domain controller writes the configuration information into the ROM of the MCU.

[0112] In one implementation, the ROM of the MCU includes a first partition and a second partition (of course, other partitions may also be included, but the other partitions are not used to store data to be configured), and only one of the two partitions is in operation at the same time, and the operation status of the partition is marked by a startup flag, which can also be stored in the ROM. A partition is currently in operation, which can be understood as the domain controller currently running based on the computer program instructions and data stored in the partition.

[0113] For example, there are two startup flags A and B in total. Startup flag A indicates the running status of the first partition. Startup flag A=0 indicates that the first partition is not in the running state. Startup flag A=1 indicates that the first partition is in the running state, that is, the computer program instructions and data corresponding to the operation logic currently executed by the domain controller are stored in the first partition; startup flag B indicates the running status of the first partition. Startup flag B=0 indicates that the second partition is not in the running state. Startup flag B=1 indicates that the second partition is in the running state, that is, the computer program instructions and data corresponding to the operation logic currently executed by the domain controller are stored in the second partition; at the same time, at most only one of the startup flag A and the startup flag B has a value of 1.

[0114] If the domain controller determines that the boot flag currently indicates that the first partition is running, for example, boot flag A=1 (boot flag B=0 at this time), then the data to be configured is written into the second partition according to the storage address of the data to be configured in the configuration file; if the domain controller determines that the boot flag currently indicates that the second partition is running, for example, boot flag B=1 (boot flag A=0 at this time), then the data to be configured is written into the first partition according to the storage address of the data to be configured in the configuration file. Optionally, for the case where the ROM includes a first partition and a second partition, the storage address of the data to be configured in the configuration information can be a relative address within each partition (relative to the starting address of the partition). Optionally, the write protection function in the ROM can also be partitioned. For example, if the first partition is to be written at present, it is only necessary to release the write protection of the first partition, and the write protection of the second partition can still remain in the on state.

[0115] The file system in step S213 may be located in another ROM partition outside the first partition and the second partition, but the data in the partition can be recognized by the programs running in the first partition and the second partition, so that the domain controller can read the data to be configured from the file system and write it into the appropriate ROM partition.

[0116] In the above implementation, since the ROM of the domain controller includes two partitions, and the data to be configured is always written to the partition that is not currently running, the behavior of writing the data to be configured into the ROM will not affect the normal operation of the current partition. The domain controller can be restarted at an appropriate time to switch the running partition, so that the configuration update process can be carried out safely and smoothly.

[0117] In an alternative solution, the ROM of the MCU may also include one partition or more partitions, for example, four partitions, only one of the four partitions is in operation at the same time, and the operation status of the partition is marked by a startup flag. The writing logic of the data to be configured can refer to the case of two partitions and will not be elaborated in detail.

[0118] When explaining step S120, it was mentioned that the domain controller can write all or part of the data to be configured in the configuration information into the ROM. Two data writing schemes can be formed for these two situations, corresponding to steps S214a~S214b, and steps S214c~S214e respectively. When executing step S214, you can choose one of these two schemes to execute.

[0119] Scenario 1:

[0120] Step 214a: The domain controller decompresses the configuration information.

[0121] Step 214b: The domain controller writes all configuration data in the configuration information into the ROM of the MCU.

[0122] If step S214a is executed, the configuration information in step S214b should be understood as the decompressed configuration information.

[0123] Solution 2

[0124] Step 214c: The domain controller decompresses the configuration information.

[0125] Step 214d: The domain controller checks the write flag in the configuration information.

[0126] Step 214e: The domain controller writes the configuration data indicated by the write flag in the configuration information into the ROM of the MCU.

[0127] Steps S214c to S214e are combined and described. In one implementation, the configuration information also includes a write flag corresponding to each item of data to be configured, and the write flag indicates whether the data is to be written into the ROM. For example, the write flag corresponding to a certain item of data to be configured can take two values: 0 or 1. A value of 0 indicates that the data to be configured does not need to be written into the ROM, and a value of 1 indicates that the data to be configured needs to be written into the ROM.

[0128] If step S214c is executed, the configuration information in steps S214d and S214e should be understood as the decompressed configuration information. The domain controller checks the write flag corresponding to each item of data to be configured in the configuration information. If the write flag corresponding to an item of data to be configured indicates that it needs to be written, the domain controller writes the item of data to be configured into the ROM according to the storage address of the item of data to be configured in the configuration information, otherwise skips the item of configuration data.

[0129] Optionally, if each item of data to be configured in the configuration information is compressed independently and the corresponding write flag is not compressed, the domain controller may first check the write flag and then decompress only the data to be configured that needs to be written and write it into the ROM.

[0130] In the above implementation, by setting the write flag bit to control whether each item of the to-be-configured data in the configuration information is to be written into the ROM, the writing of the to-be-configured data is made more accurate, flexible, and efficient, and the content of the configuration information can also be kept relatively fixed, making it more convenient to process. As an alternative, when generating the configuration information, the configuration tool may only include the to-be-configured data that needs to be written into the ROM this time, and not include other to-be-configured data, so that the write flag bit may also be omitted.

[0131] Step S215: The domain controller modifies the startup flag.

[0132] Continuing with the example in step S214, if the boot flag currently indicates that the first partition is running, then after the data to be configured is written to the second partition, the domain controller will set the boot flag to indicate that the second partition is running, for example, boot flag B=1 (at this time, boot flag A=0), indicating that the domain controller should switch to running based on the second partition after restart; if the boot flag currently indicates that the second partition is running, then after the data to be configured is written to the first partition, the domain controller will set the boot flag to indicate that the first partition is running, for example, boot flag A=1 (at this time, boot flag B=0), indicating that the domain controller should switch to running based on the first partition after restart.

[0133] Step S216: The domain controller turns on the ROM write protection of the MCU.

[0134] Since the data to be configured has been written into the ROM and the boot flag in the ROM has been modified, the ROM write protection of the MCU can be enabled. As mentioned in step S214, if the ROM write protection supports partition protection, then in step S216, the ROM write protection can be enabled only for the partition that has previously released the ROM write protection.

[0135] Step S217: The domain controller restarts the MCU.

[0136] The MCU of the domain controller can restart based on the partition indicated by the boot flag. For example, in step S215, if the boot flag is set to indicate the operation of the second partition, the restart is based on the second partition, that is, after the MCU is restarted, the domain controller runs based on the computer program instructions and data stored in the second partition; in step S215, if the boot flag is set to indicate the operation of the first partition, the restart is based on the first partition, that is, after the MCU is restarted, the domain controller runs based on the computer program instructions and data stored in the first partition. In this way, by setting the boot flag, the smooth switching of the ROM running partition is completed, and the configuration data written into the ROM is effective.

[0137] If the domain controller is installed in the vehicle, the domain controller can be restarted when the vehicle is parked to avoid the security risks caused by switching ROM partitions. However, in some implementations, it is also possible to restart the domain controller while the vehicle is moving (hot switching), and the risks brought about by this are borne by the user.

[0138] Optionally, if the MCU of the domain controller fails to restart the partition based on the boot flag, it can try to restart based on the partition again, but if the number of consecutive failures exceeds a threshold (the threshold can be an integer greater than or equal to 1), the boot flag can be set to indicate that another partition of the two partitions (referring to the first partition and the second partition) is running, and restart is performed based on the other partition. Of course, in some implementations, when the number of consecutive restart failures exceeds the threshold, it can also be directly confirmed as a configuration failure, and no restart attempt is made.

[0139] For example, in step S215, if the boot flag is set to indicate running the second partition, the MCU is restarted based on the second partition, and if four consecutive restarts fail (the threshold is 3 times), the boot flag is set to indicate running the first partition, and the MCU is restarted based on the first partition. Because the domain controller is running based on the first partition before restarting the MCU based on the second partition, restarting the MCU based on the first partition is likely to succeed.

[0140] In this solution, if the domain controller fails to restart continuously based on the partition after the configuration update, it can be changed to run based on the partition before the configuration update, thereby avoiding the situation where the domain controller is unavailable due to configuration update errors and improving the security of the configuration process. If each configuration update is regarded as a functional upgrade of the domain controller, then this solution can also be understood as rolling back to the version before the upgrade after the upgrade fails to continue running, so that the domain controller can at least work before troubleshooting.

[0141] Step S218: The domain controller sends a configuration result signal to the configuration tool.

[0142] If in step S217, the MCU of the domain controller is successfully restarted, and the partition is successfully restarted based on the configuration update, then the configuration result signal represents a successful configuration; if in step S217, the MCU of the domain controller is successfully restarted, and the partition is successfully restarted based on the configuration update (i.e., the above restart failure exceeds the threshold), then the configuration result signal represents a configuration failure (because the data configured this time has not been successfully applied); if in step S217, the MCU of the domain controller has never been successfully restarted, then the configuration result signal represents a configuration failure; in addition, other factors can also be considered to determine the final value of the configuration result signal. After determining the value of the configuration result signal, the domain controller sends it to the configuration tool.

[0143] Step S219: The configuration tool receives a configuration result signal.

[0144] If the configuration tool determines that the configuration is successful according to the configuration result signal, the configuration process ends; otherwise, the process returns to step S200 and attempts to reconfigure.

[0145] The following are some specific examples to illustrate the application of the domain controller configuration method provided in the embodiment of the present application:

[0146] Example 1: Diagnostic function of domain controller

[0147] When introducing step S200, it is mentioned that the data to be configured may include the switch status of the function in the diagnostic protocol stack and / or the diagnostic database. The following describes a possible process for performing fault diagnosis after the switch status of the function in the diagnostic protocol stack and the diagnostic database are configured according to the steps described above:

[0148] Step 1: The domain controller starts the diagnostic service according to the switch status of the function in the diagnostic protocol stack written in the ROM. The diagnostic service uses the enabled functions in the diagnostic protocol stack. After the diagnostic service is started, it is in a state of waiting to receive requests.

[0149] Step 2: The diagnostic instrument establishes communication with the domain controller through a specific hardware interface and sends a diagnostic request to the domain controller. The diagnostic request may carry information such as the fault ID.

[0150] Step 3: The domain controller receives the diagnostic request sent by the diagnostic instrument through the diagnostic service, and searches the diagnostic database written in the ROM according to the diagnostic request. The diagnostic database can be logically regarded as a fault list, which contains the fault ID, fault code or other fault description information of known faults.

[0151] Step 4: If the diagnostic request matches a known fault in the diagnostic database, for example, the fault ID in the diagnostic request is the same as the fault ID of the known fault, the domain controller calls the RTE interface function corresponding to the diagnostic request (the fault ID) to obtain the fault data. The fault data may include specific fault information, such as the environmental record when the fault occurs. This data may be located at the Os / Driver layer, so it is necessary to call the RTE interface function to obtain it.

[0152] Step 5: The domain controller returns fault data to the diagnostic instrument.

[0153] Step 6: The diagnostic instrument receives the fault data and can display or further analyze the fault data so that the operation and maintenance personnel can understand the cause of the fault and take corresponding operation and maintenance actions.

[0154] During the development and testing phase of the domain controller, the switch status of functions in the diagnostic protocol stack and / or the diagnostic database can be changed through the domain controller configuration method provided in the embodiment of the present application to test whether the diagnostic functions of the domain controller for different faults operate normally.

[0155] Example 2: CAN frame data configuration

[0156] In the project development of the domain controller, the communication on the CAN bus needs to add signals, modify signals or delete signals, etc. The domain controller configuration method provided in the embodiment of the present application can be used to dynamically configure the CAN frame data. Among them, the CAN frame data includes ID, data length and data content. The data content may include signals on the CAN bus. For example, the data length is 8 bytes, and each signal can occupy one or more bits in 8 bytes. Users can add, modify or delete signals on the front-end page provided by the configuration tool. The operation is intuitive and the configuration efficiency is high.

[0157] Example 3: CAN baud rate configuration

[0158] Assume that the baud rate of CAN communication in the domain controller currently has three options: 500, 1000, and 2000. These three baud rates have been written into the ROM of the domain controller, and the ROM also includes a field X to indicate the currently effective baud rate. For example, the value of field X can be 0, 1, or 2, corresponding to the three baud rates of 500, 1000, and 2000, respectively. Assume that the current field X=0, that is, the effective baud rate is 500. According to a test requirement, to change the effective baud rate to 1000, it is only necessary to configure field X to 1 using the domain controller configuration method provided in the embodiment of the present application. After the value of X is written into the ROM and becomes effective, the baud rate used for CAN communication of the domain controller becomes 1000. According to another test requirement, to add a baud rate value of 800, it is necessary to configure the baud rate value of 800 into the ROM, and the value of X may also need to be reconfigured, and the baud rate processing logic in the CAN driver software may also need to be reconfigured to provide support for signals with a baud rate of 800.

[0159] The embodiment of the present application also provides a domain controller configuration system, including:

[0160] A configuration tool, used to generate configuration information and send the configuration information to the domain controller, wherein the configuration information includes data to be configured and a storage address of the data to be configured;

[0161] The domain controller is used to receive the configuration information, and write the data to be configured into the ROM of the domain controller according to the storage address of the data to be configured in the configuration information, and validate the data to be configured.

[0162] The configuration system of the domain controller provided in the embodiment of the present application, its implementation principle and the technical effects produced have been introduced in the embodiment of the aforementioned domain controller configuration method. For the sake of brief description, for matters not mentioned in the system embodiment, reference may be made to the corresponding content in the domain controller method embodiment.

[0163] The present application also provides a computer program product, which includes computer program instructions. When these computer program instructions are read and executed by a processor, the domain controller configuration method provided by the present application is executed. Figure 1 For , the processor here can refer to the processor in the server, host computer and domain controller; for Figure 2 For example, the processor here may refer to a processor in a host computer and a domain controller. For example, the computer program product may be stored in a volatile or non-volatile computer-readable storage medium.

[0164] The present application also provides a computer-readable storage medium on which computer program instructions are stored. When these computer program instructions are read and executed by a processor, the domain controller configuration method provided by the present application is executed. Figure 1 For example, the computer-readable storage medium may refer to a memory in a server, a host computer, or a domain controller; for Figure 2 In the context of the present invention, the computer-readable storage medium may refer to the memory in the host computer and the domain controller. Of course, the computer-readable storage medium may also be an independent memory, such as a hard disk, an optical disk, a USB flash drive, or the like.

[0165] The above description is only an embodiment of the present application and is not intended to limit the scope of protection of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, scheme combination, improvement, etc. made within the spirit and principle of the present application shall be included in the scope of protection of the present application.

Claims

1. A domain controller configuration method, characterized in that: The domain controller is applied to a vehicle, and the method comprises: The configuration tool generates configuration information and sends the configuration information to the domain controller, wherein the configuration information includes the data to be configured and the storage address of the data to be configured; The domain controller receives the configuration information, and writes the data to be configured into a read-only memory ROM of the domain controller according to the storage address of the data to be configured in the configuration information; The domain controller validates the data to be configured.

2. The configuration method according to claim 1, characterized in that: The domain controller validates the data to be configured, including: The domain controller restarts based on the ROM in which the data to be configured is written, so as to make the data to be configured effective.

3. The configuration method according to claim 2, characterized in that: The ROM includes a first partition and a second partition, only one of the two partitions is in operation at the same time, and the operation status of the partition is marked by a startup flag bit; The domain controller writes the data to be configured into the ROM according to the storage address of the data to be configured in the configuration file, including: If the domain controller determines that the startup flag indicates running the first partition, then writing the data to be configured into the second partition according to the storage address of the data to be configured in the configuration file, and setting the startup flag to indicate running the second partition; If the domain controller determines that the startup flag indicates running the second partition, then according to the storage address of the data to be configured in the configuration file, write the data to be configured into the first partition, and set the startup flag to indicate running the first partition; The domain controller restarts based on the ROM in which the data to be configured is written, including: The domain controller restarts the partition running based on the boot flag indication.

4. The configuration method according to claim 3, characterized in that: The method further comprises: If the domain controller fails to restart the partition running based on the startup flag indication, and the number of consecutive failures exceeds a threshold, the startup flag is set to indicate running another partition of the two partitions, and restart is performed based on the other partition.

5. The configuration method according to claim 1, characterized in that: The configuration information also includes a write flag corresponding to each item of data to be configured; The domain controller writes the data to be configured into the ROM according to the storage address of the data to be configured in the configuration information, including: If the write flag corresponding to an item of data to be configured indicates that writing is required, the domain controller writes the item of data to be configured into the ROM according to the storage address of the item of data to be configured in the configuration information.

6. The configuration method according to claim 1, characterized in that: Before the configuration tool sends the configuration information to the domain controller, the method further includes: The configuration tool compresses the configuration information; Before the domain controller writes the data to be configured into the ROM according to the storage address of the data to be configured in the configuration information, the method further includes: The domain controller decompresses the configuration information.

7. The configuration method according to claim 1, characterized in that: Before the configuration tool sends the configuration information to the domain controller, the method further includes: The configuration tool verifies the configuration information to determine whether the configuration information is input correctly.

8. The configuration method according to claim 1, characterized in that: Before the configuration tool sends the configuration information to the domain controller, the method further includes: The configuration tool sends a key to the domain controller; The domain controller verifies the key and sends a verification result to the configuration tool; The configuration tool determines that the verification result is verification passed.

9. The configuration method according to claim 1, characterized in that: After the domain controller receives the configuration information, the method further includes: The domain controller verifies the configuration information to determine the transmission correctness of the configuration information.

10. The configuration method according to claim 1, characterized in that: Before the domain controller writes the data to be configured into the ROM according to the storage address of the data to be configured in the configuration information, the method includes: The domain controller releases the write protection function of the ROM; After the domain controller writes the data to be configured into the ROM of the domain controller according to the storage address of the data to be configured in the configuration information, the method includes: The domain controller enables the write protection function of the ROM.

11. The configuration method according to claim 1, characterized in that: The data to be configured includes at least one of the following types of data: System / Driver layer data: including tasks in the real-time operating system and parameters in the underlying driver software; Middleware layer data: including diagnostic protocol stack, communication protocol stack and database; Runtime environment RTE layer data: including the interface functions that the application layer calls the Os / Driver layer; Application layer data: includes the executable files of the application.

12. The configuration method according to claim 11, characterized in that: The data to be configured includes a switch state of a function in a diagnostic protocol stack and / or a diagnostic database, and the method further includes: The domain controller starts a diagnostic service according to the switch state, and the diagnostic service uses the functions enabled in the diagnostic protocol stack; The domain controller receives the diagnostic request sent by the diagnostic instrument through the diagnostic service, searches the diagnostic database according to the diagnostic request, and if the diagnostic request matches a known fault in the diagnostic database, calls the RTE interface function corresponding to the diagnostic request to obtain fault data, and returns the fault data to the diagnostic instrument.

13. The configuration method according to any one of claims 1 to 12, characterized in that: The configuration tool includes configuration software and a host computer, wherein the host computer is installed on the domain controller and is detachable, the configuration software is deployed on the host computer, and / or the configuration software is deployed on a remote server, and the server and the host computer exchange data via a network.

14. A domain controller configuration system, characterized in that: include: A configuration tool, used to generate configuration information and send the configuration information to the domain controller, wherein the configuration information includes data to be configured and a storage address of the data to be configured; The domain controller is used to receive the configuration information, and write the data to be configured into the ROM of the domain controller according to the storage address of the data to be configured in the configuration information, and validate the data to be configured.

15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are read and executed by a processor, the method according to any one of claims 1 to 13 is executed.

16. A computer program product, characterized in that The method comprises computer program instructions, and when the computer program instructions are read and executed by a processor, the method according to any one of claims 1 to 13 is executed.

Citation Information

Patent Citations

  • System and method for realizing software upgrading control for multiple electronic control units of automobile

    CN110764804A

  • System upgrading method and device, equipment and storage medium

    CN113641390A

  • Driving platform OTA upgrading process control method, system and device and medium

    CN116382739A

  • Software flashing method and device of domain controller, computer equipment and storage medium

    CN117215603A

  • Vehicle central integrated architecture and configuration method and device thereof

    CN117719435A