Visual modeling method and system based on AutoSAR architecture
By introducing the top-down visual modeling method and graphical representation in the AUTOSAR application layer, the overall architecture design and system integration limitations of the bottom-up modeling method, as well as the readability and collaboration issues of text modeling are solved. , achieving a more flexible and efficient modeling process.
Patent Information
- Application Number
- CN202410776453.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-17
- Publication Date
- 2024-10-01
AI Technical Summary
The existing bottom-up modeling method of the AUTOSAR application layer has limitations in overall architecture design, system integration, and flexible response to demand changes, and text modeling encounters readability, editing efficiency, and error rates when dealing with complex systems. , collaboration and visualization issues.
Adopting top-down visual modeling method and graphical modeling method based on AutoSAR architecture, starting from the high-level view of the system, gradually refining to specific software components and interfaces, through overall modeling, internal modeling and port type definition , using example diagrams to represent the calling relationship between running entities and ports, improving the flexibility and understandability of modeling.
It improves the ease of use, understandability and collaboration efficiency of the model, overcomes the limitations of text modeling, enhances the flexibility of overall architecture design and system integration, and reduces the complexity of requirement changes and project management challenges.
Smart Images

Figure CN118733013A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of software engineering, and in particular to a visual modeling method and system based on AutoSAR architecture. Background Art
[0002] The core of AUTOSAR is to provide a standardized and scalable software architecture, which is divided into three main parts: basic software (BSW), runtime environment (RTE) and application layer. In the prior art, the modeling process of the application layer in AUTOSAR follows a series of bottom-up steps, such as Figure 1 As shown in the figure, it starts with the definition of data types, goes through the design of interfaces, to the implementation of runtime entities, and finally the composition of components. The first is the data type definition. Before starting to design software components, you first need to define the data types used, which specify the format and range of data transferred between software components, such as integers, floating point numbers, structures, etc. Then, interface design. In AUTOSAR, there are two main types of interfaces: client-server interfaces and sender-receiver interfaces. Interfaces define the communication rules between software components, including data transmission and service calls. Well-designed interfaces can be shared and reused between different software components. Secondly, the implementation of software components. The runtime entity is the execution unit inside the software component, which encapsulates the specific functional logic. Each software component implements part or all of the component functions, such as data processing, calculation or control logic. In addition to the software components defined inside. Composite components: Once individual software components (such as runtime entities) are defined and implemented, they can be combined into larger composite components. Composite components can contain multiple small software components, which are connected to each other through internal ports. This step allows different functional modules to be integrated together to form a complete application or subsystem.
[0003] However, the bottom-up modeling approach, starting with data type definition in the AUTOSAR application layer, then interface design, followed by the implementation of runtime entities, and finally component combination, is effective in some aspects, but it also has some disadvantages:
[0004] 1. Lack of overall perspective. The bottom-up approach may focus too much on specific implementation details and ignore the overall architectural design and goals. System-level requirements and constraints may not be fully considered in the early stages;
[0005] 2. Integration and compatibility issues. Different components may not be integrated with other parts when they are initially designed, which may lead to difficulties in later integration. Different parts may adopt different standards and protocols when they are implemented, increasing the risk of compatibility issues;
[0006] 3. Difficulty in dealing with changes in requirements. In the early stages of a project, requirements may not be clear enough or easy to change, and a bottom-up approach may not be flexible enough to deal with these changes. When requirements change, a lot of redesign and adjustment of implemented components may be required;
[0007] 4. Project management and coordination challenges. In a bottom-up approach, as the project progresses, the number of components that need to be coordinated and managed increases dramatically, which can lead to project management challenges. Due to the lack of a clear overall framework in the early stages, it may be difficult to accurately predict the project schedule and resource requirements;
[0008] 5. Testing and verification challenges. Before the entire system is integrated, it is difficult to conduct comprehensive testing and verification, which may lead to potential integration problems. Multiple iterations may be required to solve problems exposed after integration, increasing time and cost.
[0009] Therefore, the bottom-up approach is effective in dealing with specific implementation details, but it has certain limitations in terms of overall architecture design, system integration, and flexible response to changes in requirements.
[0010] Secondly, current modeling tools are mainly in text form. Although using text modeling as the main modeling method for complex systems such as AUTOSAR has advantages in some aspects, it also has some obvious disadvantages:
[0011] 1. Challenges of readability and comprehension. Text models often have difficulty visually displaying the structure and relationships of complex systems, especially for newcomers to the project. In text models, especially in large systems, it can be very complex to track and understand the relationships and dependencies between components.
[0012] 2. Inefficiency of editing and modification. In a text model, even minor changes may require editing multiple files, which may lead to errors and consistency issues. As the scale of the system increases, the cost of maintaining and updating the text model will also increase significantly;
[0013] 3. Error and consistency issues. In text models, the probability of human error is high, especially when dealing with complex data structures and interface definitions. Ensuring consistency between various parts of the model is a challenge, especially in a multi-person collaborative environment;
[0014] 4. Collaboration and communication barriers. In team collaboration, text models may not be conducive to effective communication and collaboration, especially in interdisciplinary teams where members may have different understandings of text models. Text models are not easy to share and transfer knowledge, especially for complex system architectures and business logic;
[0015] 5. Limitations of visualization and presentation. For situations where you need to present models to stakeholders (such as management or customers), text models are not as intuitive and easy to understand as graphical models. Text models are difficult to dynamically display the behavior and runtime changes of the system;
[0016] 6. Lack of direct graphical tool support. Many text models lack strong graphical tool support, which limits their ease of use and accessibility.
[0017] In summary, text modeling has limitations in readability, editing efficiency, error rate, collaboration, and visualization when dealing with complex systems. Summary of the invention
[0018] In view of this, the first aspect of the present invention provides a visual modeling method based on the AutoSAR architecture to solve the technical problems that the bottom-up modeling method in the existing methods has limitations in overall architecture design, system integration and flexible response to demand changes, and that text modeling has limitations in readability, editing efficiency, error rate, collaboration and visualization when processing complex systems. The method includes:
[0019] Modeling the software component as a whole at the application layer, wherein the software component corresponds to one or more ports;
[0020] Modeling the software component internally includes establishing internal behavior inside the software component, wherein the internal behavior includes a single or multiple running entities, and the internal behavior includes an example graph, wherein the example graph is used to characterize a calling relationship between the running entities and between the running entity and the port;
[0021] The port type of each port corresponding to the software component is defined, including defining the operation of each port and the data type corresponding to the operation, and the modeling of the software component is completed based on the internal behavior and the defined port type.
[0022] Furthermore, the method is modeled based on an AutoSAR architecture, which includes an application layer, an intermediate layer and a microcontroller.
[0023] Furthermore, internal modeling of each of the software components also includes creating the example diagram, which includes a port example diagram for representing the port and a running entity example diagram for representing the running entity, and an arrow is set between the port example diagram and the running entity example diagram to represent the calling method of the port to the running entity.
[0024] Furthermore, the example diagram also includes a periodic example diagram for representing periodic calls to the running entity.
[0025] Furthermore, when internal modeling is performed on each of the software components, calls between the running entities include calls to temporary variables.
[0026] Furthermore, after defining the port type corresponding to each port of the software component, the defined port type is supplemented by adding a new data type in the port type according to preset requirements.
[0027] The second aspect of the present invention provides a visual modeling system based on the AutoSAR architecture to solve the technical problems that the bottom-up modeling method in the existing methods has limitations in overall architecture design, system integration and flexible response to demand changes, and that text modeling has limitations in readability, editing efficiency, error rate, collaboration and visualization when processing complex systems. The system includes:
[0028] An overall modeling module, used for overall modeling of software components at the application layer, wherein the software components correspond to one or more ports;
[0029] An internal modeling module, used for internal modeling of the software component, including establishing internal behavior inside the software component, wherein the internal behavior includes a single or multiple running entities, and the internal behavior includes an example diagram inside, wherein the example diagram is used to characterize the calling relationship between the running entities and between the running entity and the port;
[0030] The port type definition module is used to define the port type of each port corresponding to the software component, including defining the data type corresponding to each port, and completing the modeling of the software component based on the internal behavior and the defined port type.
[0031] Compared with the prior art, the beneficial effects that can be achieved by at least one of the above-mentioned technical solutions adopted in the embodiments of this specification include at least the following: The present invention provides a visual modeling method based on the AutoSAR architecture, introduces a top-down modeling method and a graphical visual modeling method, and first starts from a high-level view of the system, such as the system architecture or functional requirements, and gradually refines it to specific software components and interfaces, making the modeling method more flexible and improving the ease of use, comprehensibility and collaboration efficiency of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0033] Figure 1 It is a flowchart of the bottom-up modeling method provided in the background technology part of the present invention;
[0034] Figure 2 It is an overall flow chart of a visual modeling method based on AutoSAR architecture provided by an embodiment of the present invention;
[0035] Figure 3 is a schematic diagram of the AutoSAR structure provided by an embodiment of the present invention;
[0036] Figure 4 is a schematic diagram of the internal structure of a software component provided by an embodiment of the present invention;
[0037] Figure 5 is a schematic diagram of internal behavior provided by an embodiment of the present invention;
[0038] Figure 6 is a schematic diagram of an example provided by an embodiment of the present invention;
[0039] Figure 7 is a schematic diagram of port types provided by an embodiment of the present invention;
[0040] Figure 8 It is an overall flow chart of a visual modeling system based on the AutoSAR architecture provided by an embodiment of the present invention.
[0041] Reference numerals in the figure: 61, port example diagram; 62, running entity example diagram; 63, cycle example diagram; 800, system; 801, overall modeling module; 802, internal modeling module; 803, port type definition module. DETAILED DESCRIPTION
[0042] The embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0043] The following describes the implementation methods of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The present application can also be implemented or applied through other different specific implementation methods, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that, in the absence of conflict, the following embodiments and the features in the embodiments can be combined with each other. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work belong to the scope of protection of the present application.
[0044] The present invention provides a visual modeling method based on the AutoSAR architecture, which introduces a top-down modeling method and a graphical visual modeling method. It first starts from a high-level view of the system, such as the system architecture or functional requirements, and gradually refines to specific software components and interfaces, making the modeling method more flexible and improving the usability, comprehensibility and collaboration efficiency of the model.
[0045] In the embodiment of the present invention, Figure 2 As shown, a visual modeling method based on the AutoSAR architecture includes:
[0046] Step S100: Modeling the software component as a whole at the application layer, wherein the software component corresponds to one or more ports;
[0047] Furthermore, in step S100, overall modeling is performed based on the AutoSAR architecture, where the AutoSAR architecture includes an application layer, an intermediate layer, and a microcontroller.
[0048] Specifically, the core of AUTOSAR is to provide a standardized and scalable software architecture, which is divided into three main parts: the middle layer (basic software (BSW), runtime environment (RTE)), the application layer and the microcontroller. Figure 3 As shown in the figure. In the AUTOSAR architecture, the application layer plays a vital role. It consists of a series of high-level software components responsible for implementing various functions of the car. These functions cover a wide range of areas from powertrain control, body electronic systems to infotainment systems and driver assistance systems.
[0049] In the application layer, software components are designed to be modular and reusable, making them flexible to deploy on different vehicles and platforms. Each component focuses on a specific task, such as engine management or brake control, without having to deal with the complexity of the underlying hardware.
[0050] Through intermediate layers, such as the runtime environment (RTE), application layer components interact with the basic software layer (BSW) to achieve data exchange and the transmission of control instructions. This layered approach not only improves the flexibility and maintainability of the system, but also makes the development process more efficient because existing components can be reused to quickly develop new vehicle functions. In addition, with the advancement of technology, the application layer is becoming more and more complex, including more advanced functions such as autonomous driving and vehicle networking. These new functions have put forward higher requirements on the software architecture, such as better performance, higher security and stronger reliability.
[0051] The modeling process of software components in the AUTOSAR application layer modeling process is very important, which increases modularity and reusability. They are the main building blocks of the AUTOSAR application layer and are designed to be independent of hardware, which makes them reusable in different systems.
[0052] Software components include application software components (Application SWCs), which contain application logic for implementing specific vehicle functions (such as anti-lock braking system control). They communicate with other components or sensors and actuators through the ports of the software components. Service software components (Service SWCs) provide system services such as diagnostics and network management. They usually run in the background and provide support for application software components. Complex device drivers (Complex Device Drivers, CDDs) are used to manage complex or special vehicle hardware devices that cannot be managed by standard AUTOSAR drivers. CDDs usually interact directly with the hardware registers of the microcontroller. Each software component has ports, which can be provider (Provider) or requester (Requester) ports for the exchange of data and services. Ports communicate with the outside world through ports, which define the types of data and services that can be passed through the ports. The internal structure diagram of the software component is as follows Figure 4 shown.
[0053] In addition to the exchange of information between software components, software components need to define internal behaviors. Internal behaviors describe the functional logic and processing flow within software components, including how software components process inputs, how they perform their functions, and how they produce outputs. The following are the runnables that need to be included in the internal behaviors. Runnables are the components of internal behaviors and can be regarded as independent functional blocks or functions within the component. Each runnable encapsulates a piece of executable code that is responsible for completing a specific task, such as data processing, monitoring, or control algorithms. Runnables are scheduled for execution by the RTE (Runtime Environment) and can run in a periodic or event-driven manner. Runnables can access and modify their internal states, which are usually represented by local variables. These variables store the data required by the runnables during execution. When multiple runnables need to access shared resources, data consistency and mutually exclusive access must be ensured, so mutually exclusive and shared resources (Exclusive Areas) need to be defined. Internal behaviors define the access mechanism for these shared resources to prevent problems such as data contention and priority flipping. Runnables can be configured to run periodically, for example, once every 10ms. It can also be configured to be event-driven, for example, to execute when a specific signal or data update is received. Runtime entities read input data through the software component's ports and generate output. Inputs may come from sensors, other software components, or internal variables. Runtime entities perform calculations and algorithms, which are the core logic that implements the component's functionality. They can perform anything from simple data transformations to complex control strategies.
[0054] In AUTOSAR, the design of internal behavior is critical because it is directly related to the performance and reliability of software components. Correctly managing runtime entities and their scheduling strategies is essential to ensure that software components can meet real-time and functional safety requirements. Through this modular and detailed internal structure, the AUTOSAR framework supports the development and maintenance of highly complex automotive software systems.
[0055] By defining software components, we can encapsulate functional logic and implement all the computing logic and state information required for a certain function, which makes the functions modular, easy to manage and update. At the same time, we abstract hardware details and design software components to be independent of hardware, which means that the same software components can run on different hardware configurations without modification. The most important thing is to improve reusability and maintainability. By defining clear ports and encapsulating internal logic, software components can be reused between different projects and platforms.
[0056] In AUTOSAR, the development of software components usually follows strict specifications, ensuring compatibility and interoperability between different components. This modular approach not only improves development efficiency, but also improves the reliability and performance of the overall system. This design of software components allows manufacturers and suppliers to respond more quickly to new technical challenges and market demands while maintaining compatibility with existing systems.
[0057] Furthermore, in step S100, the software components and corresponding ports required by the system are first modeled in the application layer composition, and the association between different ports is established to achieve the modeling of the entire system. The user starts from the Austoar application layer modeling interface, first completes a construction process of the overall architecture, and can directly model the software components. First, establish the SWC (software component) corresponding to the system, and establish corresponding single or multiple ports on the software component. The user can directly connect the ports between different SWCs to represent the information exchange between different software components.
[0058] Step S200, internal modeling of the software component, including establishing internal behavior inside the software component, the internal behavior including a single or multiple running entities, the internal behavior including an example graph, the example graph is used to represent the calling relationship between the running entities and between the running entity and the port;
[0059] Specifically, in step S200, the software component is modeled internally, including the internal behavior of the software component. The internal behavior includes each running entity and the calling of each running entity to the port. The user establishes an internal behavior in each SWC to represent the internal functional logic of the running entity, and multiple running entities can be modeled between one internal behavior to represent multiple functions of the running entity at one time.
[0060] Furthermore, internal modeling of each of the software components also includes creating the example diagram, which includes a port example 61 for representing the port and an operating entity example 62 for representing the operating entity, and an arrow is set between the port example 61 and the operating entity example 62 to represent the calling method of the port to the operating entity; the example diagram also includes a periodic example 63 for representing the periodic calling of the operating entity.
[0061] Specifically, graphical modeling is achieved by creating an example diagram. A periodic example diagram may also be added to represent the periodic call or triggering of the running entity. In addition, the data exchange between the running entities includes the call of temporary variables, and the temporary variables may also represent the input or call of the port to the running entity. Figure 5The internal behavior diagram shown and Figure 6 The example diagram shown in the diagram includes: a port example 61, an operation entity example 62 and a cycle example 63. The arrow between the port example 61 and the operation entity example 62 indicates the cycle calling mode of the port to the operation entity. Figure 5 The LightMessage represents a temporary variable, which directly references the data type created at the beginning. The arrow between the temporary variable and the running entity represents the reading or writing process of the running entity to the temporary variable.
[0062] Step S300, defining the port type of each port corresponding to the software component, including defining the data type corresponding to each port, and completing the modeling of the software component based on the internal behavior and the defined port type.
[0063] Specifically, after completing the internal modeling of the software component, the user needs to define various port types corresponding to the software component, wherein the port types mainly include client-server ports (Client-Server Interfaces) and sender-receiver ports (Sender-Receiver Interfaces). Figure 7 In the figure, the left side is the sender-receiver interface, which represents the function of data exchange between running entities and needs to define the data type; the right side is the client-server interface, which represents the function of function call between running entities and needs to define the specific operations involved and the data type involved in the operation.
[0064] Further, after defining the port type corresponding to each port of the software component, the defined port type is supplemented by adding a new data type in the port type according to preset requirements. For example, a collection of multiple data types can be added to supplement the port type.
[0065] like Figure 8As shown, an embodiment of the present invention further provides a visual modeling system 800 based on the AutoSAR architecture, including: an overall modeling module 801, used to perform overall modeling of the software component at the application layer, and the software component corresponds to one or more ports; an internal modeling module 802, used to perform internal modeling of the software component, including establishing internal behavior inside the software component, the internal behavior includes a single or multiple running entities, and the internal behavior includes an example diagram inside, and the example diagram is used to characterize the calling relationship between each of the running entities and between the running entity and the port; a port type definition module 803, used to define the port type of each port corresponding to the software component, including defining the operation of each port and the data type corresponding to the operation, and completing the modeling of the software component based on the internal behavior and the defined port type.
[0066] In summary, the embodiments of the present invention achieve the following technical effects:
[0067] 1. The present invention introduces a top-down modeling method and a graphical visualization modeling method, which starts from a high-level view of the system, such as the system architecture or functional requirements, and gradually refines to specific software components and interfaces, making the modeling method more flexible and improving the ease of use, understandability and collaboration efficiency of the model;
[0068] 2. The present invention introduces a graphical visual modeling method, which can effectively overcome the limitations of text modeling, thereby improving the model's ease of use, comprehensibility and collaboration efficiency.
[0069] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the embodiments of the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A visual modeling method based on AutoSAR architecture, It is characterized in that The method comprises: Modeling the software component as a whole at the application layer, wherein the software component corresponds to one or more ports; Performing internal modeling on the software component, including establishing internal behavior inside the software component, wherein the internal behavior includes a single or multiple running entities, and the internal behavior includes an example graph, wherein the example graph is used to characterize a calling relationship between the running entities and between the running entity and the port; The port type of each port corresponding to the software component is defined, including defining a data type corresponding to each port, and the modeling of the software component is completed based on the internal behavior and the defined port type.
2. A visual modeling method based on AutoSAR architecture according to claim 1, It is characterized in that The method is modeled based on an AutoSAR architecture, which includes an application layer, an intermediate layer and a microcontroller.
3. A visual modeling method based on AutoSAR architecture according to claim 1, It is characterized in that Internal modeling of each of the software components also includes creating the example diagram, which includes a port example diagram for representing the port and an operating entity example diagram for representing the operating entity, and an arrow is set between the port example diagram and the operating entity example diagram to represent the calling method of the port to the operating entity.
4. A visual modeling method based on AutoSAR architecture according to claim 3, It is characterized in that The example diagram also includes a periodic example diagram for representing periodic calls to the running entity.
5. The visual modeling method based on AutoSAR architecture according to claim 1, It is characterized in that When internal modeling is performed on each of the software components, calls between the running entities include calls to temporary variables.
6. The visual modeling method based on AutoSAR architecture according to claim 1, It is characterized in that After defining the port type corresponding to each port of the software component, the defined port type is supplemented by adding a new data type in the port type according to preset requirements.
7. A visual modeling system based on AutoSAR architecture, It is characterized in that The system comprises: An overall modeling module, used for overall modeling of software components at the application layer, wherein the software components correspond to one or more ports; An internal modeling module, used for internal modeling of the software component, including establishing internal behavior inside the software component, wherein the internal behavior includes a single or multiple running entities, and the internal behavior includes an example diagram inside, wherein the example diagram is used to characterize the calling relationship between the running entities and between the running entity and the port; The port type definition module is used to define the port type of each port corresponding to the software component, including defining the operation of each port and the data type corresponding to the operation, and completing the modeling of the software component based on the internal behavior and the defined port type.
