A method for generating an application layer communication component in an electronic control unit (ECU) of a vehicle
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-29
- Publication Date
- 2026-08-11
AI Technical Summary
本公开实施例中,通过解析ECU关联的通信矩阵文件,获取每个通道关联的报文数据,然后根据任一通道关联的报文数据,确定该任一通道对应的应用层通信组件的接口定义及功能逻辑,再然后根据接口定义和功能逻辑,以及RTE的映射配置,生成该任一通道关联的应用层通信组件。从而实现了由文件自动生成应用层接口,无需手动配置,有利于提升软件开发效率,并且通过生成应用层通信组件,使得SWC不再直接与底层的、分散的COM信号耦合,能够降低交互的复杂度和耦合度,增强可维护性和可追溯性,保证信号处理逻辑的准确性和鲁棒性。
Smart Images

Figure CN121255150B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of automotive electronic software architecture, and more particularly to a method for generating application layer communication components in an on-board electronic control unit (ECU). Background Technology
[0002] The Automotive Open System Architecture Classic Platform (AUTOSAR CP) is a fundamental standard for automotive embedded software, especially for electronic control units with extremely high requirements for safety, real-time performance, and reliability. It provides key technical support for developing products that meet functional safety standards.
[0003] For example, in hard real-time domains such as chassis, powertrain, and body control, ECUs in these domains typically need to run complex tasks with strong time determinism. Therefore, how to reduce the coupling of interactions within ECUs and enhance maintainability has become a key issue in automotive software development. Summary of the Invention This disclosure aims to at least partially address one of the technical problems in the related art.
[0004] The first aspect of this disclosure provides a method for generating application layer communication components in an on-board electronic control unit (ECU), comprising: The communication matrix file associated with the ECU is parsed to determine the message data associated with each channel in the ECU; Parse the message data associated with any of the channels to determine the interface definition and functional logic of the application layer communication components associated with any of the channels; Based on the interface definition, functional logic, and runtime environment RTE mapping configuration, an application layer communication component associated with any channel is generated. The application layer communication component is used to implement one or more functional software components (SWCs) in the ECU to interact with the communication module (COM) through a port, transmitting data transmitted by any channel. The RTE is used to map the data of the application layer communication component port to the communication object of the COM.
[0005] A second aspect of this disclosure provides an apparatus for generating application layer communication components in an on-board electronic control unit (ECU), comprising: The first determining module is used to parse the communication matrix file associated with the ECU and determine the message data associated with each channel in the ECU; The second determining module is used to parse the message data associated with any of the channels and determine the interface definition and functional logic of the application layer communication component associated with any of the channels. The generation module is used to generate an application layer communication component associated with any channel based on the interface definition, functional logic, and runtime environment RTE mapping configuration. The application layer communication component is used to implement one or more functional software components (SWCs) in the ECU to interact with the communication module (COM) through a port to transmit data transmitted by any channel. The RTE is used to map the data of the application layer communication component port to the communication object of the COM.
[0006] The third aspect of this disclosure provides an in-vehicle electronic control unit (ECU) that transmits data with other ECUs through at least one channel. The ECU includes an application software layer (ASW), a runtime environment (RTE), and a basic software layer (BSW). The ASW includes multiple functional software components (SWCs) and an application layer communication component. Each SWC is used to provide at least one functional service for the vehicle. Each application layer communication component is used to implement one or more functional software components (SWCs) in the ECU, and interact with the communication module (COM) in the BSW through a port to exchange data transmitted by a channel associated with the application layer communication component. The RTE is used to map the data of the application layer communication component port to the communication object of the COM. The BSW includes a COM, which is used for internal data interaction between the ECUs and / or for data interaction between ECUs.
[0007] This disclosure provides a fourth aspect of an in-vehicle control system, comprising: the in-vehicle control system including a plurality of electronic control units (ECUs) as described in the third aspect of the embodiment.
[0008] A fifth aspect of this disclosure provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements a method for generating application layer communication components in an electronic control unit (ECU) as described in a first aspect of this disclosure.
[0009] The method for generating application layer communication components in an on-board electronic control unit (ECU) provided in this disclosure has the following beneficial effects: In this embodiment, the communication matrix file associated with the ECU is parsed to obtain the message data associated with each channel. Then, based on the message data associated with any channel, the interface definition and functional logic of the application layer communication component corresponding to that channel are determined. Finally, based on the interface definition, functional logic, and RTE mapping configuration, the application layer communication component associated with that channel is generated. This achieves automatic generation of application layer interfaces from files, eliminating the need for manual configuration, which improves software development efficiency. Furthermore, by generating application layer communication components, the SWC is no longer directly coupled to the underlying, distributed COM signals, reducing the complexity and coupling of the interaction, enhancing maintainability and traceability, and ensuring the accuracy and robustness of the signal processing logic.
[0010] Additional aspects and advantages of this disclosure will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this disclosure. Attached Figure Description
[0011] The above and / or additional aspects and advantages of this disclosure will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, in which: Figure 1 This is a flowchart illustrating a method for generating application layer communication components in an on-board electronic control unit (ECU) according to an embodiment of this disclosure. Figure 2 This is a flowchart illustrating a method for generating application layer communication components in an in-vehicle electronic control unit (ECU) according to another embodiment of this disclosure. Figure 3 This is a schematic diagram of the structure of an application layer communication component generation device in an on-board electronic control unit (ECU) provided in an embodiment of this disclosure; Figure 4 This is a schematic diagram of the structure of an existing vehicle electronic control unit (ECU). Figure 5 A schematic diagram of the architecture of an in-vehicle electronic control unit (ECU) provided in an embodiment of this disclosure; Figure 6 This is a schematic diagram of the structure of an in-vehicle control system provided in an embodiment of this disclosure. Detailed Implementation
[0012] Embodiments of this disclosure are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this disclosure, and should not be construed as limiting this disclosure.
[0013] The following describes, with reference to the accompanying drawings, a method and apparatus for generating application layer communication components in an on-board electronic control unit (ECU) according to embodiments of the present disclosure, and an on-board electronic control unit (ECU).
[0014] It should be noted that the method for generating application layer communication components in the vehicle electronic control unit (ECU) proposed in this disclosure is mainly used in automotive embedded software development based on AUTOSAR CP, or it can be extended to other embedded systems.
[0015] Figure 1 This is a flowchart illustrating a method for generating application layer communication components in an on-board electronic control unit (ECU) according to an embodiment of this disclosure.
[0016] It should be noted that the method for generating application layer communication components in the vehicle electronic control unit (ECU) of this disclosure can be applied to the device for generating application layer communication components in the vehicle electronic control unit (ECU). In some possible embodiments, the device can be configured in an electronic device so that the electronic device can perform the function of generating application layer communication components.
[0017] like Figure 1 As shown, the method for generating the application layer communication component in the vehicle electronic control unit (ECU) may include the following steps: Step 101: Parse the communication matrix file associated with the ECU to determine the message data associated with each channel in the ECU.
[0018] The communication matrix file is the core document that defines the data interaction rules between electronic control units (ECUs). For example, it can be a Controller Area Network (CAN) communication database file (Database CAN, DBC) or a communication matrix file in other formats.
[0019] The message data can include received messages and sent messages.
[0020] In this embodiment of the disclosure, the communication matrix file associated with the ECU clearly specifies which channel each message is transmitted through. Different channels may correspond to different physical buses, and each physical bus may be used for systems such as the body, powertrain, and chassis. By parsing which message data is transmitted on each channel in the communication matrix file, the message data associated with each channel in the ECU can be determined.
[0021] Step 102: Parse the message data associated with any channel to determine the interface definition and functional logic of the application layer communication component associated with any channel.
[0022] In the embodiments of this application, any channel can be one of all channels, or it can be each channel.
[0023] In this embodiment of the disclosure, the channel-associated application layer communication component refers to the communication middleware layer in the application layer that uniformly manages all interactions and signal transmissions between the communication module (COM) and the software component (SWC). Each channel-associated application layer communication component may contain multiple interfaces for interacting with the COM or SWC respectively, and may also define an interface for each frame message or signal group.
[0024] The interface definition describes the interface's functionality and the attributes of the data it transmits, such as whether the interface connects to COM or SWC, the amount and type of data transmitted, etc.
[0025] Functional logic refers to the rules by which application layer communication components implement data transmission, interaction, and processing. For example, it may include the processing logic for signals used to monitor message updates (such as IsUpdata), as well as the logic for end-to-end (E2E) verification functions.
[0026] In this embodiment, periodic runnable entities can be defined in the message data according to the period of each message frame. A periodic runnable is a software task unit that executes repeatedly at fixed time intervals, enabling periodic functions such as constant speed control and data acquisition. For each message frame, an interface can be defined on the application layer communication component associated with the channel. The attributes of the transmitted data defined for the interface are determined based on the length, precision, and offset of each signal in the message frame. Furthermore, an IsUpdata signal can be defined for each message frame to monitor message updates. Alternatively, if any message frame contains a signal group, since the signal group needs to be received uniformly, an interface can also be defined for each signal group, providing E2E verification. This allows the determination of the interface definition and functional logic of the application layer communication component associated with the channel.
[0027] Step 103: Generate the application layer communication component associated with any channel based on the interface definition, functional logic, and the mapping configuration of the runtime environment RTE.
[0028] The application layer communication component is used to implement one or more functional software components (SWC) in the ECU to interact with the communication module (COM) through a port, transmitting data from any channel. The runtime environment (RTE) is used to map the data of the application layer communication component port to the communication object of the COM.
[0029] The mapping configuration of the runtime environment RTE can be extracted from the communication matrix file associated with the ECU. It describes the relationship between the application layer interface and the underlying communication and can convert the interface signals of the application layer into the underlying communication messages.
[0030] In this embodiment, any SWC generation tool can be used. The interface definition, functional logic, and runtime environment (RTE) mapping configuration are input into the SWC generation tool, which automatically generates the application-layer communication components associated with the channels. This enables automatic generation from files to application-layer interfaces, avoiding extensive manual configuration and coding. Furthermore, because all communication-related interfaces are uniformly planned and implemented by the generator, consistency in the interface style across the entire project is guaranteed, forming a clear layered architecture that is easier to manage.
[0031] In this embodiment, the application layer communication component can have an endpoint that is actually connected to one or more functional software components (SWCs). It serves as an instantiation carrier for the interface, allowing the rules defined by the interface to be implemented in a specific communication link. This enables multiple SWCs to interact with the communication module (COM) through the same application layer communication component when acquiring the same signal (such as a vehicle speed signal).
[0032] It should be noted that, in this embodiment of the disclosure, the message data associated with the channel can be divided into received messages and sent messages. Therefore, two application layer communication components can be generated for each channel, which are responsible for the signal input and output processing of the channel respectively, so as to improve the maintainability and flexibility of the system and avoid signal interference and conflict.
[0033] This disclosure configures an application-layer communication component between the SWC and COM, so that the application-layer SWC is no longer directly coupled with the underlying, distributed COM signals, but interacts through a centralized and stable service layer. This avoids the problems of low reusability and high coupling that need to be defined between COM and each SWC when a signal is used by multiple SWCs. It can effectively reduce complexity and coupling, and reduce code redundancy.
[0034] In this embodiment, the communication matrix file associated with the ECU is parsed to obtain the message data associated with each channel. Then, based on the message data associated with any channel, the interface definition and functional logic of the application layer communication component corresponding to that channel are determined. Finally, based on the interface definition, functional logic, and RTE mapping configuration, the application layer communication component associated with that channel is generated. This achieves automatic generation of application layer interfaces from files, eliminating the need for manual configuration, which improves software development efficiency. Furthermore, by generating application layer communication components, the SWC is no longer directly coupled to the underlying, distributed COM signals, reducing the complexity and coupling of the interaction, enhancing maintainability and traceability, avoiding errors that may be introduced by manual coding, and ensuring the accuracy and robustness of the signal processing logic.
[0035] Figure 2 This is a flowchart illustrating a method for generating application layer communication components in an on-board electronic control unit (ECU) according to an embodiment of this disclosure. Figure 2 As shown, the method for generating the application layer communication component in the vehicle electronic control unit (ECU) may include the following steps: Step 201: Parse the communication matrix file associated with the ECU to determine the message data associated with each channel in the ECU.
[0036] For a detailed description of step 201, please refer to other embodiments of this disclosure, which will not be repeated here.
[0037] Step 202: parse any frame of message data associated with any channel to determine the period and signal information contained in any frame of message data.
[0038] Signal information refers to the length, precision, and offset of each signal.
[0039] Each frame of message data can be either a received message or a sent message.
[0040] In this embodiment of the disclosure, the period of any message data in any channel-associated message data can be determined according to the timestamp of any frame of message data. Furthermore, by extracting information related to fields such as signal length, precision, and offset from the message data, the signal information contained in any frame of message data can be obtained.
[0041] It should be noted that the signal information may also include the number of signals, which signals belong to the same signal group, the name of the signal group, and the number of signal groups contained in any frame of message data, etc.
[0042] Step 203: Determine a periodic operable entity in the application layer communication component based on the period of any frame of message data.
[0043] In this embodiment of the disclosure, corresponding periodic operable entities can be defined for the period of all frame message data in the message data, so that the application layer communication component can periodically monitor message updates at specific time intervals to determine the processing logic of the application layer communication component.
[0044] Step 204: Based on the signal information contained in any frame of message data, determine the data element information associated with the interface corresponding to any frame of message data in the application layer communication component.
[0045] The data element information may include at least one of the following: the number, type, verification signal, and test quantity of the data elements, wherein the test quantity includes at least one of the observation quantity and the bypass calibration quantity.
[0046] In this embodiment of the disclosure, a data element is the smallest unit in an interface used to define data interaction, describing the attributes of the specific data transmitted between interfaces. The signal information contained in any frame of message data—that is, the length, precision, and offset of each signal in that frame of message data—can be mapped to interface data elements to obtain the data element information associated with the interface corresponding to any frame of message data in the application layer communication component.
[0047] In this embodiment of the disclosure, when any frame of message data contains a signal group, the data element information associated with the interface defined by the signal group can be determined based on the signal information of the signal group. The data element information should include a verification signal. The verification information can be any type of signal, such as end-to-end (E2E) verification, to ensure the integrity, accuracy and consistency of this signal group from the sending end to the receiving end, and to avoid the overall failure of the signal group due to abnormalities in the transmission or processing links.
[0048] In this embodiment of the disclosure, when any frame of message data is a received message, the interface-associated data element information determined based on the signal information contained in the received message should include observations. Observations refer to the original received signal that needs to be monitored, recorded, or analyzed in real time during the testing process to verify whether the parsing, conversion, and processing of the received signal meet the requirements. Regardless of whether the message data is a received message or a transmitted message, the determined interface-associated data element information can include bypass calibrators for testing the received or transmitted signal.
[0049] In this embodiment of the disclosure, based on the periodic operable entity determined in each frame of message data associated with any channel, and the data element information associated with the interface, the interface definition and functional logic of the application layer communication component associated with that channel can be determined. By parsing the period and signal information contained in each frame of message data, the periodic operable entity of the application layer communication component to be generated, and the data element information associated with the interface can be determined, thereby determining the interface definition and functional logic of the application layer communication component associated with the channel, which can improve the reliability of the application layer communication component.
[0050] Optionally, the number of data elements associated with the first interface and the second interface corresponding to any frame message can be determined first based on the number of signals contained in the signal information.
[0051] The first interface is the interface for interacting with SWC, and the second interface is an interface for interacting with COM.
[0052] In this embodiment of the disclosure, each application layer communication component includes a first interface for interacting with one or more SWCs, and each application layer communication component includes multiple second interfaces, each of which corresponds one-to-one with a COM.
[0053] In this embodiment, since the first interface interacts with the SWC, signals from different SWCs may belong to the same service. Therefore, to reduce coupling, multiple signals with the same service can be associated with a single data element on the first interface. Alternatively, if a signal contains multiple independent service information, multiple associated data elements can be determined on the first interface. The second interface interacts with the COM. COM transmits and receives signals according to the bus protocol and needs to directly map each signal in the message to ensure no loss of original data. Therefore, the data elements of the second interface should correspond one-to-one with the signals contained in the signal information. Thus, the number of data elements associated with the second interface is consistent with the number of signals contained in the signal information.
[0054] Then, based on the length, precision, and offset of each signal in the signal information, the type of data element associated with the first interface, the verification signal and / or test quantity, and the type of data element associated with the second interface are determined.
[0055] In this embodiment of the disclosure, the verification result of the signal group based on the verification signal and the test result of the signal based on the test quantity should be sent to the SWC. Therefore, when determining the data element information associated with the first interface and the second interface respectively, the type of data element associated with the first interface, the verification signal and / or the test quantity, and the type of data element associated with the second interface can be determined based on the length, precision and offset of each signal in the signal information.
[0056] In this embodiment of the disclosure, the number of data elements associated with the interface interacting with SWC or COM is determined based on the number of signals contained in the signal information, which can further reduce the coupling of the interaction. Furthermore, the associated data element information is determined for different types of interfaces according to the length, precision, and offset of each signal in the signal information, which improves the flexibility of the interface definition and further enhances the reliability of the application layer communication components to be generated.
[0057] Optionally, the number of third interfaces interacting with the COM module in the application layer communication component can be determined based on the number of signal groups included in the signal information. Then, based on the number of signals contained in each signal group, and the length, precision, and offset of each signal, the number and type of data elements associated with the third interface corresponding to the signal group can be determined.
[0058] In this embodiment of the disclosure, when the signal information includes a signal group, since multiple signals in the signal group cannot exist in isolation, if they are distributed to different interfaces, it may damage the integrity of the business logic. Therefore, it is necessary to define a separate interface for the signal group, namely the third interface, to ensure the integrity, accuracy and consistency of the entire link from the sending end to the receiving end of the signal group, and to avoid the overall failure of the signal group due to abnormalities in the transmission or processing links.
[0059] Optionally, when any frame of message data is a received message, the period of the monitoring signal to be sent on the first interface can be determined according to the period of the received message.
[0060] The first interface is the interface for interacting with SWC, and the monitoring signal is used to indicate that no new message has been received within the message receiving period.
[0061] In this embodiment, the matrix communication file associated with the ECU may be updated. Therefore, the update cycle of the application layer communication component monitoring messages can be determined by the message reception cycle, and new messages can be received periodically. When a new message is received, the application layer communication component and its interface associated with the channel can be automatically updated simply by re-executing the generator. This is more efficient and concentrates the signal changes after each update on the application layer communication component, making it easier to check and verify, and enhancing maintainability and traceability. Alternatively, if no new message is received, the monitoring signal sent from the first interface can be used to report the lack of updated messages to the application layer SWC.
[0062] Step 205: Generate the application layer communication component associated with the channel based on the interface definition, functional logic and the mapping configuration of the runtime environment RTE.
[0063] Optionally, an application-layer receiving communication component associated with any channel can be generated based on the interface definition, functional logic, and runtime environment RTE mapping configuration determined based on the received message associated with any channel. Similarly, an application-layer sending communication component associated with any channel can be generated based on the interface definition, functional logic, and runtime environment RTE mapping configuration determined based on the sent message associated with any channel.
[0064] In this embodiment of the disclosure, by generating two application layer communication components for each channel based on the received and sent messages in the message data, which are respectively responsible for the signal input and output processing of that channel, the maintainability and flexibility of the system can be improved, and signal interference conflicts can be avoided.
[0065] To implement the above embodiments, this disclosure also proposes an apparatus for generating application layer communication components in an on-board electronic control unit (ECU). Figure 3 This is a schematic diagram of the structure of the device for generating the application layer communication component in the vehicle electronic control unit (ECU) provided in the embodiments of this disclosure.
[0066] like Figure 3 As shown, the device 300 for generating application layer communication components in the vehicle electronic control unit (ECU) may include: The first determining module 301 is used to parse the communication matrix file associated with the ECU and determine the message data associated with each channel in the ECU. The second determining module 302 is used to parse the message data associated with any channel and determine the interface definition and functional logic of the application layer communication component associated with any channel. The generation module 303 is used to generate an application layer communication component associated with any channel based on the interface definition, functional logic and the mapping configuration of the runtime environment RTE. The application layer communication component is used to implement one or more functional software components SWC in the ECU to interact with the communication module COM through a port to transmit data from any channel. The RTE is used to map the data of the application layer communication component port to the communication object of the COM.
[0067] In some possible embodiments, the second determining module 302 may specifically be used for: Parse any frame of message data associated with any channel to determine the period and signal information contained in any frame of message data; Based on the period of any frame of message data, determine a periodically operable entity in the application layer communication component; Based on the signal information contained in any frame of message data, determine the data element information associated with the interface corresponding to any frame of message data in the application layer communication component. The data element information includes at least one of the following: the number, type, verification signal, and test quantity of the data element. The test quantity includes at least one of the observation quantity and the bypass calibration quantity.
[0068] In some possible embodiments, the second determining module 302 may specifically be used for: Based on the number of signals contained in the signal information, determine the number of data elements associated with the first interface and the second interface corresponding to any frame of message data, wherein the first interface is the interface for interacting with SWC, and the second interface is an interface for interacting with COM. Based on the length, precision, and offset of each signal in the signal information, determine the type of data element associated with the first interface, the verification signal and / or test quantity, and the type of data element associated with the second interface.
[0069] In some possible embodiments, the second determining module 302 may specifically be used for: Based on the number of signal groups included in the signal information, determine the number of third interfaces in the application layer communication component that interact with the COM module; Based on the number of signals contained in each signal group, the length, precision, and offset of each signal, determine the number and type of data elements associated with the third interface corresponding to the signal group.
[0070] In some possible embodiments, where any frame of message data is a received message, the device 300 for generating the application layer communication component in the vehicle electronic control unit (ECU) may further include: The third determining module is used to determine the period of the monitoring signal to be sent on the first interface based on the period of the received message, wherein the first interface is the interface for interacting with SWC, and the monitoring signal is used to indicate that no new message has been received within the period of the received message.
[0071] In some possible embodiments, the generation module 303 is specifically used for: Based on the interface definition, functional logic, and runtime environment RTE mapping configuration determined by the received message associated with any channel, generate the application layer receive communication component associated with any channel. Based on the interface definition, functional logic, and runtime environment RTE mapping configuration determined by the sent message associated with any channel, an application layer sending communication component associated with any channel is generated.
[0072] The functions and specific implementation principles of the modules described in this embodiment can be found in the above method embodiments, and will not be repeated here.
[0073] The device for generating application-layer communication components in the vehicle electronic control unit (ECU) according to this embodiment of the present disclosure obtains the message data associated with each channel by parsing the communication matrix file associated with the ECU. Then, based on the message data associated with any channel, it determines the interface definition and functional logic of the application-layer communication component corresponding to that channel. Finally, based on the interface definition, functional logic, and RTE mapping configuration, it generates the application-layer communication component associated with that channel. This achieves automatic generation of application-layer interfaces from files, eliminating the need for manual configuration, which improves software development efficiency. Furthermore, by generating application-layer communication components, the SWC is no longer directly coupled to the underlying, distributed COM signals, reducing the complexity and coupling of the interaction, enhancing maintainability and traceability, avoiding errors that may be introduced by manual coding, and ensuring the accuracy and robustness of the signal processing logic.
[0074] To achieve the above embodiments, this disclosure also proposes an on-board electronic control unit (ECU). Figure 4 This is a schematic diagram of the architecture of an in-vehicle electronic control unit (ECU) provided in an embodiment of this disclosure. Figure 5 This is a schematic diagram of the architecture of an existing vehicle electronic control unit (ECU).
[0075] like Figure 4 As shown, the vehicle electronic control unit (ECU) provided in this disclosure can transmit data with other ECUs through at least one channel. The ECU includes an application software layer (ASW), a runtime environment (RTE), and a basic software layer (BSW).
[0076] The ASW includes multiple functional software components (SWCs) and an application layer communication component. Each SWC is used to provide at least one functional service for the vehicle. Each application layer communication component is used to implement one or more functional software components (SWCs) in the ECU, and interact with the communication module (COM) in the BSW through a port, and exchange data transmitted by a channel associated with the application layer communication component.
[0077] In this embodiment, multiple SWCs can be set according to the functional needs of the ECU. These SWCs are not updated with updates to the communication matrix file associated with the ECU; instead, the updates are to the application layer communication components in the ASW and their associated interface definitions and functional logic. The ASW layer provides a standard operating environment for upper-layer application software, enabling the combination and configuration of software modules. It defines standard interfaces and communication mechanisms for inter-component communication and data exchange, and also supports automated testing and verification of software modules.
[0078] Depend on Figure 4As can be seen, the vehicle electronic control unit (ECU) proposed in this disclosure generates two application-layer communication components for each of the ECU's external interaction channels. For example, for channel 1, the two application-layer communication components generated accordingly can... Figure 4 The components are labeled Application Layer Communication Component 1-1 and Application Layer Communication Component 1-2, which are responsible for signal input and output processing of channel 1, respectively. For channel 2, the two corresponding Application Layer Communication Components can... Figure 4 The components are labeled Application Layer Communication Component 2-1 and Application Layer Communication Component 2-2, which are responsible for signal input and output processing of channel 2, respectively. Multiple SWCs in the application layer... Figure 4 The diagram uses only three SWCs as examples, labeled SWC1, SWC2, and SWC3, which represent software components that provide different functional services. They only interact with application layer communication components and do not directly interact with the COM layer.
[0079] RTE is used to map data from application layer communication component ports to COM communication objects.
[0080] The BSW includes a communication module COM, which is used for internal data exchange between ECUs and / or for data exchange between ECUs.
[0081] Optionally, the ECU has N channels, and the ASW includes 2N application layer communication components. Each channel is associated with one application layer receive communication component and one application layer transmit communication component.
[0082] Optionally, each application layer communication component includes an interface for interacting with SWC and at least one interface for interacting with COM.
[0083] and Figure 5 Compared to existing automotive electronic control units (ECUs), the ECU proposed in this disclosure adds a communication intermediary layer composed of multiple application layer communication components between the COM layer and the application layer SWC, to uniformly manage all interactions and signal transmissions and receptions between the application layer SWC and the COM layer. This effectively solves the problems in existing automotive electronic control units (ECUs) such as the need for specific configuration of the interface between each SWC's input / output signals and the COM layer, resulting in low development efficiency, and the high coupling and poor reusability caused by multiple SWCs referencing the same signal.
[0084] Furthermore, in the vehicle electronic control unit (ECU) provided in this disclosure, each application layer communication component has one interface for interacting with the SWC and multiple interfaces for interacting with the COM (in Figure 4 , Figure 5(Taking only one COM module in the basic software layer RSW as an example, it is possible to...) Figure 4 Based on the ECU shown, the existing SWC configuration is simplified while avoiding changes to the existing COM and RTE functional logic.
[0085] In this embodiment of the disclosure, by constructing an in-vehicle electronic control unit (ECU) containing multiple application layer communication components in the application software layer, the SWC and COM can be decoupled, so that the SWC is no longer directly coupled to the underlying, distributed COM signals, which can reduce the complexity and coupling of the interaction, and enhance maintainability and traceability. To achieve the above embodiments, this disclosure also proposes an on-board control system. Figure 5 This is a schematic diagram of the structure of an in-vehicle control system provided in an embodiment of this disclosure.
[0086] like Figure 6 As shown, the vehicle control system includes multiple electronic control units (ECUs) as described in the above embodiments, each ECU (in...) Figure 6 The ECUs (marked as ECU1, ECU2, ...) can be used for different functions, and each ECU can transmit data with other ECUs through at least one channel.
[0087] To implement the above embodiments, this disclosure also proposes a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the method for generating application layer communication components in an on-board electronic control unit (ECU) as proposed in the foregoing embodiments of this disclosure.
[0088] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this disclosure. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0089] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this disclosure, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0090] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing custom logic functions or processes, and the scope of preferred embodiments of this disclosure includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which embodiments of this disclosure pertain.
[0091] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0092] It should be understood that various parts of this disclosure can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0093] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0094] Furthermore, the functional units in the various embodiments of this disclosure can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0095] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of the present disclosure have been shown and described above, it is to be understood that the above embodiments are exemplary and should not be construed as limiting the present disclosure. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present disclosure.
Claims
1. A method for generating application layer communication components in an on-board electronic control unit (ECU), characterized in that, include: The communication matrix file associated with the ECU is parsed to determine the message data associated with each channel in the ECU; Parse the message data associated with any channel to determine the interface definition and functional logic of the application layer communication component associated with that channel; Based on the interface definition, functional logic, and runtime environment RTE mapping configuration, an application layer communication component associated with any channel is generated. The application layer communication component serves as a communication intermediary layer between one or more functional software components (SWCs) and the communication module (COM) within the application layer. It is used to realize centralized signal interaction between one or more functional software components (SWCs) in the ECU, enabling each SWC to complete the data transmission interaction of any channel with the COM through a port. The RTE is used to map the data of the application layer communication component port to the communication object of the COM.
2. The method as described in claim 1, characterized in that, The step of parsing the message data associated with any channel to determine the interface definition and functional logic of the application layer communication component associated with any channel includes: parsing any frame of message data associated with any channel to determine the period and signal information contained in the frame of message data; Based on the period of any frame of message data, determine a periodically operable entity in the application layer communication component; Based on the signal information contained in any frame of message data, determine the data element information associated with the interface corresponding to any frame of message data in the application layer communication component, wherein the data element information includes at least one of the following: the number, type, check signal and test quantity of data elements, wherein the test quantity includes at least one of observation quantity and bypass calibration quantity.
3. The method as described in claim 2, characterized in that, Based on the signal information contained in any frame of the message data, determine the data element information associated with the interface corresponding to any frame of the message in the application layer communication component, including: Based on the number of signals contained in the signal information, determine the number of data elements associated with the first interface and the second interface corresponding to any frame message, wherein the first interface is an interface that interacts with the SWC, and the second interface is an interface that interacts with the COM. Based on the length, precision, and offset of each signal in the signal information, determine the type of data element associated with the first interface, the verification signal and / or test quantity, and the type of data element associated with the second interface.
4. The method as described in claim 2 or 3, characterized in that, Based on the signal information contained in any frame of message data, determine the data element information associated with the interface of the application layer communication component, including: Based on the number of signal groups included in the signal information, determine the number of third interfaces in the application layer communication component that interact with the COM. Based on the number of signals contained in each signal group, the length, precision, and offset of each signal, the number and type of data elements associated with the third interface corresponding to the signal group are determined.
5. The method as described in claim 2 or 3, characterized in that, The method further includes: (where any frame of message data is a received message) Based on the period of the received message, the period of the monitoring signal to be sent on the first interface is determined, wherein the first interface is the interface that interacts with the SWC, and the monitoring signal is used to indicate that no new message has been received within the period of the received message.
6. The method as described in claim 5, characterized in that, The step of generating the application layer communication component associated with any channel based on the interface definition, functional logic, and runtime environment RTE mapping configuration includes: Based on the interface definition, functional logic, and runtime environment RTE mapping configuration determined by the received message associated with any of the channels, an application layer receiving communication component associated with any of the channels is generated. Based on the interface definition, functional logic, and runtime environment RTE mapping configuration determined by the transmitted message associated with any of the channels, an application layer transmission communication component associated with any of the channels is generated.
7. An apparatus for generating application layer communication components in an on-board electronic control unit (ECU), characterized in that, include: The first determining module is used to parse the communication matrix file associated with the ECU and determine the message data associated with each channel in the ECU; The second determining module is used to parse the message data associated with any channel and determine the interface definition and functional logic of the application layer communication component associated with the channel. The generation module is used to generate an application layer communication component associated with any channel based on the interface definition, functional logic, and runtime environment RTE mapping configuration. The application layer communication component serves as a communication intermediary layer between one or more functional software components (SWCs) and the communication module (COM) within the application layer. It is used to realize centralized signal interaction between one or more functional software components (SWCs) in the ECU, enabling each SWC to complete the data transmission interaction of any channel with the COM through a port. The RTE is used to map the data of the application layer communication component port to the communication object of the COM.
8. The apparatus as claimed in claim 7, characterized in that, The second determining module is specifically used for: Parse any frame of message data associated with any channel to determine the period and signal information contained in any frame of message data; Based on the period of any frame of message data, determine a periodically operable entity in the application layer communication component; Based on the signal information contained in any frame of message data, determine the data element information associated with the interface corresponding to any frame of message data in the application layer communication component, wherein the data element information includes at least one of the following: the number, type, check signal and test quantity of data elements, wherein the test quantity includes at least one of observation quantity and bypass calibration quantity.
9. The apparatus as claimed in claim 8, characterized in that, The second determining module is specifically used for: Based on the number of signals contained in the signal information, determine the number of data elements associated with the first interface and the second interface corresponding to any frame of message data, wherein the first interface is an interface that interacts with the SWC, and the second interface is an interface that interacts with the COM. Based on the length, precision, and offset of each signal in the signal information, determine the type of data element associated with the first interface, the verification signal and / or test quantity, and the type of data element associated with the second interface.
10. The apparatus as claimed in claim 8 or 9, characterized in that, The second determining module is specifically used for: Based on the number of signal groups included in the signal information, determine the number of third interfaces in the application layer communication component that interact with the COM. Based on the number of signals contained in each signal group, the length, precision, and offset of each signal, the number and type of data elements associated with the third interface corresponding to the signal group are determined.
11. The apparatus as claimed in claim 8 or 9, characterized in that, The message data is a received message, and the device further includes: The third determining module is used to determine the period of the monitoring signal to be sent on the first interface according to the period of the received message, wherein the first interface is an interface for interacting with the SWC, and the monitoring signal is used to indicate that no new message has been received within the period of the received message.
12. The apparatus as claimed in claim 11, characterized in that, The generation module is specifically used for: Based on the interface definition, functional logic, and runtime environment RTE mapping configuration determined by the received message associated with any of the channels, an application layer receiving communication component associated with any of the channels is generated. Based on the interface definition, functional logic, and runtime environment RTE mapping configuration determined by the transmitted message associated with any of the channels, an application layer transmission communication component associated with any of the channels is generated.
13. An on-board electronic control unit (ECU), characterized in that, The ECU transmits data with other ECUs through at least one channel. The ECU includes an application software layer (ASW), a runtime environment (RTE), and a basic software layer (BSW). The ASW includes multiple functional software components (SWCs) and an application layer communication component generated by the method described in any of claims 1-6. Each SWC is used to provide at least one functional service for the vehicle. Each application layer communication component is used to implement one or more functional software components (SWCs) in the ECU and interact with the communication module (COM) in the BSW through a port, and to exchange data transmitted by a channel associated with the application layer communication component. The RTE is used to map the data of the application layer communication component port to the communication object of the COM. The BSW includes a COM, which is used for internal data interaction between the ECUs and / or for data interaction between ECUs.
14. The ECU as claimed in claim 13, characterized in that, The ECU has N channels, and the ASW includes 2N application layer communication components, wherein each channel is associated with an application layer receive communication component and an application layer send communication component.
15. The ECU as claimed in claim 13 or 14, characterized in that, Each of the application layer communication components includes an interface for interacting with the SWC and at least one interface for interacting with the COM.
16. A vehicle-mounted control system, wherein, The vehicle control system includes multiple electronic control units (ECUs) as described in any one of claims 13-15.
17. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the program instructions are executed by the processor, they implement the method of any one of claims 1-6.
Citation Information
Patent Citations
Code generation method and device, computer program product and electronic equipment
CN119512534A
Power domain control software architecture and controller thereof
CN120743575A