Port connection method in software architecture design process and related apparatus

By automatically connecting ports of components at different levels in a nested software architecture, the problem of low efficiency in communication connections within and between ECUs in the AUTOSAR architecture by existing tools is solved, achieving efficient and accurate port wiring and signal mapping, and improving the user experience.

WO2026067752A1PCT designated stage Publication Date: 2026-04-02YINWANG INTELLIGENT TECHNOLOGIES CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-09-29
Publication Date
2026-04-02

AI Technical Summary

Technical Problem

Existing software development tools have limited automation capabilities in complex software architecture designs, resulting in low efficiency and a high risk of errors. This is especially true in the communication connections between ECUs within and between ECUs in the AUTOSAR architecture, where manual configuration is labor-intensive and prone to errors.

Method used

By obtaining the paths between components at different levels in a nested software architecture, automatically connecting ports, including nested paths, and automatically generating port connections, the limitations of same-level connections are resolved, manual workflow configuration is reduced, and the risk of missing signal mappings is mitigated.

Benefits of technology

It improves software design efficiency, reduces wiring error rate, simplifies communication connection process between ECUs, and enhances user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025125186_02042026_PF_FP_ABST
    Figure CN2025125186_02042026_PF_FP_ABST
Patent Text Reader

Abstract

Provided are a port connection method in a software architecture design process and a related apparatus. The port connection method in a software architecture design process comprises: acquiring a first path between a first port and a second port, wherein the first port is a port in a first component comprised in a nested software architecture, the second port is a port in a second component at a different level from the first component in the nested software architecture or the second port is a port in a third component in the nested software architecture, the first component and the second component are finest-grained software component units in the nested software architecture, and the third component is a coarsest-grained software component unit in the nested software architecture (S701); and completing the connection between the first port and the second port on the basis of the first path (S702). By means of the present solution, the software design efficiency can be improved and the connection error rate can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Port connection method in software architecture design process and related device

[0001] The present application claims priority to the Chinese patent application No. 202411403152.6, filed on September 30, 2024, with the State Intellectual Property Office of China, and entitled "Port connection method in software architecture design process and related device", the whole content of which is incorporated herein by reference. TECHNICAL FIELD

[0002] The present application relates to the technical field of software design, in particular to a port connection method in software architecture design process and related device. BACKGROUND

[0003] In the software development process, software engineers usually design software architecture through tools. The software architecture includes the definition of software components (SWC) and the data communication relationship between SWCs. Software development tools provide a visual interface for users to design. Taking the design of automotive open system architecture (AUTOSAR) as an example. The communication behavior between SWCs in the AUTOSAR software architecture includes intra-ECU communication and inter-ECU communication. The communication within the ECU is defined through the connection between the ports of the SWC, and then communicated through the runtime environment (RTE). The communication between ECUs, for example, can be communicated through CAN / SOMEIP protocols, which needs to be defined through the mapping between the port and the signal (DataMapping). Usually, the number of connectors within a single ECU is several thousand, and if it is manually connected one by one, the workload is large and easy to make mistakes, so the software development tool of AUTOSAR usually provides an automatic connection function to help users perform this part of the operation. However, the existing software development tool supports limited automatic connection function, and in complex connection scenarios, users still need to manually connect and configure, which leads to low efficiency and is prone to errors. SUMMARY

[0004] The present application provides a port connection method in software architecture design process and related device, which can improve the software design efficiency and reduce the connection error rate.

[0005] In a first aspect, the present application provides a port connection method in a software architecture design process, the method comprising: obtaining a first path between a first port and a second port. Connecting between the first port and the second port based on the first path.

[0006] The first port is a port in a first component in a nested software architecture, the second port is a port in a second component in the nested software architecture at a different level from the first component, or the second port is a port in a third component in the nested software architecture. The first component and the second component belong to a software component unit with the smallest component division granularity in the nested software architecture. The third component belongs to a software component unit with the largest component division granularity in the nested software architecture.

[0007] The nested software architecture may be a software architecture in AUTOSAR or a nested software architecture in other product software frameworks, and embodiments of the present application do not limit this.

[0008] In the above solution, the path between the ports of the unit components (such as the first component and the second component with the smallest component division granularity) at different levels in the nested software architecture can be determined, or the path between the ports of the software components inside the nested software architecture and the ports of the outermost component (i.e. the third component) can be determined. Thus, the connection between the ports can be completed according to the path, without the need for manual connection configuration, thereby improving the software design efficiency and reducing the connection error rate. Illustratively, on the one hand, the matching relationship between the component ports at different levels in the multi-level nested software architecture can be identified and the port connection can be automatically generated. This solves the limitation of the original automatic connection that only supports the connection between the same level. On the other hand, the connection between the ports of the components inside the nested software architecture and the ports of the outermost component can be implemented. This prepares for the subsequent signal mapping to realize the communication with the objects outside the architecture. This reduces the related manual configuration workflow and reduces the problem of missing signal mapping caused by manual configuration errors.

[0009] In a possible implementation, when the second port is a port in the second component, the obtaining of the first path between the first port and the second port comprises: determining the first path based on a first nested path and a second nested path. The first nested path indicates the position of the first component in the nested software architecture, and the second nested path indicates the position of the second component in the nested software architecture.

[0010] The above scheme is mainly applied to the communication scenario between unit components in the nested software architecture. For example, the communication scenario in the vehicle ECU. The nested paths of the first component and the second component in the nested software architecture can be obtained. The communication path between the first port and the second port can be determined through the two nested paths, that is, the first path is determined. The implementation process is simple and the execution efficiency is high.

[0011] In a possible implementation, the first port is a providing port associated with the first interface, and the second port is a demand port associated with the first interface. The first path is determined based on the first nested path and the second nested path, including: obtaining a first port set based on the first nested path and the second nested path. The first port set includes one or more providing ports associated with the first interface and / or one or more demand ports associated with the first interface. The first path is determined based on the first port, the first port set, and the second port.

[0012] Exemplarily, the first nested path and the second nested path include a fourth component. The fourth component is the innermost combined component in the same combined component in the first nested path and the second nested path, and the combined component includes a software component with a component division granularity smaller than the combined component. The one or more providing ports associated with the first interface include a providing port associated with the first interface in each of the combined components between the first component and the fourth component in the first nested path. The one or more demand ports associated with the first interface include a demand port associated with the first interface in each of the combined components between the second component and the fourth component in the second nested path.

[0013] In the above scheme, the communication path between the first port and the second port is obtained by connecting a plurality of different level ports. Therefore, in addition to the first port and the second port, a proxy port (for example, a providing port and / or a demand port associated with the first interface in the combined component) for connecting the first port and the second port is also needed to be determined. The proxy port can be obtained through the first nested path and the second nested path, that is, the first port set is obtained. Then, the first path can be quickly determined.

[0014] In a possible implementation, the method further includes: if a providing port associated with the first interface is not configured in one or more of the combined components between the first component and the fourth component in the first nested path, a providing port associated with the first interface is newly created in the one or more of the combined components.

[0015] In the solution, if it is found that a corresponding proxy port is not configured in a combined component, the corresponding proxy port can be quickly created, so that the communication path between the first port and the second port can be quickly obtained.

[0016] In a possible implementation, before the first port set is obtained based on the first nested path and the second nested path, the method further includes: displaying, in a first user interface, the first port and an association relationship between the second port and the first interface. Receiving a first operation of the user on the association relationship in the first user interface, and the first operation indicates that the first path is obtained.

[0017] In the solution, the matched port pair and the association relationship with the interface can be displayed in the user interface, so that the user can view and select. This facilitates the user to clearly or specifically understand the situation in the software design process, and facilitates the user to flexibly select the corresponding path connection design, thereby improving the user experience.

[0018] In a possible implementation, when the second port is a port in the third component, the first path between the first port and the second port is obtained based on a third nested path. The third nested path indicates a position of the first component in the nested software architecture.

[0019] In the solution, the application is mainly in the scenario of communication between a unit component in the nested software architecture and an external object. For example, the application is in the scenario of communication between vehicle ECUs. Since the second port is a port in the third component, that is, a port of the outermost component in the nested software architecture, the starting point of the third nested path is the outermost component, and therefore the communication path between the first port and the second port can be determined based on the third nested path.

[0020] In a possible implementation, the first port is associated with a second interface, a name of the second interface and a name of the first signal are fuzzy matched, and a transmission direction of the first port and a transmission direction of the first signal are both a first direction. The first path is determined based on the third nested path, including: a second port set is acquired based on the third nested path. The second port set includes a target port in each combined component in the third nested path, the target port is a port associated with the second interface and having the first direction, the combined component includes a software component having a component granularity smaller than the combined component, and the second port set includes the second port. The first path is determined based on the first port and the second port set.

[0021] In the foregoing solution, the communication path between the first port and the second port is obtained by connecting a plurality of different level ports. Therefore, in addition to the first port and the second port, a proxy port for connecting the first port and the second port is also needed to be determined. The proxy interface needs to meet the condition of fuzzy matching with the name of the interface associated with the first port and consistent with the transmission direction of the first port (for example, the second port set). The proxy port can be obtained through the third nested path, that is, the second port set is obtained. Then the first path can be quickly determined.

[0022] In a possible implementation, the method further includes: if one or more combined components included in the third nested path are not configured with the target port, the target port is newly created in the one or more combined components. And / or, the second port set is acquired based on the third nested path in response to a second operation of a user on a second user interface. The second user interface displays the matching relationship between the first port and the first signal, and the second operation indicates that the first path is acquired.

[0023] In the foregoing solution, if it is found that a corresponding proxy port is not configured in a combined component, the corresponding proxy port can be quickly created, so that the communication path between the first port and the second port can be quickly obtained.

[0024] In a possible implementation, after the connection between the first port and the second port is completed based on the first path, the method further includes: generating a mapping configuration between the second port and the first signal.

[0025] In the foregoing solution, after the connection between the first port and the second port is completed, the mapping configuration between the second port and the corresponding signal can be generated. So that the first port can realize communication with an object outside the nested software architecture based on the signal through the second port.

[0026] In a possible implementation, the foregoing completing the connection between the first port and the second port based on the first path includes: in response to a third operation of a user on a third user interface, completing the connection between the first port and the second port based on the first path. The third user interface displays the first path, and the third operation indicates to implement the connection between ports in the first path.

[0027] In the foregoing solution, the communication path (for example, the first path) that can be automatically connected can be displayed on the user interface, so that the user can view and select, thereby making the user more clear or specific about the situation in the software design process, and facilitating the user to flexibly select to implement the connection design of the corresponding path, and improving the user experience.

[0028] In a possible implementation, after the foregoing completing the connection between the first port and the second port based on the first path, the method further includes: saving the connection configuration of the first path into a configuration file of the nested software architecture.

[0029] In the foregoing solution, the connection configuration implemented in the foregoing process can be saved into the corresponding configuration file, so as to perfect the design of the nested software architecture.

[0030] In a second aspect, the present application provides a port connection method in a software architecture design process, which includes: displaying a first path for implementing communication between a first port and a second port on a first user interface; and in response to a first operation of a user on the first path in the first user interface, completing the connection between the first port and the second port based on the first path.

[0031] The first port is a port in a first component included in the nested software architecture, the second port is a port in a second component in a different level from the first component in the nested software architecture, or the second port is a port in a third component in the nested software architecture. The first component and the second component belong to a software component unit with the smallest component granularity in the nested software architecture. The third component belongs to a software component unit with the largest component granularity in the nested software architecture.

[0032] In a possible implementation, when the second port is a port in the second component, the first port is a provided port, and the second port is a required port. Before the first path is displayed on the first user interface, the method further includes:

[0033] displaying, on a second user interface, an association relationship between the first port and the second port and a first interface.

[0034] In response to a second operation of the user on the second user interface on the association relationship, the first path is acquired.

[0035] In a possible implementation, after the connection between the first port and the second port is completed based on the first path in response to the first operation of the user on the first user interface on the first path, the method further includes:

[0036] A third user interface is displayed. The third user interface presents the nested software architecture including the first path with the completed connection.

[0037] In a possible implementation, when the second port is a port in the third component, before the first path is displayed in the first user interface, the method further includes:

[0038] A matching relationship between the first port and the first signal is displayed in a fourth user interface.

[0039] In response to a third operation of the user on the fourth user interface on the matching relationship, the first path is acquired.

[0040] In a possible implementation, the method further includes: in response to the first operation of the user on the first user interface on the first path, a mapping configuration between the second port and the first signal is generated.

[0041] After the connection between the first port and the second port is completed based on the first path in response to the first operation of the user on the first user interface on the first path, the method further includes:

[0042] A fifth user interface is displayed. The fifth user interface presents the nested software architecture including the first path with the completed connection, and presents a mapping relationship between the second port and the first signal.

[0043] In a possible implementation, the nested software architecture belongs to a software architecture in AUTOSAR.

[0044] In a third aspect, the present application provides a software design device, which comprises:

[0045] The processing unit is configured to acquire a first path between a first port and a second port. The first port is a port in a first component included in the nested software architecture, the second port is a port in a second component at a different level than the first component in the nested software architecture, or the second port is a port in a third component in the nested software architecture. The first component and the second component belong to a software component unit with the smallest component division granularity in the nested software architecture. The third component belongs to a software component unit with the largest component division granularity in the nested software architecture.

[0046] The connection unit is configured to complete connection between the first port and the second port based on the first path.

[0047] In a possible implementation, when the second port is a port in the second component, the processing unit is specifically configured to:

[0048] determine the first path based on a first nested path and a second nested path. The first nested path indicates a position of the first component in the nested software architecture, and the second nested path indicates a position of the second component in the nested software architecture.

[0049] In a possible implementation, the first port is a providing port associated with a first interface, and the second port is a requiring port associated with the first interface. The processing unit is specifically configured to:

[0050] acquire a first port set based on the first nested path and the second nested path. The first port set includes one or more providing ports associated with the first interface and / or includes one or more requiring ports associated with the first interface.

[0051] determine the first path based on the first port, the first port set, and the second port.

[0052] In a possible implementation, the first nested path and the second nested path include a fourth component. The fourth component belongs to an innermost combined component in a same combined component in the first nested path and the second nested path, and the combined component includes a software component with a smaller component division granularity than the combined component.

[0053] The one or more providing ports associated with the first interface include a providing port associated with the first interface in each of the combined components between the first component and the fourth component in the first nested path.

[0054] The one or more requirement ports associated with the first interface include a requirement port associated with the first interface in each of the one or more combined components between the second component and the fourth component in the second nested path.

[0055] In a possible implementation, the processing unit is further configured to:

[0056] If no provision port associated with the first interface is configured in one or more of the combined components between the first component and the fourth component in the first nested path, a provision port associated with the first interface is newly created in the one or more combined components.

[0057] In a possible implementation, the processing unit is further configured to:

[0058] If no requirement port associated with the first interface is configured in part or all of the combined components between the second component and the fourth component in the second nested path, a requirement port associated with the second interface is newly created in the part or all of the combined components.

[0059] In a possible implementation, the apparatus further includes a display unit, configured to, before the processing unit obtains the first port set based on the first nested path and the second nested path, display, in a first user interface, the first port and an association relationship between the second port and the first interface, and receive a first operation of a user on the first user interface on the association relationship, where the first operation indicates that the first path is obtained.

[0060] In a possible implementation, the second port is a port in the third component, and the processing unit is specifically configured to:

[0061] obtain the first path based on a third nested path, where the third nested path indicates a position of the first component in the nested software architecture.

[0062] In a possible implementation, the first port is associated with a first interface, a name of the first interface and a name of a first signal are in a fuzzy match, and a transmission direction of the first port and a transmission direction of the first signal are both a first direction, and the processing unit is specifically configured to:

[0063] obtain a second port set based on the third nested path, where the second port set includes a target port in each of the combined components in the third nested path, the target port is a port associated with the first interface and having the first direction, the combined components include software components having a component granularity smaller than the combined components, and the second port set includes the second port.

[0064] determining the first path based on the first port and the second port set.

[0065] In a possible implementation, the processing unit is further configured to:

[0066] if one or more of the combination components included in the third nested path is not configured with the target port, creating the target port in the one or more combination components.

[0067] In a possible implementation, the processing unit is specifically configured to:

[0068] In response to a second operation of a user on a second user interface, obtaining a second port set based on the third nested path. The second user interface displays a matching relationship between the first port and the first signal, and the second operation indicates obtaining the first path.

[0069] In a possible implementation, the processing unit is further configured to, after the connection unit completes the connection between the first port and the second port based on the first path, generate a mapping configuration between the second port and the first signal.

[0070] In a possible implementation, the connection unit is specifically configured to:

[0071] In response to a third operation of a user on a third user interface, completing the connection between the first port and the second port based on the first path. The third user interface displays the first path, and the third operation indicates implementing the connection between ports in the first path.

[0072] In a possible implementation, the apparatus further includes a saving unit configured to, after the connection unit completes the connection between the first port and the second port based on the first path, save a connection configuration of the first path into a configuration file of the nested software architecture.

[0073] In a possible implementation, the nested software architecture belongs to a software architecture in AUTOSAR.

[0074] In a fourth aspect, the present application provides a software design apparatus, which comprises:

[0075] The display unit is configured to display a first path in the first user interface. The first path is a communication path between a first port and a second port. The first port is a port in a first component of the nested software architecture, the second port is a port in a second component of the nested software architecture at a different level than the first component, or the second port is a port in a third component of the nested software architecture. The first component and the second component belong to a software component unit with the smallest granularity of component division in the nested software architecture. The third component belongs to a software component unit with the largest granularity of component division in the nested software architecture.

[0076] The processing unit is configured to complete the connection between the first port and the second port based on the first path in response to a first operation of the user on the first path in the first user interface.

[0077] In a possible implementation, when the second port is a port in the second component, the first port is a provided port and the second port is a required port. The display unit is further configured to display, before displaying the first path in the first user interface, an association relationship between the first port and a first interface of the second port in a second user interface.

[0078] The processing unit is further configured to obtain the first path in response to a second operation of the user on the association relationship in the second user interface.

[0079] In a possible implementation, after the processing unit completes the connection between the first port and the second port based on the first path in response to the first operation of the user on the first path in the first user interface, the display unit is further configured to display a third user interface.

[0080] The display unit is configured to display a third user interface. The third user interface presents the nested software architecture including the first path with the completed connection.

[0081] In a possible implementation, when the second port is a port in the third component, the display unit is further configured to display, before displaying the first path in the first user interface, a matching relationship between the first port and a first signal in a fourth user interface.

[0082] The processing unit is further configured to obtain the first path in response to a third operation of the user on the matching relationship in the fourth user interface.

[0083] In a possible implementation, the processing unit is further configured to generate a mapping configuration between the second port and the first signal in response to the first operation of the user on the first path in the first user interface.

[0084] The display unit is further configured to, in response to a first operation of the user on the first user interface for the first path, display a fifth user interface after the first path completes the connection between the first port and the second port.

[0085] The fifth user interface displays the nested software architecture including the first path that has completed the connection, and displays the mapping relationship between the second port and the first signal.

[0086] In a possible implementation, the nested software architecture belongs to a software architecture in AUTOSAR.

[0087] In a fifth aspect, the present application provides a software design device, comprising a processor and a memory, wherein the memory is configured to store computer programs or computer instructions, and the processor is configured to execute the computer programs or computer instructions stored in the memory, so that the device executes the method according to any one of the first aspect.

[0088] In a sixth aspect, the present application provides a software design device, comprising a processor and a memory, wherein the memory is configured to store computer programs or computer instructions, and the processor is configured to execute the computer programs or computer instructions stored in the memory, so that the device executes the method according to any one of the second aspect.

[0089] In a seventh aspect, the present application provides a computer readable storage medium, which stores computer programs or computer instructions, and the computer programs or computer instructions are executed by a processor to implement the method according to any one of the first aspect.

[0090] In an eighth aspect, the present application provides a computer readable storage medium, which stores computer programs or computer instructions, and the computer programs or computer instructions are executed by a processor to implement the method according to any one of the second aspect.

[0091] In a ninth aspect, the present application provides a computer program product, and when the computer program product is executed by a processor, the method according to any one of the first aspect will be implemented.

[0092] In a tenth aspect, the present application provides a computer program product, and when the computer program product is executed by a processor, the method according to any one of the second aspect will be implemented.

[0093] The corresponding beneficial effects of the second aspect to the tenth aspect can be referred to the corresponding introduction in the first aspect, and will not be repeated. BRIEF DESCRIPTION OF DRAWINGS

[0094] FIG. 1 and FIG. 2 show schematic diagrams of nested software architecture;

[0095] FIG. 3 shows a schematic diagram of component port connection;

[0096] FIG. 4 shows a schematic diagram of the result of automatic connection of component ports;

[0097] FIG. 5 shows a schematic diagram of signal mapping of component ports;

[0098] FIG. 6 shows a schematic diagram of the steps of component port connection;

[0099] FIG. 7 shows a schematic diagram of the method provided by the present application;

[0100] FIG. 8 to FIG. 9 show schematic diagrams of nested software architecture;

[0101] FIG. 9A shows a schematic diagram of the method provided by the present application;

[0102] FIG. 10 shows a schematic diagram of nested software architecture;

[0103] FIG. 10A shows a schematic diagram of the method provided by the present application;

[0104] FIG. 11 shows a schematic diagram of nested software architecture;

[0105] FIG. 12 to FIG. 14 show schematic diagrams of device structures. DETAILED DESCRIPTION

[0106] In the embodiments of the present application, “multiple” refers to two or more. In the embodiments of the present application, “and / or” is used to describe the association relationship of the associated objects, which means three kinds of independent existence, for example, A and / or B, which means A exists alone, B exists alone, or A and B exist together. The description such as “at least one of a1, a2, …, and an (or at least one)” adopted in the embodiments of the present application includes any one of a1, a2, …, and an exists alone, and also includes any combination of a1, a2, …, and an exists, each of which can exist alone; for example, the description of “at least one of a, b, and c” includes the cases of a alone, b alone, c alone, a and b in combination, a and c in combination, b and c in combination, or abc in combination.

[0107] The terms "first", "second", and the like in the present application are used to distinguish between elements or items that have substantially the same function and are not intended to imply a logical or chronological relationship between the elements or items. Nor are the terms "first", "second", and the like intended to limit the number or order of the elements or items. It should also be understood that, although the following description uses the terms first, second, and the like to describe various elements, these elements should not be limited by the terms. These terms are only used to distinguish one element from another.

[0108] In various embodiments of the present application, the terms and / or descriptions between various embodiments are consistent and can be referred to each other if there is no special description and logical conflict. The technical features in different embodiments can be combined to form new embodiments according to their inherent logical relationship.

[0109] In order to facilitate the understanding of the embodiments of the present application, the following will first exemplarily introduce the terms involved in the present application.

[0110] 1. Nested software architecture.

[0111] A plurality of software components (SWC) can be configured in a nested structure to form a nested software architecture. The nested software architecture can also be referred to as a nested component architecture. Component nesting refers to a component that also includes a component with a smaller component division granularity. The component with a smaller component division granularity can be referred to as a sub-component of the one component. The nested software architecture can be composed of a plurality of levels of nested components. The outermost component is the component with the largest division granularity. The outermost component can nest one or more sub-components. Some or all of these sub-components can further nest one or more sub-components. Until the nested sub-component cannot be further decomposed into smaller software components, and thus cannot continue to nest components. The software component that cannot be further decomposed in the embodiments of the present application is referred to as the component with the smallest division granularity. For the sake of brevity of subsequent description, the component with the smallest division granularity is referred to as a unit component in the embodiments of the present application. In addition, in the embodiments of the present application, a software component that includes a component with a smaller division granularity than itself is referred to as a combined component. That is, the combined component can include one or more sub-components with smaller division granularity. The outermost component in the nested software architecture also belongs to the combined component.

[0112] Exemplarily, the division of the division granularity of the components is related to the specific software design requirement. For example, taking the nested software architecture in a vehicle as an example. In one possible software design requirement implementation, components for controlling vehicle lights, components for controlling door handles, components for adjusting seats, and the like can be divided into components with the smallest division granularity. In another possible software design requirement implementation, the smallest division granularity of the software components can be different. Taking the components for adjusting seats as an example, the components for adjusting seats can be a combined component. The components for adjusting seats can be further divided into components for obtaining seat switch states and components for driving seat adjustment motors, and the like, which have finer granularity. In this possible implementation, the components for obtaining seat switch states and the components for driving seat adjustment motors are components with the smallest division granularity. It can be understood that the examples herein do not constitute a limitation on the embodiments of the present application. The embodiments of the present application do not limit the division of the division granularity of the components.

[0113] In order to facilitate understanding of the nested software architecture and the hierarchy, exemplary reference can be made to FIG. 1.

[0114] In (a) of FIG. 1, a three-level nested software architecture is exemplarily shown. The outermost layer, i.e., the first level, of the nested software architecture includes component 1. That is, the component 1 is the component with the largest division granularity in the nested software architecture. Exemplarily, the second level of the nested software architecture includes component 1.1 and component 1.2. The component 1.1 and the component 1.2 are sub-components of the component 1 and have smaller division granularity than the component 1. Among them, the component 1.2 cannot be further divided and is the software component with the smallest division granularity in the nested software architecture. Exemplarily, the component 1.1 includes three sub-components, i.e., component 1.1.1, component 1.1.2, and component 1.1.3. That is, the third level of the nested software architecture includes component 1.1.1, component 1.1.2, and component 1.1.3. Since the component 1.1.1, the component 1.1.2, and the component 1.1.3 are components that cannot be further divided, these three components do not have nested sub-components. Exemplarily, the nested software architecture can be represented by a tree structure, for example, as shown in (b) of FIG. 1. The tree structure can more clearly show the components included in the three levels, which will not be described one by one here. In FIG. 1, the component 1 and the component 1.1 each include a plurality of sub-components, which are the combined components described above.

[0115] Exemplarily, the nested software architecture described above can be, for example, a nested software architecture in automotive open system architecture (AUTOSAR). Alternatively, it can be any other software architecture constructed in a nested manner, and the embodiments of the present application do not limit this. The following will be further introduced taking the nested software architecture in AUTOSAR as an example.

[0116] The AUTOSAR architecture is a set of proven software architecture for reducing the complexity of software development for electronic control unit (ECU) in vehicles, and is a basic architecture for management of embedded application functions in vehicles, and is also a basis for developing reusable applications. The nested software architecture in the AUTOSAR can include a nested software architecture of one or more ECUs in a vehicle. The nested software architecture of the ECU is composed of various functional software components in the ECU, and is a basis for implementing various functions of the ECU. Exemplarily, the nested software architecture of the ECU can include application software components, sensor software components, or actuator software components controlled by the ECU, and the like.

[0117] Exemplarily, the nested software architecture of the ECU includes atomic software components (Atomic SWC) and composition software components (Composition SWC). The atomic software component is a basic indivisible minimum building block, and provides a code unit with the smallest granularity. That is, the atomic software component belongs to the component with the smallest granularity. The composition software component can also be referred to as a part. The composition software component can include a plurality of atomic software components and / or a plurality of composition software components. That is, the composition software component belongs to the combined component. The outermost software component in the nested software architecture of the ECU is referred to as a root (root) composition software component. That is, the first level in the nested software architecture of the ECU is the root composition software component. It can be understood that the nested software architecture of a single ECU includes a root composition software component. For the convenience of description, in the following embodiments, the composition software component is represented by C_SWC, and the atomic software component is represented by A_SWC.

[0118] Similarly, the nested software architecture of the ECU can be a multi-level nested architecture. The first level only includes the root composition software component. Each of the remaining levels can include a plurality of atomic software components and / or a plurality of composition software components. The components in each level are configured according to actual application requirements, and the embodiments of the present application do not limit this. For the convenience of understanding, exemplary reference can be made to FIG. 2.

[0119] Figure 2 illustrates a possible nested software architecture of an ECU as an example of a tree structure. In Figure 2, four levels are illustrated as an example. The first level is a root composite software component C_SWC_root. The second level includes a composite software component C_SWC1.1, a composite software component C_SWC1.2, an atomic software component A_SWC1.3 and an atomic software component A_SWC1.4. The software components of the second level are subcomponents of C_SWC_root, i.e. C_SWC_root includes the software components of the second level. The third level includes an atomic software component A_SWC1.1.1, a composite software component C_SWC1.2.1, a composite software component C_SWC1.2.2 and an atomic software component A_SWC1.2.3. Among them, A_SWC1.1.1 is a subcomponent of C_SWC1.1. C_SWC1.2.1, C_SWC1.2.2 and A_SWC1.2.3 are subcomponents of C_SWC1.2. The fourth level includes an atomic software component A_SWC1.2.1.1 and an atomic software component A_SWC1.2.2.1. Among them, A_SWC1.2.1.1 is a subcomponent of C_SWC1.2.1. A_SWC1.2.2.1 is a subcomponent of C_SWC1.2.2. It can be understood that Figure 2 is only an example and does not constitute a limitation on the embodiments of the present application.

[0120] By way of example, each ECU can include a plurality of software components of different levels. For example, in an ECU, there are mainly several core functions, and each core function corresponds to a software component. A core function can include several sub-functions, and each sub-function corresponds to a software component. By way of example, the software component corresponding to a sub-function can be referred to as a subcomponent. Optionally, the sub-function can be further divided into sub-functions of smaller granularity. Until it cannot be further divided, the software component corresponding to the sub-function that cannot be further divided is the atomic software component. The software component that can be divided into sub-functions is the composite software component. The component corresponding to the ECU is the software component of the largest granularity, i.e. the software component corresponding to the ECU is the root composite software component.

[0121] Exemplarily, the ECU can be a domain controller in a vehicle. For example, it can be a vehicle domain controller (VDC), a cockpit domain controller (CDC), a vehicle integrated / integration unit (VIU), a mobile data center (MDC), a central computing architecture (CCA), or the like. Exemplarily, the MDC belongs to an intelligent driving computing module of the vehicle, and can also be referred to as a motion domain controller (MDC). Alternatively, the ECU can be an engine controller, a motor controller, a battery management system controller, a vehicle controller, a brake controller, an air conditioner controller, a vehicle lock controller, a seat controller, or the like. It can be understood that the description of the ECU herein is only an example and does not constitute a limitation on the embodiments of the present application.

[0122] It can be understood that the above mainly takes the nested software architecture in AUTOSAR as an example for description. For the composition and hierarchy in other nested software architectures, reference can be made to the above description of the nested software architecture of the ECU, and details are not repeated here.

[0123] 2. Port and interface.

[0124] The software components in the above nested software architecture can communicate with each other through ports. The port is a logical channel in the software component for data transmission.

[0125] The interface is an abstract concept for defining the interaction between different entities (for example, the above software components). For example, in the communication scenario between the components in the above nested software architecture, the interface defines the data format and / or behavior specification and / or transmission rules of the port associated with the interface according to the communication protocol. Exemplarily, the interface can allow the internal operation to be separated from the external interaction, so that internal modification does not affect the way the external entity interacts with it.

[0126] The relationship between the port and the interface is exemplarily introduced taking the nested software architecture of the ECU as an example.

[0127] The software components of the ECU embedded software architecture described above can be configured with ports for communication with other software components. A port can include one or more of a provided port (PPort), a required port (RPort), and a provided-and-required port. A provided port can also be referred to as a supply-type port. A provided port can be used to provide certain data or certain operations externally. A required port can also be referred to as a demand-type port. A required port can be used to obtain required data or requested operations from other software components. A provided-and-required port has the functionality of both a provided port and a required port. As can be seen, the type of a port defines the transmission direction of the port. A port is also associated with a corresponding interface to further define the data format and / or behavior specification and / or transmission rules of the port, etc. The interfaces can include the following types: sender-receiver interface (S / R), client-server interface (C / S), mode switch interface, non-volatile data interface (NvData), parameter interface, and trigger interface. Different interfaces represent different properties, which will not be described in detail herein. The ports associated with different interfaces are subject to specific connection rules. For example, see Table 1.

[0128] Table 1

[0129] As can be seen in Table 1, the connection rules of the ports associated with the sender-receiver interface, the parameter interface, and the non-volatile data interface are different from the connection rules of the ports associated with the client-server interface, the mode switch interface, and the trigger interface. The specific connection rules are described in Table 1 and will not be described again. Based on Table 1, it can also be seen that the sender-receiver interface, the parameter interface, and the non-volatile data interface can be associated with one PPort and one or more RPorts at the same time. Alternatively, the sender-receiver interface, the parameter interface, and the non-volatile data interface can be associated with one RPort and one or more PPorts at the same time. The client-server interface, the mode switch interface, and the trigger interface can only be associated with one PPort and one or more RPorts at the same time.

[0130] Exemplarily, in a possible implementation, if two software components need to communicate, but the ports between the two software components cannot be directly connected. For example, the ports between two atomic software components of different levels cannot be directly connected. For example, in FIG. 2, the atomic software component 1.3 and the atomic software component 1.2.2.1 belong to different levels and cannot be directly connected. Or, for example, the atomic software components of the same level but belonging to different composite software components, in which case the ports between the two atomic software components cannot be directly connected. For example, assuming that the composite software component 1.2 further includes an atomic software component 1.2.3 in FIG. 2, the atomic software component 1.2.3 and the atomic software component 1.1.1 belong to different composite software components and cannot be directly connected. It can be understood that the examples listed herein of ports that cannot be directly connected do not constitute a limitation on the embodiments of the present application, and other cases in which the ports cannot be directly connected are also possible, which will not be described herein. Since the ports between the two software components cannot be directly connected, additional ports are needed to realize communication after being transferred. The port used for transfer can be referred to as a proxy port. The proxy port can be a provided port, a required port, or a provided-and-required port, which is determined according to actual configuration, and the embodiments of the present application do not limit this. In order to facilitate understanding, the following will be introduced by taking FIG. 3 as an example.

[0131] In FIG. 3, it is assumed that there are two composite software components C_SWC1 and C_SWC2. Among them, the C_SWC1 includes an atomic software component A_SWC1. The C_SWC2 includes an atomic software component A_SWC2. The A_SWC1 is configured with a provided port P1. The A_SWC2 is configured with a required port P2. Since the A_SWC1 and the A_SWC2 belong to different composite software components, they cannot be directly connected for communication. Therefore, a proxy port P3 is configured in the C_SWC1. A proxy port P4 is configured in the C_SWC2. The proxy port P3 is a provided port. The proxy port P4 is a required port. Based on this, the port P1 is connected with the port P3, the port P3 is connected with the port P4, and the port P4 is connected with the port P2. Thus, a communication path between the A_SWC1 and the A_SWC2 is constructed, so that the A_SWC1 and the A_SWC2 can communicate.

[0132] Exemplarily, in an implementation, if there are two ports, one is a provided port and the other is a required port, and the two ports are configured to associate the same interface, or it can be understood that the two ports correspond to the same data format and / or behavior specification and / or transmission rule, then the two ports can be referred to as matching. The two matching ports can be connected for communication. In another implementation, if the two matching ports cannot be directly connected, then the connection between the two ports can be realized through one or more proxy ports. Then, the two ports and the corresponding proxy ports also match.

[0133] 3. Configuration file.

[0134] The configuration file is a computer file that can configure parameters and initial settings for some computer programs. For ease of understanding, the configuration file of the nested software architecture of the ECU is taken as an example.

[0135] Exemplarily, in a possible implementation, the configuration file of the nested software architecture of the ECU can be an AUTOSAR extensible markup language (ARXML) file. The ARXML file is a configuration file saved in an extensible markup language (XML) format, that is, an XML file. The ARXML file is used to establish a software architecture for the ECU of a vehicle, and contains configuration and specification information of the ECU in the vehicle in an XML format. Therefore, the configuration file can be used to query the nested software architecture of the ECU and the configuration information and data in each software component. For example, the port configuration in the software component, the transmission direction of the port, and the interface associated with the port can be queried.

[0136] Exemplarily, the configuration file of the nested software architecture of the ECU is not limited to the ARXML file, but can also be a configuration file in other formats, for example, a configuration file in a JSON or INI format. Exemplarily, in a possible implementation, configuration files in different formats can be converted into each other, and the embodiments of the present application do not limit this.

[0137] 4. Software development tool.

[0138] The software development tool is a tool used in the computer-aided software life cycle process. These tools are usually designed to support specific software engineering methods, aiming to reduce the burden of manual management, thereby improving the quality and efficiency of software development. They can cover various aspects such as planning, analysis, design, testing, documentation, and management, and provide different levels of assistance to software developers. Software development tools not only include narrow programming stages, but also involve a wide range of content, ensuring effective support in each stage of the software development process. Different types of software can have different software development tools, and the embodiments of the present application do not limit this. For ease of understanding, the AUTOSAR software development tool is taken as an example.

[0139] Since AUTOSAR is only a standard framework, a methodology, it cannot be directly applied. Therefore, software manufacturers need to cooperate with hardware chips, especially MCUs, to do secondary development. Software vendors can develop some software development tools to implement the construction of AUTOSAR. For example, the construction of AUTOSAR includes defining software components and configuring data communication relationships between software components. Exemplarily, the software development tool can provide a visual interface for users to design. For example, through the visual interface, the user can create an AUTOSAR construction project, and then in the newly created project, define software components and configure data communication relationships between software components, and the like. In the software development tool, a corresponding configuration file meeting the AUTOSAR standard format can also be generated according to the definition and configuration of the user. For example, the ARXML file described above, and the like, which are not limited by embodiments of the present application.

[0140] In combination with the related terms introduced above, the defects of the existing software development tool will be analyzed first. The AUTOSAR software development tool is mainly taken as an example for description.

[0141] In the software development process, software engineers usually design software architecture through software development tools. Based on the above introduction of the AUTOSAR software development tool, it can be known that the construction of AUTOSAR needs to configure the data communication relationship between software components. The communication behavior between software components in the AUTOSAR software architecture is divided into two types: the first type is the communication within an ECU; the second type is the communication between ECUs. The communication within an ECU can be defined through the connection between the ports of software components. The communication between ECUs, for example, through the controller area network (CAN), the controller area network with flexible data-rate (CANFD), or the scalable service-oriented middleware over IP (SOME / IP) protocol, needs to be defined through the mapping between the port and the signal. For example, after a mapping relationship is configured between a port and a signal, it indicates that the port can be used to transmit the signal. Usually, the number of connections within a single ECU and signal mappings is several thousand, and it is difficult and prone to errors to manually configure the connections or mappings. Therefore, the AUTOSAR software development tool usually provides an automatic function to help users perform this part of the operation.

[0142] Exemplarily, although existing AUTOSAR software development tools can provide an automatic wiring function to help users quickly implement the connection configuration between software ports. However, the existing software development tools support limited automatic wiring functions, and still require users to manually connect the configuration in complex wiring scenarios, resulting in low efficiency and easy errors.

[0143] For example, the existing AUTOSAR software development tools support automatic connection of ports belonging to the same level software components in the same composite software component, that is, if the ports of two software components at the same level within a composite software component match, the tool will generate a connection for the matching ports. In addition, if the port configured by an atomic software component matches the port configured by the composite software component to which it belongs, the tool can also generate a connection for the matching port. For ease of understanding, an example is introduced in conjunction with FIG. 4.

[0144] In FIG. 4, C_SWC_root represents a root composite software component at the first level, the second level includes a composite software component C_SWC1.1 and an atomic software component A_SWC1.2. The third level includes three atomic software components A_SWC1.1.1, A_SWC1.1.2 and A_SWC1.1.3, which are subcomponents of C_SWC1.1. In addition, a provided port P 1.1 is configured in the composite software component C_SWC1.1. A required port P 1.2 is configured in the atomic software component A_SWC1.2. The atomic software components A_SWC1.1.1, A_SWC1.1.2 and A_SWC1.1.3 respectively correspond to the provided ports P 1.1.1 , P 1.1.2 and P 1.1.3 . If the configured port P 1.1.1 matches the port P 1.2 , and since the port P 1.1.1 and the port P 1.2 cannot be directly connected, the port P 1.1 is configured as a proxy port between the port P 1.1.1 and the port P 1.2 . In addition, the port P 1.1.2 and the port P 1.1.3 match. Based on these configurations, after the connection between the ports is implemented through the automatic wiring function of the AUTOSAR software development tool, the connection result is shown on the right side of FIG. 4. It can be seen that only the port P 1.1.1 and the port P 1.1 are connected, and the port P 1.1.2 and the port P 1.1.3 are connected. Since the port P 1.1 and the port P1.2 The ports of software components belonging to different levels, the automatic connection function cannot realize automatic connection between the two ports.

[0145] In addition, the existing AUTOSAR software development tool supports the implementation of signal automatic mapping in the case that the root composite software component has established proxy ports for the communication between ECUs. For example, referring to FIG. 5, the port P_signal1 has been established on the root composite software component C_SWC_root, and the port name and a signal name signal1 can satisfy the string fuzzy matching rule. That is, "signal1" in the port P_signal1 and the name of the signal signal1 are fuzzy matched. Then, the signal mapping configuration corresponding to the port and the signal can be generated.

[0146] Based on the above description, it can be known that the automatic connection function of the existing AUTOSAR software development tool reduces the manual configuration workload of the user in the communication design process of the software component. However, due to the limited automatic connection function, the matching relationship between the ports of the software components across levels cannot be automatically recognized. In the multi-level software architecture scenario, a lot of connection configurations are still manually completed by the user. Secondly, the existing AUTOSAR software development tool cannot automatically recognize the mapping relationship between the ports of the software components other than the root composite software component and the signal, and cannot automatically generate the signal mapping configuration. In order to further understand the deficiencies of the existing AUTOSAR software development tool, the following describes an example in combination with FIG. 6.

[0147] In FIG. 6, the connection configuration states of the ports in six software components (a), (b), (c), (d), (e) and (f) are exemplarily shown. The state (a) is the original state. The introduction about the state (a) can refer to the related description of the foregoing FIG. 4, and will not be described herein. Different from FIG. 4, the state (a) does not configure the port P 1.1 . It is assumed that, for the state (a), the port P 1.1.1 and the port P 1.2 are matched, the port P 1.1. 2 and the port P 1.1.3 are matched. In addition, the port P 1.1.1The transmission signal signal1 is used to realize the communication between ECUs. In order to realize this configuration, in the process of communication design, on the basis of state (a), the automatic connection between the matching ports in the composite software component C_SWC1.1 can be realized by the automatic connection function in the AUTOSAR software development tool, and the obtained state is shown as (b) in FIG. 6. Since the existing AUTOSAR software development tool supports the automatic connection of the ports in the same level, after the composite software component C_SWC1.1 is selected, only the matching ports (for example, the ports P 1.1.2 and P 1.1.3 ) in the same level in the composite software component C_SWC1.1 can be recognized for automatic connection.

[0148] On the basis of state (b), the proxy port P 1.1 is manually created and connected with the port P 1.1.1 and the port P 1.1 , and the obtained state is shown as (c) in FIG. 6. The port P 1.1 can be understood as the port of the composite software component C_SWC1.1.

[0149] On the basis of state (c), the automatic connection between the matching ports in the root composite software component C_SWC_root is realized again by the automatic connection function in the AUTOSAR software development tool, and the obtained state is shown as (d) in FIG. 6. Similarly, since the existing AUTOSAR software development tool only supports the automatic connection of the ports in the same level, after the root composite software component C_SWC_root is selected, only the matching ports (for example, the ports P 1.1 and P 1.2 ) in the same level in the root composite software component C_SWC_root can be recognized for automatic connection. That is, the composite software component C_SWC1.1 is regarded as a whole, and the ports inside the composite software component C_SWC1.1 cannot be perceived.

[0150] On the basis of state (d), the proxy port P_signal1 is manually created and connected with the port P 1.1 and the port P_signal1, and the obtained state is shown as (e) in FIG. 6. The port P_signal1 is the port of the root composite software component C_SWC_root.

[0151] On the basis of state (e), the mapping configuration of the port P_signal1 and the signal signal1 is generated by the automatic mapping function in the AUTOSAR software development tool, and the obtained state is shown as (f) in FIG. 6. At this time, the configuration of the foregoing setting is completed. It can be seen that in this process, the configuration process is tedious, and the user needs to manually configure multiple times, and the order of these configuration steps cannot be changed.

[0152] The above Fig. 6 shows only one possible example, and for more complex hierarchy and more software architecture, the steps of communication design will only be more. The more steps need to be manually configured by the user. This results in low design efficiency and high configuration error rate.

[0153] Based on the above introduction, in order to improve the software design efficiency and reduce the connection error rate, the embodiment of the present application provides a port connection method in the software architecture design process and related device. Exemplarily, the method can be applied in a software development tool. The software development tool can be a set of software, which can be installed and run in a device. Exemplarily, the device can be, for example, a device capable of providing a user interface to interact with a user through a display device (such as a display screen, etc.). For example, the device includes but is not limited to any kind of fixed computer or handheld electronic product based on a smart operating system, which can interact with the user through a keyboard, a virtual keyboard, a touchpad, a touch screen, and a voice control device, etc. The device such as a desktop computer, a personal computer, a tablet computer or a smart phone, etc. The embodiment of the present application does not limit this. Based on this, the execution subject of the foregoing method can be, for example, the device or can be a processor or a chip system, etc. in the device. For the convenience of description, the execution subject of the method is referred to as a software design device.

[0154] Next, an exemplary port connection method in the software architecture design process provided by the embodiment of the present application is introduced. Exemplarily, referring to Fig. 7, the method includes but is not limited to the following steps S701 and S702.

[0155] S701, obtaining a first path between a first port and a second port; the first port is a port in a first component included in a nested software architecture, the second port is a port in a second component in a different level from the first component in the nested software architecture, or the second port is a port in a third component in the nested software architecture; the first component and the second component belong to a software component unit with the smallest component division granularity in the nested software architecture; the third component belongs to a software component unit with the largest component division granularity in the nested software architecture.

[0156] Exemplarily, the nested software architecture can be any software architecture constructed in a nested manner as introduced above. For example, it can be an ECU nested software architecture in AUTOSAR, etc. For details, please refer to the foregoing related introduction, which is not repeated here.

[0157] Exemplarily, in combination with the aforementioned description of the terms, the first component and the second component belong to unit components in the nested software architecture. The third component belongs to the outermost component in the nested software architecture. If the nested software architecture is the ECU nested software architecture in AUTOSAR, the first component and the second component belong to atomic software components in the ECU nested software architecture. The third component belongs to the outermost software component in the ECU nested software architecture, i.e., belongs to a root composite software component.

[0158] Exemplarily, before the software design apparatus obtains the first path between the first port and the second port, a user defines the nested software architecture. Exemplarily, the user can define the nested software architecture through a software development tool in a programming process. Alternatively, exemplarily, the nested software architecture can be defined in advance and saved in a configuration file, for example, saved in the ARXML file, etc. Then, the software development tool reads the configuration file to obtain the nested software architecture.

[0159] Exemplarily, the first path is a connection path for realizing communication between the first port and the second port. The connection path includes one or more other component ports in addition to the first port and the second port. Details are described later and are not described here.

[0160] Exemplarily, in the case that the first port is a port in the first component included in the nested software architecture and the second port is a port in the second component at a different level from the first component in the nested software architecture, the communication between the first port and the second port belongs to internal communication in the nested software architecture. For the convenience of subsequent description, this case is referred to as an internal communication scenario. For example, assuming that the nested software architecture is the aforementioned ECU nested software architecture. Then, the internal communication scenario can be an intra-ECU communication scenario. In the case that the first port is a port in the first component included in the nested software architecture and the second port is a port in the third component in the nested software architecture, since the third component belongs to the outermost software component in the nested software architecture, the second port is used for communication with an object outside the nested software architecture. That is, the communication between the first port and the second port is for realizing communication with an object outside the nested software architecture. For the convenience of subsequent description, this case is referred to as an external communication scenario. For example, assuming that the nested software architecture is the aforementioned ECU nested software architecture. Then, the external communication scenario can be an inter-ECU communication scenario. The implementation process of obtaining the first path in the internal communication scenario and the external communication scenario can be different, which will be exemplarily described later, and is not described here.

[0161] S702, based on the first path, completing connection between the first port and the second port.

[0162] After the first path is obtained, the indirect connection between the ports in the first path can be implemented based on the first path through an assembly connector and / or a delegation connector. Then the connection between the first port and the second port is completed. Exemplarily, the assembly connector is used to connect the ports inside a combination component. For example, the assembly connector can be used to implement the connection between the provided port and the required port in the combination component. The delegation connector is used to connect the port inside the combination component with the port outside the combination component. For example, the delegation connector can implement the connection between the proxy port of the combination component and the port of another component, and the transmission directions of the two ports are the same.

[0163] The implementation process of obtaining the first path and completing the connection between the first port and the second port based on the first path in the internal communication scenario and the external communication scenario will be described respectively.

[0164] The implementation process of obtaining the first path and completing the connection between the first port and the second port based on the first path in the internal communication scenario will be described first.

[0165] In the internal communication scenario, based on the defined nested software architecture and the transmission direction and associated interface of the port in the unit component of the nested software architecture, it can be determined that the first port and the second port are matched. The two matched ports can be connected to implement communication. Since the first port and the second port belong to the ports in the two components of different levels in the nested software architecture, they cannot be directly connected, so it is necessary to determine the connection path (i.e. the first path) between the first port and the second port. Then, the connection between the first port and the second port is implemented according to the first path. In order to facilitate the understanding of the implementation process of these steps, the possible implementation process will be described in combination with four steps.

[0166] The first step: determining a first nested path and a second nested path based on the nested software architecture. The first nested path indicates the position of the first component to which the first port belongs in the nested software architecture. The second nested path indicates the position of the second component to which the second port belongs in the nested software architecture. Exemplarily described as follows.

[0167] Exemplarily, after obtaining the nested software architecture, the software design apparatus can start from the outermost component of the nested software architecture, recursively traverse the components of each layer, and obtain all unit components included in the nested software architecture. During the recursive traversal, the nested path of each unit component in the nested software architecture is recorded. The nested path of the unit component indicates the position of the unit component in the nested software architecture. The unit component can be found in the nested software architecture through the nested path. For example, if the nested software architecture is the ECU nested software architecture, the unit component is an atomic software component, and the outermost component is a root composite software component. Then, the software design apparatus can start from the root composite software component of the ECU nested software architecture, recursively traverse the components of each layer, and obtain all atomic software components included in the ECU nested software architecture. During the recursive traversal, the nested path of each atomic software component in the ECU nested software architecture is recorded. For ease of understanding, the following examples are described in combination with FIG. 2 and FIG. 8.

[0168] FIG. 8 exemplarily shows a possible ECU nested software architecture. FIG. 2 shows the ECU nested software architecture shown in FIG. 8 in a tree structure. The ECU nested software architecture is exemplarily shown in four levels. The software components included in each level and the nested relationship can refer to the foregoing description of FIG. 2, and will not be described herein. In addition, in FIG. 8, the atomic software component A_SWC1.1.1 includes a provided port P 1.1. 1. The atomic software component A_SWC1.2.1.1 includes a provided port P 1.2.1.1 . The atomic software component A_SWC1.2.2.1 includes a required port P 1.2. 2.1 . The atomic software component A_SWC1.3 includes a required port P 1.3 . The atomic software component A_SWC1.4 includes a required port P 1.4 .

[0169] As can be seen in FIG. 2 and FIG. 8, the atomic software components that can be obtained by traversing the ECU nested software architecture based on the above software design apparatus include A_SWC1.3, A_SWC1.4, A_SWC1.1.1, A_SWC1.2.3, A_SWC1.2.1.1 and A_SWC1.2.2.1. In addition, the nested paths of each atomic software component can be obtained. Take A_SWC1.2.1.1 as an example. The nested path of A_SWC1.2.1.1 is C_SWC_root→C_SWC1.2→C_SWC1.2.1→A_SWC1.2.1.1. Alternatively, the nested path of A_SWC1.2.1.1 can be represented as C_SWC_root→C_SWC1.2→C_SWC1.2.1, which indicates that A_SWC1.2.1.1 is a sub-component of C_SWC1.2.1 by default. That is, A_SWC1.2.1.1 can be found in C_SWC1.2.1. The nested paths of other atomic software components are similar and will not be described herein.

[0170] Since the first component and the second component belong to any two unit components at different levels in the nested software components, for example, in the nested software architecture shown in FIG. 8, the first component can be, for example, the atomic software component A_SWC1.2.1.1 at the fourth level, and the second component can be, for example, the atomic software component A_SWC1.4 at the second level. Alternatively, the first component can be, for example, the atomic software component A_SWC1.1.1 at the third level, and the second component can be, for example, the atomic software component A_SWC1.3 at the second level. It can be understood that this is only an example and does not constitute a limitation on the embodiments of the present application. Then, based on the implementation process, the first nested path and the second nested path can be determined.

[0171] The second step is to traverse the ports in all the unit components determined in the first step to determine one or more matched port pairs. The first port and the second port belong to one of the one or more port pairs. The following is an exemplary description.

[0172] Exemplarily, based on the foregoing description of the technical terms of the port and the interface, each port is configured with an associated interface. Then, the matched port pair can be determined based on the interface associated with the port. Exemplarily, based on the foregoing description of Table 1, one providing port can be connected with one or more demand ports, i.e., one providing port can be matched with one or more demand ports. In addition, for the ports associated with the sender-receiver interface, the parameter interface and the non-volatile data interface, one demand port can be connected with one or more providing ports, i.e., one demand port can be matched with one or more providing ports. Based on this, if the providing port in one unit component and the demand port in another unit component are associated with the same interface, then the providing port and the demand port can be determined as a matched port pair.

[0173] Exemplarily, in one possible implementation, two HashMap tables can be established in the process of traversing the ports of all the unit components. One HashMap table is used to store the providing ports associated with each interface, and the other HashMap table is used to store the demand ports associated with each interface. Based on the other HashMap table and the connection rules of the ports associated with each interface in Table 1, one or more matched port pairs in all the unit components can be determined. Alternatively, in another possible implementation, the HashMap tables do not need to be established. In the process of traversal, a relationship table of the providing ports and the demand ports associated with each interface can be constructed. That is, the relationship table stores the providing ports and the demand ports associated with each interface. Based on the relationship table, one or more matched port pairs in all the unit components can be determined in combination with Table 1. It can be understood that the implementation of determining the port pair here is only an example and does not constitute a limitation on the embodiments of the present application.

[0174] In one possible implementation, in order to avoid repeatedly connecting the ports, the one or more matched port pairs determined above are unconnected port pairs. That is, in the foregoing traversal process, if it is found that two ports are matched, but the two ports are already connected, then the subsequent processing of the ports is not continued.

[0175] Exemplarily, the one or more matched port pairs determined above can be displayed through the user interface of the display device. For example, the association relationship between the one or more matched port pairs and the associated interfaces can be displayed on the user interface. Exemplarily, the one or more matched port pairs can be displayed on the user interface in the form of a table, text or a connection schematic diagram. In order to facilitate understanding, the following is introduced by taking the table display as an example in combination with the nested software architecture shown in Figure 8.

[0176] Exemplarily, assume that there are four matched port pairs in the nested software architecture shown in FIG. 8 as follows: the provided port P 1.2.1.1 of the atomic software component A_SWC1.2.1.1 matches the required port P 1.2.2.1 of the atomic software component A_SWC1.2.2.1, both of which are associated with interface 1; the provided port P 1.2.1.1 of the atomic software component A_SWC1.2.1.1 matches the required port P 1.4 of the atomic software component A_SWC1.4, both of which are associated with interface 1; the provided port P 1.2.1.1 of the atomic software component A_SWC1.2.1.1 matches the required port P 1.2.3 of the atomic software component A_SWC1.2.3, both of which are associated with interface 1; the provided port P 1.1.1 of the atomic software component A_SWC1.1.1 matches the required port P 1.3 of the atomic software component A_SWC1.3, both of which are associated with interface 2. See Table 2 below, which exemplarily shows a table representing the four port pairs.

[0177] Table 2

[0178] Exemplarily, the above Table 2 can be displayed on a user interface for a user to view. In the above Table 2, the association between the above four port pairs and the associated interfaces is shown. Optionally, referring to the two columns of provided ports and required ports, the atomic software components to which the ports belong can also be indicated.

[0179] Optionally, the Table 2 can also include a “selection” column. A user can select the port pairs that need to be connected in the “selection” column. For example, the user can click the check box control in the “selection” column corresponding to the port pair that needs to be connected, and after clicking, a “√” is marked in the check box, indicating that a connection path between the port pair will be generated subsequently. Alternatively, the check box control in the “selection” column can be replaced by a “confirm” button, and clicking the corresponding “confirm” button can indicate that a connection path between the corresponding port pair is to be generated. It can be understood that the Table 2 shown is only an example and does not constitute a limitation on the embodiments of the present application. Exemplarily, after the above software design apparatus displays the above Table 2 on a user interface, the above software design apparatus can receive a user click operation on the control or button corresponding to the port pair in the “selection” column. Then, in response to the operation, a connection path between the corresponding port pair is generated. The specific implementation of generating the connection path can be referred to the introduction of the subsequent fourth step, which is not described in detail here.

[0180] In another possible implementation, the user interface shown in Table 2 can further include another button, which can be a "confirm" button or a "generate connection path" button, etc. After the user clicks the control or button corresponding to the port pair in the "selection" column, the user further clicks the another button to trigger the path generation operation. It can be understood that the description of the operation of triggering the path generation in the embodiments of the present application is merely an example, and is not a limitation on the embodiments of the present application. In a specific implementation, the connection operation of the path can be triggered in any manner.

[0181] In another possible implementation, if the association between the port pairs and the interfaces is displayed in other forms in the user interface, there will be corresponding controls or buttons for the user to click to select the port pairs to generate the corresponding connection paths. The embodiments of the present application will not be described herein.

[0182] For example, based on the implementation process described above, all unconnected and matched port pairs in the nested software architecture can be determined. The first port and the second port belong to a port pair composed of two ports in two unit components of any different levels. For example, in Table 2, the first port can be port P1.2.1.1 in atomic software component A_SWC1.2.1.1 of the fourth level, and the second port can be port P1.2.3 in atomic software component A_SWC1.2.3 of the third level. 1.4 For example, the first port can be port P1.2.1.1 in atomic software component A_SWC1.2.1.1 of the fourth level, and the second port can be port P1.2.3 in atomic software component A_SWC1.2.3 of the third level. 1. 2.3 For example, the first port can be port P1.2.1.1 in atomic software component A_SWC1.2.1.1 of the fourth level, and the second port can be port P1.2.3 in atomic software component A_SWC1.2.3 of the third level. 1.1.1 For example, the first port can be port P1.2.1.1 in atomic software component A_SWC1.2.1.1 of the fourth level, and the second port can be port P1.2.3 in atomic software component A_SWC1.2.3 of the third level. 1.3 It can be understood that this is merely an example, and does not limit the embodiments of the present application. The examples herein mainly take the first port as a provided port and the second port as a required port as an example. In another possible implementation, the first port can be a required port, and the second port can be a provided port, which will not be described herein.

[0183] In one possible implementation, based on the implementation process and Table 2 described above, it can be seen that the embodiments of the present application can further determine the matched port pairs between unit components belonging to two different composite components but belonging to the same level, to implement the connection between the ports of the two unit components. For example, in Table 2, port P1.2.1.1 in atomic software component A_SWC1.2.1.1 of the fourth level and port P1.2.3 in atomic software component A_SWC1.2.3 of the third level are matched. 1.2.1.1Port in atomic software component A_SWC1.2.1.1 belonging to the fourth level 1.2.2.1 Port in atomic software component A_SWC1.2.2.1 belonging to the fourth level. The A_SWC1.2.1.1 is a sub-component of composite software component C_SWC1.2.1. The A_SWC1.2.2.1 is a sub-component of composite software component C_SWC1.2.2 which is different from C_SWC1.2.1. Although the A_SWC1.2.1.1 and A_SWC1.2.2.1 belong to different composite software components of the upper level, based on the implementation process described above, it can be determined that the port P 1.2.1.1 and port P 1.2.2.1 are a matched port pair which is not connected. The automatic connection of the port pair can be implemented subsequently.

[0184] The third step: generating a connection path between the matched port pair. It includes generating a first path between the first port and the second port. The following is an exemplary introduction.

[0185] Exemplarily, the nesting path of each unit component in the nested software architecture is recorded in the first step described above. For a matched port pair, the connection path between the port pair can be determined based on the nesting paths of the unit components to which the two ports of the port pair belong. In order to facilitate understanding, the following is an example of the introduction of the port pair consisting of the first port and the second port.

[0186] Exemplarily, the nesting path of the first component to which the first port belongs is the first nesting path described above. The nesting path of the second component to which the second port belongs is the second nesting path described above. Then, the connection path between the first port and the second port, i.e., the first path described above, can be determined based on the first nesting path and the second nesting path. First, the first port set can be obtained based on the first nesting path and the second nesting path. The first port set includes one or more providing ports associated with the first interface, and / or includes one or more requiring ports associated with the first interface. Exemplarily, the first interface may, for example, be any type of interface in Table 1 described above, and the embodiments of the present application do not limit this. Then, the first path can be determined based on the first port, the first port set and the second port. The following is an exemplary introduction of the implementation process of obtaining the first port set.

[0187] Exemplarily, the innermost combination component in the same combination components in the first nested path and the second nested path can be determined first. For the convenience of subsequent description, the innermost combination component is referred to as a fourth component. For example, the combination components in the first nested path and the second nested path can be compared, and the two nested paths can include one or more same combination components. The innermost combination component in the one or more same combination components is the fourth component. For the convenience of understanding, examples are illustrated in combination with FIG. 2 and FIG. 8.

[0188] For example, in the ECU nested software architecture shown in FIG. 2 and FIG. 8, it is assumed that the first component is atomic software component A_SWC1.2.1.1, and the second component is atomic software component A_SWC1.2.3. The nested path of the A_SWC1.2.1.1 is: C_SWC_root→C_SWC1.2→C_SWC1.2.1→A_SWC1.2.1.1. The nested path of the A_SWC1.2.3 is: C_SWC_root→C_SWC1.2→A_SWC1.2.3. It can be seen that the two nested paths include the same composite software component C_SWC1.2. Then, the composite software component C_SWC1.2 is the fourth component.

[0189] For another example, in the ECU nested software architecture shown in FIG. 2 and FIG. 8, it is assumed that the first component is atomic software component A_SWC1.2.1.1, and the second component is atomic software component A_SWC1.4. The nested path of the A_SWC1.2.1.1 is: C_SWC_root→C_SWC1.2→C_SWC1.2.1→A_SWC1.2.1.1. The nested path of the A_SWC1.4 is: C_SWC_root→A_SWC1.4. It can be seen that the two nested paths include the same composite software component C_SWC_root. Then, the composite software component C_SWC_root is the fourth component.

[0190] It can be understood that the above description of the fourth component is only an example and does not constitute a limitation on the embodiments of the present application.

[0191] Exemplarily, after the fourth component is determined, one or more providing ports associated with the first interface in the first port set and / or one or more demand ports associated with the first interface can be further acquired.

[0192] Exemplarily, the one or more associated first interface providing ports can include associated first interface providing ports in each of the combination components between the first component and the fourth component in the first nested path. Exemplarily, in a specific implementation, the combination components in the first nested path can be traversed one by one from the inner layer to the outer layer until the combination component before the fourth component in the first nested path is reached. During the traversal, it can be determined whether an associated first interface providing port has been configured in each of the combination components being traversed. If so, the associated first interface providing port is recorded. If no associated first interface providing port has been configured in the combination component being traversed, a new associated first interface providing port can be created for the combination component. The newly created port is recorded.

[0193] Exemplarily, in a possible implementation, the naming of the associated first interface providing port included in each combination component in the first nested path is the same as the naming of the first port by default. Therefore, the naming of the newly created associated first interface providing port is also the same as the naming of the first port by default. Alternatively, in another possible implementation, the naming of the associated first interface providing port included in each combination component can be different from the naming of the first port, as long as it can be identified as the port associated with the first interface. The embodiments of the present application do not limit this. For the convenience of subsequent description, the embodiments of the present application mainly introduce the implementation mode of the default same naming. The naming of the subsequent demand port is the same, and will not be described again.

[0194] Based on the above implementation mode, after the traversal is completed, the one or more ports recorded are the one or more associated first interface providing ports. For the convenience of understanding, examples are given below.

[0195] For example, in the ECU nested software architecture shown in FIG. 2 and FIG. 8, it is assumed that the first component is the atomic software component A_SWC1.2.1.1. The first nested path is: C_SWC_root→C_SWC1.2→C_SWC1.2.1→A_SWC1.2.1.1. Based on the foregoing description, C_SWC1.2 is the fourth component. Then, the composite software component C_SWC1.2.1 in the first nested path can be traversed. If the C_SWC1.2.1 has configured an associated first interface providing port, the port is recorded. If the C_SWC1.2.1 has not configured an associated first interface providing port, a new associated first interface providing port is created for the C_SWC1.2.1. Exemplarily, the naming of the associated first interface providing port in the C_SWC1.2.1 can be P 1.2.1.1 which is the same as the naming of the associated first interface port P 1.2.1.1The naming is the same. In order to distinguish, the embodiment of the present application will be referred to as P 1.2.1.1 indicated as P 1.2.1.1 (C_SWC1.2.1). That is, the latter bracket indicates the component name to which the port belongs.

[0196] In one possible implementation, if there is no other composite component between the first component and the fourth component in the first nested path, the traversal operation described above is not needed. This indicates that no other proxy providing port is needed to implement the connection between the first port and the second port.

[0197] Similarly, the one or more demand ports associated with the first interface may, for example, include the demand port associated with the first interface in each composite component between the second component and the fourth component in the second nested path. In a specific implementation, the composite components in the second nested path may, for example, be traversed one by one from the inner layer to the outer layer until the previous composite component of the fourth component in the second nested path is reached. During the traversal, it can be determined whether the demand port associated with the first interface has been configured in each composite component being traversed. If so, the demand port associated with the first interface is recorded. If the demand port associated with the first interface has not been configured in the composite component being traversed, a new demand port associated with the first interface can be created for the composite component. The newly created port is recorded. Based on this implementation, after the traversal is completed, the one or more ports recorded are the one or more demand ports associated with the first interface.

[0198] In one possible implementation, if there is no other composite component between the second component and the fourth component in the second nested path, the traversal operation described above is not needed. This indicates that no other proxy demand port is needed to implement the connection between the first port and the second port. For ease of understanding, an example is given below.

[0199] For example, in the ECU nested software architecture shown in FIG. 2 and FIG. 8, it is assumed that the second component is the atomic software component A_SWC1.2.3. The second nested path is: C_SWC_root→C_SWC1.2→A_SWC1.2.3. Based on the foregoing description, C_SWC1.2 is the fourth component. It can be seen that there is no other composite component between the fourth component C_SWC1.2 and the second component A_SWC1.2.3 in the second nested path. Therefore, it is indicated that no other proxy demand port is needed to implement the connection with the port P 1.2.3 in A_SWC1.2.3.

[0200] The first port set can be obtained based on the implementation process. Then, the first path can be determined based on the first port, the first port set and the second port. For the convenience of understanding, examples are given below.

[0201] For example, in the ECU nested software architecture shown in FIG. 2 and FIG. 8, assuming that the first component is atomic software component A_SWC1.2.1.1 and the second component is atomic software component A_SWC1.2.3, the first nested path is C_SWC_root→C_SWC1.2→C_SWC1.2.1→A_SWC1.2.1.1, and the second nested path is C_SWC_root→C_SWC1.2→A_SWC1.2.3. Based on the foregoing description, the providing port P 1.2.1.1 (C_SWC1.2.1) associated with the first interface can be obtained based on the first nested path. The required port associated with the first interface is not obtained based on the second nested path. Therefore, the first port set obtained is the port P 1.2.1.1 (C_SWC1.2.1). In addition, the first port is the providing port P 1.2.1.1 (A_SWC1.2.1.1) of the atomic software component A_SWC1.2.1.1. The second port is the required port P 1.2.3 (A_SWC1.2.3) of the atomic software component A_SWC1.2.3. Then, the connection path between the first port and the second port can be determined as: P 1.2.1.1 (A_SWC1.2.1.1)→P 1.2.1.1 (C_SWC1.2.1)→P 1.2.3 (A_SWC1.2.3). It can be understood that the connection path between the first port and the second port shown here is only an example and does not constitute a limitation on the embodiments of the present application.

[0202] Exemplarily, the connection paths of the port pairs in Table 2 can be generated according to the implementation manner described above. For example, the connection path between P 1.2.1.1 (A_SWC1.2.1.1) and P 1.2.2.1 (A_SWC1.2.2.1) can be: P 1.2.1.1 (A_SWC1.2.1.1)→P 1.2.1.1 (A_SWC1.2.1)→P 1.2.2.1 (A_SWC1.2.2)→P 1.2.2.1 (A_SWC1.2.2.1). For example, the connection path between P 1.2.1.1 (A_SWC1.2.1.1) and P 1.4 (A_SWC1.4) can be: P 1.2.1.1(A_SWC1.2.1.1)→P 1.2.1.1 (A_SWC1.2.1)→P 1.2.1.1 (A_SWC1.2)→P 1.4 (A_SWC1.4). For example, P 1.1.1 (A_SWC1.1.1) and P 1.3 (A_SWC1.3) are connected by P 1.1.1 (A_SWC1.1.1)→P 1.1.1 (A_SWC1.1)→P 1.3 (A_SWC1.3).

[0203] In one possible implementation, after the connection paths between each pair of matched ports that are not connected in the nested software architecture are generated, the connection paths can be displayed on a user interface. Similarly, the connection paths can be displayed on the user interface in the form of a table, text, or a connection diagram. The following is an example of a table.

[0204] Table 3

[0205] For example, the table 3 can be displayed on a user interface for a user to view. The connection paths in the table 3 are generated based on the matched port pairs shown in the table 2. In the table 3, the left two columns show the matched provided ports and required ports. The third column shows the connection paths between the matched port pairs.

[0206] Optionally, if the newly created port associated with the first interface is included in the generated connection paths, the newly created port can be identified by a special mark when the connection paths are displayed on the user interface. The special mark can be any form of mark, such as “*”, “#”, or “^”, and the like. The embodiments of the present application are not limited in this regard. For example, referring to the table 3, the newly created port is marked with the special mark “*”. It can be understood that the table 3 is only an example and does not limit the embodiments of the present application.

[0207] Optionally, the "selection" column can also be included in Table 3. The user can select the path to be connected in the "selection" column. For example, the user can click the box control in the "selection" column corresponding to the path to be connected, and after clicking, a "V" is marked in the box, indicating that the connection between the ports in the path will be automatically completed subsequently. Alternatively, the box control in the "selection" column can be replaced by a "confirmation" button, and clicking the corresponding "confirmation" button can indicate that the connection between the ports in the corresponding connection path needs to be implemented. It can be understood that Table 3 shown is only an example and does not constitute a limitation on the embodiments of the present application. For example, after the software design device displays Table 3 on the user interface, it can receive the user's click operation on the control or button corresponding to the connection path in the "selection" column. Then, the connection between the ports in the corresponding connection path is completed in response to the operation. The implementation of the specific path connection can be referred to in the subsequent description, which is not described in detail here.

[0208] In another possible implementation, the user interface displaying Table 3 can also include another button, for example, a "confirmation" button or a "generate connection line" button, etc. After the user clicks the control or button corresponding to the connection path in the "selection" column, further clicking the another button triggers the path connection operation. It can be understood that the description of the embodiments of the present application about triggering the path connection operation is only an example and does not constitute a limitation on the embodiments of the present application. In a specific implementation, any way can be used to trigger the path connection operation.

[0209] In another possible implementation, if the association relationship between the port pairs and the interfaces is displayed in other forms in the user interface, there will be corresponding controls or buttons for the user to click to select the port pairs to generate the corresponding connection paths. The embodiments of the present application will not be described again.

[0210] Based on the above implementation, the first path between the first port and the second port can be generated.

[0211] The fourth step is to complete the connection between the port pairs based on the connection path between the port pairs. It includes completing the connection between the first port and the second port based on the first path. The following is an example.

[0212] For example, the indirect connection between the ports in the connection path of the port pairs can be implemented by the assembly connector and / or the proxy connector. Then, the path connection between the matched port pairs is completed.

[0213] For example, in Table 3 displayed in the user interface, after the software design device receives the operation of triggering the path connection from the user, the connection between the ports in each connection path is completed by the assembly connector and / or the proxy connector in response to the operation.

[0214] In a possible implementation, the software design apparatus can further display, through a user interface, a nested software architecture including the paths of completed connections. For ease of understanding, the following introduces an example in combination with the foregoing Table 3 and FIG. 8.

[0215] For example, based on the foregoing introduction, it can be known that the connection paths shown in Table 3 are obtained based on the nested software architecture shown in FIG. 8. Then, a schematic diagram of the nested software architecture after the connection between the corresponding matching ports is completed based on the connection paths in Table 3 can be seen from FIG. 9. As can be seen from FIG. 9, the nested software architecture has been connected to each port according to the connection paths in Table 3. The nested software architecture shown in FIG. 9 can be displayed on a user interface for a user to view. It can be understood that FIG. 9 is only an example and does not constitute a limitation on the embodiments of the present application.

[0216] Based on the foregoing implementation, the connection between the first port and the second port can be completed.

[0217] For example, based on the foregoing first step to fourth step, the first path can be obtained and the connection between the first port and the second port can be completed based on the first path in the internal communication scenario.

[0218] For example, in another possible implementation, in the internal communication scenario, the implementation process of obtaining the first path and completing the connection between the first port and the second port based on the first path can be seen from FIG. 9A. As can be seen from FIG. 9A, in the implementation process, on the one hand, all unit components in the nested software architecture and the hierarchical relationship distribution (Map) of the unit components can be obtained, and the matching port pairs in the nested software architecture can be obtained. The hierarchical relationship Map of the unit components can be represented by the nested path of the unit components introduced above. On the other hand, the connection of the ports in the nested software architecture can be obtained. Through the connection of the ports, it can be known which port pairs have been connected and which port pairs have not been connected. Then, based on the obtained hierarchical relationship Map of the unit components, the matching port pairs and the connection of the ports, the port pairs to be connected can be obtained. The port pairs to be connected include the first port and the second port. Then, the connection path of the port pairs to be connected can be determined and a connection line can be generated. The specific implementation process of the implementation process shown in FIG. 9A can be referred to the specific description in the foregoing first step to fourth step, which will not be described here.

[0219] The following exemplary introduces the implementation process of obtaining the first path and completing the connection between the first port and the second port based on the first path in the external communication scenario. In this case, the first port can be a providing port or a demand port, which is determined according to actual application requirements.

[0220] In the above external communication scenario, based on the above defined nested software architecture, it can be determined whether the port of a unit component in the nested software architecture is used for communication with an object outside the nested software architecture. In order to facilitate subsequent description, the port of the unit component used for communication with the object outside the nested software architecture is referred to as an external communication port. If it is determined that the port of a unit component is an external communication port, a connection path is obtained for connecting the port with the port of the outermost component of the nested software architecture. Then, a mapping relationship between the port of the outermost component and the corresponding signal is generated. Thus, the communication of the port of the unit component with the object outside the nested software architecture can be realized.

[0221] Exemplarily, it is assumed that the first port in the method shown in FIG. 7 is the above-mentioned external communication port. It is assumed that the second port in the method shown in FIG. 7 is the port of the outermost component used for connecting with the first port and mapping with the signal. Then, the first path in the method shown in FIG. 7 is the connection path between the two ports, which is used for outputting the data of the internal first port to the port of the outermost component, and then transmitting to the object outside the nested software architecture through the mapped signal. In order to facilitate understanding of the implementation process of these steps, the possible implementation process is exemplarily introduced below in combination with five steps.

[0222] Step A: determining a third nested path based on the above-mentioned nested software architecture. The third nested path indicates the position of the first component to which the first port belongs in the nested software architecture. The specific implementation process can be exemplarily referred to the description of the first step in the related implementation introduction of the internal communication scenario, which is not described here.

[0223] Exemplarily, in a possible implementation, according to the description of the first step in the related implementation introduction of the internal communication scenario, the nested path of each unit component in the nested software architecture can be obtained.

[0224] Step B: traversing the ports in all unit components of the above-mentioned nested software architecture to determine one or more external communication ports. The first port is any one of the one or more external communication ports. The following is exemplarily described.

[0225] Exemplarily, in a specific implementation, a name of an interface associated with a port is related to a name of a signal transmitted by the port. For example, the two names have a same part. Exemplarily, the same part can be, for example, a name of the interface or other customized identifier, and the like. The embodiments of the present application are mainly described by taking the name of the interface as an example. In addition, the signal to be transmitted is preconfigured. Based on this, whether the port is the external communication port can be determined by judging whether there is a signal that has a fuzzy match with the name of the interface associated with the port and judging whether the transmission direction of the signal is consistent with the transmission direction of the port. Exemplarily, the transmission direction of the signal and the transmission direction of the port are also preconfigured. Exemplarily, the transmission direction includes, for example, two directions of in and out. Specifically, if the name of the interface associated with the port of the unit component has a fuzzy match with the name of a signal, and the transmission direction of the port is the same as the transmission direction of the signal, it can be determined that the port belongs to the aforementioned external communication port. It can also be said that the port has a matching relationship with the signal.

[0226] Exemplarily, the one or more external communication ports determined above can be displayed through a user interface. For example, the matching relationship between the one or more external communication ports and the corresponding signals can be displayed on the user interface. Exemplarily, it can be displayed on the user interface in the form of a table, text or a mapping diagram, and the like. In order to facilitate understanding, the following is introduced by taking a table as an example in combination with the nested software architecture shown in FIG. 8.

[0227] Exemplarily, in the nested software architecture shown in FIG. 8, it is assumed that the port P 1.2.1.1 belongs to the aforementioned external communication port. The name of the interface associated with the port is assumed to be interface1. It is assumed that the name of the signal that has a fuzzy match with the interface is signal_interface1. It is assumed that the transmission direction of the port and the transmission direction of the signal are both out. Then, it can be obtained as shown in Table 4.

[0228] Table 4

[0229] Exemplarily, the above table 4 can be displayed on a user interface for a user to view. Optionally, the table 4 can further include a "selection" column. The user can select a connection path to be generated in the "selection" column. For example, a box control in the "selection" column corresponding to a port can be clicked, and after clicking, a "√" is marked in the box, indicating that a connection path (e.g., the above first path) between the port and a port in the outermost component associated with the same interface will be generated subsequently. Alternatively, the box control in the "selection" column can be replaced by a "confirmation" button, and clicking the corresponding "confirmation" button can indicate the generation of the connection path between the port and the port in the outermost component associated with the same interface. It can be understood that the table 4 shown is only an example and does not constitute a limitation on the embodiments of the present application. Exemplarily, after the software design device displays the above table 4 on the user interface, it can receive a user's clicking operation on the corresponding control or button in the "selection" column. Then, the corresponding connection path is generated in response to the operation. The specific implementation of generating the connection path can be referred to the introduction of the subsequent step D, which is not described here in detail.

[0230] In another possible implementation, the user interface displaying the table 4 can further include another button, for example, a "confirmation" button or a "generate connection path" button, etc. After the user completes the clicking operation on the corresponding control or button in the "selection" column, the generation operation of the path is triggered by further clicking the another button. It can be understood that the description of the operation of triggering the path generation in the embodiments of the present application is only an example and does not constitute a limitation on the embodiments of the present application. In a specific implementation, any way can be used to trigger the connection operation of the path.

[0231] In another possible implementation, if the matching relationship between the external communication port and the corresponding signal is displayed in other forms in the user interface, there will be corresponding controls or buttons for the user to click to select the port pair to generate the corresponding connection path. The embodiments of the present application will not be described here.

[0232] It can be understood that the above table 4 mainly takes an external communication port as an example. In other possible implementations, there can be external communication ports, and the embodiments of the present application will not be described here.

[0233] Step C: generating a connection path between the external communication port and the port of the outermost component. Including generating the first path between the first port and the second port. Exemplarily introduced as follows.

[0234] Exemplarily, the step A records the nesting path of each unit component in the nested software architecture. For the external communication port determined in the step B, the connection path between the port and the port of the outermost component can be determined based on the nesting path of the unit component to which the external communication port belongs. For example, for the first port, the first path can be determined based on the third nesting path. For ease of understanding, the first port is taken as an example for introduction below.

[0235] Exemplarily, it is assumed that the interface associated with the first port is a second interface. Exemplarily, the second interface can be any type of interface in Table 1, which is not limited in the embodiments of the present application. It is assumed that the signal that is fuzzy matched with the name of the second interface is referred to as a first signal. Exemplarily, the first signal can be any signal transmitted through a CAN, CANFD or SOME / IP protocol, which is not limited in the embodiments of the present application. It is assumed that the transmission direction of the first port and the first signal are both a first direction. The first direction can be a direction of inward transmission or a direction of outward transmission. Based on this, the second port set can be obtained based on the third nesting path. The second port set includes the target port in each combination component in the third nesting path. The target port is a port associated with the second interface and having the first direction. The second port set includes the second port. Then, the first path can be determined based on the first port and the second port set. The implementation process of obtaining the second port set is exemplarily introduced below.

[0236] Exemplarily, in a specific implementation, the combination components in the third nesting path can be traversed one by one from the inner layer to the outer layer until the outermost combination component in the third nesting path is reached. In the process of traversal, it can be judged whether the target port has been configured in each combination component being traversed. If yes, the target port of the combination component is recorded. If the target port has not been configured in the combination component being traversed, a target port can be newly created for the combination component. And the newly created target port is recorded.

[0237] Exemplarily, in a possible implementation, the naming of the target port configured in each combination component in the third nesting path is the same as the naming of the first port by default. Therefore, the naming of the newly created target port is also the same as the naming of the first port by default. Alternatively, in another possible implementation, the naming of the target port configured in each combination component can be different from the naming of the first port, as long as it can be identified as the target port. The embodiments of the present application are not limited in this regard. For ease of subsequent description, the embodiments of the present application mainly take the implementation mode of default naming as an example for introduction.

[0238] Based on the above implementation manner, after the traversal is completed, the one or more target ports obtained are the second port set. For ease of understanding, examples are given below.

[0239] For example, in the ECU nested software architecture shown in FIG. 2 and FIG. 8, it is assumed that the first component is the atomic software component A_SWC1.2.1.1. The first port is P 1.2.1.1 The third nested path is: C_SWC_root→C_SWC1.2→C_SWC1.2.1→A_SWC1.2.1.1. Based on the foregoing description, the composite software components C_SWC1.2.1, C_SWC1.2 and C_SWC_root in the third nested path can be traversed from inside to outside in turn. If the traversed composite software component is configured with the target port, the target port of the composite software component is recorded. If the traversed composite software component is not configured with the target port, a target port is newly created for the composite software component. For example, the names of the target ports configured by the composite software components can be P 1.2.1.1 , which are the same as the name of the port P 1.2.1.1 in the atomic software component A_SWC1.2.1.1 by default. For ease of distinction, the component name to which the port belongs is indicated in brackets after the name of the target port configured by the composite software component in the embodiments of the present application. For example, the target ports of C_SWC1.2.1, C_SWC1.2 and C_SWC_root are represented as P 1.2. 1.1 (C_SWC1.2.1), P 1.2.1.1 (C_SWC1.2) and P 1.2.1.1 (C_SWC_root) respectively. Since the second port is the port of the outermost software component, the target port P 1.2.1.1 (C_SWC_root) of the root composite software component is the second port. Based on this, the obtained second port set includes the three target ports P 1.2.1.1 (C_SWC1.2.1), P 1.2.1.1 (C_SWC1.2) and P 1.2.1.1 (C_SWC_root). It can be understood that the description herein is only an example and does not constitute a limitation on the embodiments of the present application.

[0240] The second port set can be obtained based on the above implementation process. Then, the first path can be determined based on the first port and the second port set. For ease of understanding, examples are given below.

[0241] For example, in the ECU nested software architecture shown in FIG. 2 and FIG. 8, it is assumed that the first component is the atomic software component A_SWC1.2.1.1. The first port is P 1.2.1.1The second port set obtained above includes P 1.2.1.1 (C_SWC1.2.1), P 1.2.1.1 (C_SWC1.2), and P 1.2.1.1 (C_SWC_root). The second port is P 1.2.1.1 (C_SWC_root). Then, the connection path (for example, the first path) between the first port and the second port can be determined as: P 1.2.1.1 (A_SWC1.2.1.1)→P 1.2.1.1 (C_SWC1.2.1)→P 1.2.1.1 (C_SWC1.2)→P 1.2.1.1 (C_SWC_root). It can be understood that the connection path between the first port and the second port shown here is only an example, and does not constitute a limitation on the embodiments of the present application.

[0242] In a possible implementation, the generated connection path can be displayed on the user interface. Similarly, it can be displayed on the user interface in the form of a table, text, or a connection diagram. Hereinafter, a table display is taken as an example for description. For example, refer to Table 5.

[0243] Table 5

[0244] For example, the table 5 can be displayed on the user interface for a user to view. The connection path in the table 5 can be generated based on the matching relationship between the external communication port and the corresponding signal shown in Table 4. In the table 5, the left two columns show the external communication port and the corresponding signal. The third column shows the connection path between the matched port pairs.

[0245] Optionally, if the generated connection path includes the newly created target port, the newly created target port can be identified by a special mark when the connection path is displayed on the user interface. The special mark can be any form of mark, for example, “*”, “#”, or “^”, and the like, and the embodiments of the present application do not make a limitation thereon. For example, refer to Table 5, and take the special mark as “*” as an example, which indicates the newly created target port. It can be understood that Table 5 is only an example, and does not constitute a limitation on the embodiments of the present application.

[0246] In another possible implementation, in the example of Table 5, if the implementation process of obtaining the first path in the internal communication scenario and completing the connection of the corresponding ports based on the first path is performed first, the target port P 1.2.1.1 (C_SWC1.2.1), and P 1.2.1.1(C_SWC1.2) has been generated in the process. Then, only the target port P 1.2.1.1 (C_SWC_root) in the connection path displayed in the user interface. For example, refer to Table 6. 1.2.1.1 (C_SWC_root) in the connection path displayed in the user interface. For example, refer to Table 6.

[0247] Table 6

[0248] Optionally, the "selection" column can also be included in Table 5 or Table 6. The user can select the path to be connected in the "selection" column. For example, the box control in the "selection" column corresponding to the path to be connected can be clicked, and after clicking, the box is marked with a "√", indicating that the connection between the ports in the path will be automatically completed subsequently. Alternatively, the box control in the "selection" column can be replaced by a "confirmation" button, and clicking the corresponding "confirmation" button can indicate that the connection between the ports in the corresponding connection path needs to be implemented. It can be understood that Table 5 or Table 6 is only an example and does not constitute a limitation on the embodiments of the present application. For example, after the software design device displays Table 5 or Table 6 on the user interface, it can receive the user's click operation on the control or button corresponding to the connection path in the "selection" column. Then, in response to the operation, the connection between the ports in the corresponding connection path is completed. The implementation of the specific path connection can be referred to in the subsequent description, which is not described in detail here.

[0249] In another possible implementation, the user interface displaying Table 5 or Table 6 can also include another button, for example, a "confirmation" button or a "generate connection line" button, etc. After the user clicks the control or button corresponding to the connection path in the "selection" column, further clicking the another button triggers the path connection operation. It can be understood that the description of the present application embodiment about triggering the path connection operation is only an example and does not constitute a limitation on the embodiments of the present application. In a specific implementation, any way can be used to trigger the path connection operation.

[0250] In another possible implementation, if the association relationship between the port pairs and the interfaces is displayed in other forms in the user interface, there will be corresponding controls or buttons for the user to click to select the port pairs to generate the corresponding connection paths. The present application embodiment will not be described again.

[0251] Based on the above implementation, the first path between the first port and the second port can be generated.

[0252] Step D: complete the connection between the ports based on the connection path obtained above. This includes completing the connection between the first port and the second port based on the first path. The specific implementation can refer to the description in the fourth step above, and will not be described here.

[0253] Step E: generate the mapping configuration between the port and the signal. The following describes the first port, the second port and the first path as an example.

[0254] Exemplarily, after the connection between the first port and the second port is completed based on the first path, the mapping configuration between the second port and the first signal can be generated. For example, the mapping configuration between the port and the signal can be completed by generating a corresponding data mapping (DataMapping) configuration. After the signal mapping configuration is completed, the first port can be enabled to communicate with the external object of the nested software architecture based on the first signal through the second port.

[0255] In a possible implementation, after the signal mapping configuration is completed, the nested software architecture including the first path of the completed connection and the mapping relationship between the second port and the first signal can be displayed on the user interface. For ease of understanding, reference can be made to FIG. 10 exemplarily. As can be seen in FIG. 10, the nested software architecture has connected each port according to the connection path connection number in Table 5 or Table 6. In addition, FIG. 10 also shows the mapping relationship between the second port, i.e., the port P 1.2.1.1 (C_SWC_root) and the first signal. The nested software architecture shown in FIG. 10 can be displayed on the user interface for the user to view. It can be understood that FIG. 10 is only an example and does not constitute a limitation on the embodiments of the present application.

[0256] Exemplarily, based on the implementation described above, the first path can be obtained and the connection between the first port and the second port is completed in the external communication scenario, and the mapping between the second port and the first signal is also completed.

[0257] Exemplarily, in another possible implementation, in the above-mentioned implementation process of obtaining the first path and completing the connection between the first port and the second port in the external communication scenario, reference can be made to FIG. 10A. As shown in FIG. 10A, in the implementation process, on one hand, ports of all unit components in the nested software architecture are obtained. On the other hand, all signals related to the nested software architecture are obtained. Then, a port signal pair to be mapped is obtained. The port signal pair includes a port and a signal to which the port needs to be mapped. For example, the first port and the first signal to which the first port needs to be mapped are a port signal pair. Then, a corresponding proxy port (including the second port) and a connection line (for example, the connection line between the first port and the second port) can be generated for the port signal pair. The specific implementation process of the implementation process shown in FIG. 10A can correspond to the specific description in the foregoing steps A to D, which will not be described here.

[0258] In a possible implementation, in a specific implementation, the above-mentioned processing in the internal communication scenario and the external communication scenario can be independent processing of the two scenarios, and the above-mentioned implementation process is executed separately. Alternatively, the processing in the internal communication scenario can be executed first, and then the processing in the external communication scenario is executed. Alternatively, the processing in the external communication scenario can be executed first, and then the processing in the internal communication scenario is executed. If the processing in the two scenarios is executed in sequence, the results of the two processing processes can be presented together on the user interface for the user to view after the two processing processes are executed. For ease of understanding, the following will be exemplarily described in combination with the nested software architecture shown in FIG. 8.

[0259] Exemplarily, in the nested software architecture shown in FIG. 8, after the processing in the internal communication scenario and the processing in the external communication scenario are both executed, the nested software architecture displayed on the user interface can exemplarily be shown in FIG. 11. As shown in FIG. 11, the connection path after the connection in the internal communication scenario and the external communication scenario is completed and the mapping relationship between the port and the signal can be presented. The specific description can be referred to the foregoing description of FIG. 9 and FIG. 10, which will not be described here.

[0260] In a possible implementation, the software design apparatus can save the connection configuration of the connection path generated in the processing in the internal communication scenario and / or the processing in the external communication scenario to the configuration file of the nested software architecture. For example, the connection configuration of the first path is saved to the configuration file.

[0261] In summary, in the embodiments of the present application, on the one hand, the matching relationship of the component ports in different levels of the multi-level nested software architecture can be identified and the port connection can be automatically generated. During this process, the proxy ports and the related connection can be automatically generated for the matching port pairs in different levels, thereby solving the limitation of the original automatic connection that only supports the connection in the same level. On the other hand, the matching relationship between the internal ports and the signals can be identified, the proxy ports and the connection can be generated, and the signal mapping configuration can be automatically completed. That is, the proxy ports and the connection required to be established in the external communication scenario (for example, the ECU intercommunication scenario) can be automatically created, the related manual configuration workflow can be reduced, and the problem of missing mapping caused by missing creation of the proxy port can be solved.

[0262] The above mainly introduces the method provided by the embodiments of the present application. It can be understood that, in order to realize the corresponding functions described above, each control unit or device includes a hardware structure and / or a software module for executing each function. In combination with the units and steps of each example described in the embodiments disclosed herein, the present application can be realized in the form of hardware or a combination of hardware and computer software. Whether a certain function is realized by hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods for each specific application to realize the described functions, but such implementation should not be considered beyond the scope of the present application.

[0263] The embodiments of the present application can divide the functions of the device into function modules according to the above method examples. For example, each function module can be divided according to each function, or two or more functions can be integrated into one module. The integrated module can be realized in the form of hardware or software function module. It should be noted that the division of the modules in the embodiments of the present application is illustrative, and is only a logical function division. When actually implemented, there can be another division method.

[0264] In the case of dividing each function module according to each function, the embodiments of the present application also provide a device for realizing any one of the above methods, for example, providing a device including units (or means) for realizing each step in any one of the above methods.

[0265] For example, refer to FIG. 12, which is a structural schematic diagram of a software design device 1200 provided by the embodiments of the present application. The software design device 1200 shown in FIG. 12 can be a software design device used to realize any one of the embodiments of the method described in the above FIG. 7 and its possible implementation manners. The software design device 1200 can include a processing unit 1201 and a connection unit 1202. Wherein:

[0266] The processing unit 1201 is configured to acquire a first path between a first port and a second port. The first port is a port in a first component included in a nested software architecture, the second port is a port in a second component in a different level from the first component in the nested software architecture, or the second port is a port in a third component in the nested software architecture. The first component and the second component belong to a software component unit with the smallest component division granularity in the nested software architecture. The third component belongs to a software component unit with the largest component division granularity in the nested software architecture.

[0267] The connection unit 1202 is configured to complete connection between the first port and the second port based on the first path.

[0268] In a possible implementation, when the second port is a port in the second component, the processing unit 1201 is specifically configured to:

[0269] determine the first path based on a first nested path and a second nested path. The first nested path indicates a position of the first component in the nested software architecture, and the second nested path indicates a position of the second component in the nested software architecture.

[0270] In a possible implementation, the first port is a providing port associated with a first interface, and the second port is a demanding port associated with the first interface. The processing unit 1201 is specifically configured to:

[0271] acquire a first port set based on the first nested path and the second nested path. The first port set includes one or more providing ports associated with the first interface, and / or includes one or more demanding ports associated with the first interface.

[0272] determine the first path based on the first port, the first port set, and the second port.

[0273] In a possible implementation, the first nested path and the second nested path include a fourth component. The fourth component belongs to an innermost combined component in a same combined component in the first nested path and the second nested path, and the combined component includes a software component with a smaller component division granularity than the combined component.

[0274] The one or more providing ports associated with the first interface include a providing port associated with the first interface in each combined component between the first component and the fourth component in the first nested path.

[0275] The one or more demanding ports associated with the first interface include a demanding port associated with the first interface in each combined component between the second component and the fourth component in the second nested path.

[0276] In a possible implementation, the processing unit 1201 is further configured to:

[0277] If no providing port associated with the first interface is configured in one or more of the combined components between the first component and the fourth component in the first nested path, a providing port associated with the first interface is newly created in the one or more of the combined components.

[0278] In a possible implementation, the processing unit 1201 is further configured to:

[0279] If no requiring port associated with the first interface is configured in part or all of the combined components between the second component and the fourth component in the second nested path, a requiring port associated with the second interface is newly created in the part or all of the combined components.

[0280] In a possible implementation, the apparatus further includes a display unit, configured to display, before the processing unit 1201 obtains the first port set based on the first nested path and the second nested path, a first user interface, the first port, and an association relationship between the second port and the first interface; and receive a first operation of a user on the first user interface, the first operation indicating that the first path is obtained.

[0281] In a possible implementation, when the second port is a port in the third component, the processing unit 1201 is specifically configured to:

[0282] obtain the first path based on a third nested path. The third nested path indicates a position of the first component in the nested software architecture.

[0283] In a possible implementation, the first port is associated with a first interface, a name of the first interface and a name of the first signal are fuzzy matched, and a transmission direction of the first port and a transmission direction of the first signal are both a first direction. The processing unit 1201 is specifically configured to:

[0284] obtain a second port set based on the third nested path. The second port set includes a target port in each combined component in the third nested path, the target port being a port associated with the first interface and having the first direction, and the combined component including a software component having a component division granularity smaller than the combined component, and the second port set including the second port.

[0285] determine the first path based on the first port and the second port set.

[0286] In a possible implementation, the processing unit 1201 is further configured to:

[0287] If one or more of the combination components included in the third nested path are not configured with the target port, the target port is newly created in the one or more combination components.

[0288] In a possible implementation, the processing unit 1201 is specifically configured to:

[0289] In response to a second operation of a second user interface by a user, a second port set is obtained based on the third nested path. The second user interface displays the matching relationship between the first port and the first signal, and the second operation indicates obtaining the first path.

[0290] In a possible implementation, the processing unit 1201 is further configured to, after the connection unit 1202 completes the connection between the first port and the second port based on the first path, generate a mapping configuration between the second port and the first signal.

[0291] In a possible implementation, the connection unit 1202 is specifically configured to:

[0292] In response to a third operation of a third user interface by a user, the connection between the first port and the second port is completed based on the first path. The third user interface displays the first path, and the third operation indicates implementing the connection between ports in the first path.

[0293] In a possible implementation, the apparatus further includes a saving unit configured to, after the connection unit 1202 completes the connection between the first port and the second port based on the first path, save the connection configuration of the first path into a configuration file of the nested software architecture.

[0294] In a possible implementation, the nested software architecture belongs to a software architecture in AUTOSAR.

[0295] The specific operations and beneficial effects of each unit in the software design apparatus 1200 shown in FIG. 12 can be refer to the corresponding descriptions in the above-described FIG. 7 and possible embodiments thereof, which will not be described herein again.

[0296] For example, refer to FIG. 13, which is a structural schematic diagram of a software design apparatus 1300 provided by an embodiment of the present application. The software design apparatus 1300 shown in FIG. 13 can be a software design apparatus used to implement any of the embodiments in the method described in the above-described FIG. 7 and possible implementations thereof. The software design apparatus 1300 can include a display unit 1301 and a processing unit 1302. Wherein:

[0297] The display unit 1301 is configured to display a first path in a first user interface. The first path is a communication path between a first port and a second port. The first port is a port in a first component in a nested software architecture, the second port is a port in a second component in the nested software architecture and different from the first component in a hierarchy, or the second port is a port in a third component in the nested software architecture. The first component and the second component belong to a software component unit with the smallest granularity of component division in the nested software architecture. The third component belongs to a software component unit with the largest granularity of component division in the nested software architecture.

[0298] The processing unit 1302 is configured to, in response to a first operation of the first path in the first user interface by a user, complete connection between the first port and the second port based on the first path.

[0299] In a possible implementation, when the second port is a port in the second component, the first port is a provided port and the second port is a required port. Before displaying the first path in the first user interface, the display unit 1301 is further configured to display, in a second user interface, the first port and an association relationship between the second port and the first interface.

[0300] The processing unit 1302 is further configured to, in response to a second operation of the association relationship in the second user interface by a user, obtain the first path.

[0301] In a possible implementation, after the processing unit 1302 completes the connection between the first port and the second port based on the first path in response to the first operation of the first path in the first user interface by a user, the display unit 1301 is further configured to display, in the first user interface,

[0302] Display a third user interface. The third user interface presents the nested software architecture including the first path with the completed connection.

[0303] In a possible implementation, when the second port is a port in the third component, before displaying the first path in the first user interface, the display unit 1301 is further configured to display, in a fourth user interface, a matching relationship between the first port and a first signal.

[0304] The processing unit 1302 is further configured to, in response to a third operation of the matching relationship in the fourth user interface by a user, obtain the first path.

[0305] In a possible implementation, the processing unit 1302 is further configured to, in response to the first operation of the first path in the first user interface by a user, generate a mapping configuration between the second port and the first signal.

[0306] The display unit 1301 is further configured to: in response to the processing unit 1302 that the first path is completed based on the first operation of the user on the first user interface, the first path between the first port and the second port,

[0307] display a fifth user interface. The fifth user interface presents the nested software architecture including the first path of the completed connection, and presents the mapping relationship between the second port and the first signal.

[0308] In a possible implementation, the nested software architecture belongs to the software architecture in AUTOSAR.

[0309] The specific operations and beneficial effects of each unit in the software design apparatus 1300 shown in FIG. 13 can be referred to the corresponding description in the above-mentioned FIG. 7 and possible embodiments thereof, which will not be described here again.

[0310] For ease of subsequent description, the software design apparatus 1200 and the software design apparatus 1300 are collectively referred to as an apparatus. It should be understood that the division of units in the apparatus is only a logical division of functions, and all or part of the units can be integrated into a physical entity, or can be physically separated. In addition, the units in the apparatus can be implemented in the form of processor calling software; for example, the apparatus includes a processor, the processor is connected with a memory, the memory stores instructions, and the processor calls the instructions stored in the memory to implement any one of the above methods or to implement the functions of the units of the apparatus, wherein the processor is, for example, a general processor such as a central processing unit (CPU) or a microprocessor, and the memory is a memory in the apparatus or a memory outside the apparatus. Alternatively, the units in the apparatus can be implemented in the form of hardware circuit, and the functions of part or all of the units can be implemented by designing the hardware circuit. The hardware circuit can be understood as one or more processors; for example, in one implementation, the hardware circuit is an application-specific integrated circuit (ASIC), and the functions of part or all of the units are implemented by designing the logical relationship between elements in the circuit; for example, in another implementation, the hardware circuit is a programmable logic device (PLD), and the functions of part or all of the units are implemented by taking a field programmable gate array (FPGA) as an example, which can include a large number of logic gate circuits, and the connection relationship between the logic gate circuits is configured by a configuration file, so as to implement the functions of part or all of the units. All units of the above apparatus can be implemented in the form of processor calling software, or all units can be implemented in the form of hardware circuit, or part of the units can be implemented in the form of processor calling software, and the remaining part can be implemented in the form of hardware circuit.

[0311] In the embodiments of the present application, the processor is a circuit with data processing capability. In one implementation, the processor can be a circuit with instruction reading and running capability, such as a CPU, a microprocessor, a graphics processing unit (GPU) (which can be understood as a microprocessor), a digital signal processor (DSP), or the like. In another implementation, the processor can implement certain functions through a logical relationship of a hardware circuit, which is fixed or can be reconfigured. For example, the processor is an ASIC or a PLD implemented hardware circuit, such as an FPGA. In the reconfigurable hardware circuit, the processor loads a configuration document to implement the hardware circuit configuration. It can be understood that the processor loads instructions to implement the functions of the above units. In addition, it can also be a hardware circuit designed for artificial intelligence, which can be understood as an ASIC, such as a neural network processing unit (NPU), a tensor processing unit (TPU), a deep learning processing unit (DPU), or the like.

[0312] It can be seen that each unit in the above apparatus can be one or more processors (or processing circuits) configured to implement the above method, such as a CPU, a GPU, an NPU, a TPU, a DPU, a microprocessor, a DSP, an ASIC, an FPGA, or a combination of at least two of these processor forms.

[0313] In addition, each unit in the above apparatus can be integrated together or can be independently implemented. In one implementation, the units are integrated together to implement a system-on-a-chip (SOC). The SOC can include at least one processor for implementing any of the above methods or functions of the units of the apparatus. The at least one processor can be different, such as a CPU and an FPGA, a CPU and an artificial intelligence processor, a CPU and a GPU, and the like.

[0314] Exemplarily, referring to FIG. 14, which is a structural schematic diagram of one possible physical entity of the software design apparatus provided by the present application. The software design apparatus 1400 shown in FIG. 14 can be the software design apparatus in the method described in the above embodiments. The software design apparatus 1400 includes a processor 1401, a memory 1402, and a communication interface 1403. The processor 1401, the communication interface 1403, and the memory 1402 can be connected to each other or connected to each other through a bus 1404.

[0315] The memory 1402 is configured to store computer programs and data of the software design apparatus 1400. The memory 1402 can include, but is not limited to, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a compact disc read-only memory (CD-ROM), and the like.

[0316] The software or program codes required by all or part of the functions of the software design apparatus in the method embodiments are stored in the memory 1402.

[0317] In a possible implementation, if the software or program codes required by part of the functions are stored in the memory 1402, the processor 1401 can cooperate with other components to complete other functions described in the method embodiments in addition to calling the program codes in the memory 1402 to implement part of the functions. For example, the communication interface 1403 is used to realize the functions of receiving or sending data. Alternatively, for example, the apparatus can further include a display module, and the display module is used to realize the display function of the user interface, and the like.

[0318] The communication interface 1403 can be multiple, which is used to support the communication of the software design apparatus 1400, such as receiving or sending data or signals, and the like.

[0319] The processor 1401 can be the CPU, GPU, NPU, TPU, DPU, microprocessor, DSP, ASIC, FPGA, or a combination of at least two of these processor forms, and the like. The processor 1401 can be used to read the program stored in the memory 1402, and execute the operations of the software design apparatus described in the above-mentioned FIG. 7 and possible embodiments thereof.

[0320] The specific operations and beneficial effects of each unit of the software design apparatus 1400 shown in FIG. 14 can be referred to the corresponding description in the above-mentioned FIG. 7 and possible method embodiments thereof, which will not be described here again.

[0321] The embodiments of the present application further provide a chip, which includes a processor and a memory. The memory is configured to store computer programs or computer instructions, and the processor is configured to execute the computer programs or computer instructions stored in the memory, so that the chip executes the operations of the software design apparatus described in the above-mentioned FIG. 7 and possible embodiments thereof.

[0322] The embodiment of the present application further provides a computer readable storage medium which stores a computer program or computer instructions, and the computer program or computer instructions are executed by a processor to implement the method implemented by the software design device in the above-mentioned Figure 7 and possible embodiments thereof. Exemplarily, the computer readable storage medium can include but is not limited to various media which can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0323] The embodiment of the present application further provides a computer program product, when the computer program product is read and executed by a computer, the method implemented by the software design device in the above-mentioned Figure 7 and possible embodiments thereof will be executed. Exemplarily, the computer program product includes but is not limited to a computer program, code or electronic (digital) signal for transmitting computer program instruction code which can implement the method by a computer at runtime.

[0324] It should be understood that in various embodiments of the present application, the size of the serial number of various processes does not mean the order of execution, and the execution order of various processes should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0325] It should also be understood that the term "comprising" (also "includes", "including", "comprises" and / or "comprising") when used in the specification specifies the presence of stated features, integers, steps, operations, elements, and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0326] It should also be understood that the "one embodiment", "an embodiment", "a possible implementation" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment or implementation are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment", "a possible implementation" appearing throughout the specification does not necessarily mean the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner.

[0327] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A port connection method in a software architecture design process, characterized by, The method comprises: obtaining a first path between a first port and a second port; the first port is a port in a first component included in a nested software architecture, the second port is a port in a second component in a different level from the first component in the nested software architecture, or the second port is a port in a third component in the nested software architecture; the first component and the second component belong to a software component unit with the smallest component division granularity in the nested software architecture; the third component belongs to a software component unit with the largest component division granularity in the nested software architecture; completing connection between the first port and the second port based on the first path.

2. The method of claim 1, wherein, In the case that the second port is a port in the second component, the obtaining of the first path between the first port and the second port comprises: determining the first path based on a first nested path and a second nested path; the first nested path indicates a position of the first component in the nested software architecture, and the second nested path indicates a position of the second component in the nested software architecture.

3. The method of claim 2, wherein, The first port is a providing port associated with a first interface, and the second port is a requiring port associated with the first interface; the determining of the first path based on the first nested path and the second nested path comprises: obtaining a first port set based on the first nested path and the second nested path; the first port set comprises one or more providing ports associated with the first interface, and / or comprises one or more requiring ports associated with the first interface; determining the first path based on the first port, the first port set and the second port.

4. The method of claim 3, wherein, The first nested path and the second nested path comprise a fourth component; the fourth component belongs to an innermost combined component in a same combined component in the first nested path and the second nested path, and the combined component comprises software components with a smaller component division granularity than the combined component; The one or more providing ports associated with the first interface comprise providing ports associated with the first interface in each of the combined components between the first component and the fourth component in the first nested path; The one or more requiring ports associated with the first interface comprise requiring ports associated with the first interface in each of the combined components between the second component and the fourth component in the second nested path.

5. The method of claim 4, wherein, The method further comprises: if no providing port associated with the first interface is configured in one or more of the combined components between the first component and the fourth component in the first nested path, a providing port associated with the first interface is newly created in the one or more combined components.

6. The method according to claim 4 or 5, characterized in that, The method further comprises: if no requiring port associated with the first interface is configured in part or all of the combined components between the second component and the fourth component in the second nested path, a requiring port associated with the second interface is newly created in the part or all of the combined components.

7. The method according to any one of claims 3-6, characterized in that, The method further comprises: before the obtaining the first port set based on the first nested path and the second nested path, further comprising: displaying the first port and an association between the second port and the first interface on a first user interface; 8. The method of claim 1, wherein, receiving a first operation of a user on the first user interface on the association, the first operation indicating the obtaining the first path. in a case that the second port is a port in the third component, the obtaining the first path between the first port and the second port comprises:

9. The method of claim 8, wherein, determining the first path based on a third nested path, the third nested path indicating a position of the first component in the nested software architecture. the first port is associated with a second interface, a name of the second interface and a name of the first signal are fuzzy matched, and a transmission direction of the first port and a transmission direction of the first signal are both a first direction; the determining the first path based on the third nested path comprises: obtaining a second port set based on the third nested path, the second port set comprising a target port in each combined component in the third nested path, the target port being a port associated with the second interface and having the first direction, the combined component comprising a software component having a component granularity smaller than the combined component, the second port set comprising the second port; 10. The method of claim 9, wherein, determining the first path based on the first port and the second port set. The method further comprises:

11. The method according to claim 9 or 10, characterized in that, if one or more combined components in the third nested path are not configured with the target port, creating the target port in the one or more combined components. The obtaining the second port set based on the third nested path comprises:

12. The method according to any one of claims 8-11, characterized in that, in response to a second operation of a user on a second user interface, obtaining the second port set based on the third nested path, the second user interface displaying a matching relationship between the first port and the first signal, the second operation indicating the obtaining the first path. after the completing the connection between the first port and the second port based on the first path, the method further comprises:

13. The method according to any one of claims 1 to 12, characterized in that, generating a mapping configuration between the second port and the first signal. The completing the connection between the first port and the second port based on the first path comprises:

14. The method according to any one of claims 1 to 13, characterized in that, in response to a third operation of a user on a third user interface, completing the connection between the first port and the second port based on the first path, the third user interface displaying the first path, the third operation indicating the implementing the connection between the ports in the first path. after the completing the connection between the first port and the second port based on the first path, the method further comprises:

15. The method according to any one of claims 1 to 14, characterized in that, saving a connection configuration of the first path into a configuration file of the nested software architecture.

16. A port connection method in a software architecture design process, characterized by, The nested software architecture belongs to a software architecture in AUTOSAR. The method comprises: displaying, in a first user interface, a first path; the first path is a communication path between a first port and a second port; the first port is a port in a first component included in a nested software architecture, the second port is a port in a second component in a different level from the first component in the nested software architecture, or the second port is a port in a third component in the nested software architecture; the first component and the second component belong to a software component unit with the smallest component division granularity in the nested software architecture; the third component belongs to a software component unit with the largest component division granularity in the nested software architecture; in response to a first operation of the user on the first path in the first user interface, completing connection between the first port and the second port based on the first path.

17. The method of claim 16, wherein, In the case that the second port is a port in the second component, the first port is a provided port and the second port is a required port; before displaying the first path in the first user interface, the method further comprises: displaying, in a second user interface, an association relationship between the first port and the second port and a first interface; in response to a second operation of the user on the association relationship in the second user interface, obtaining the first path.

18. The method of claim 17, wherein, after the response to the first operation of the user on the first path in the first user interface, completing connection between the first port and the second port based on the first path, the method further comprises: displaying a third user interface; the third user interface presents the nested software architecture including the first path with the completed connection.

19. The method of claim 16, wherein, In the case that the second port is a port in the third component, before displaying the first path in the first user interface, the method further comprises: displaying, in a fourth user interface, a matching relationship between the first port and a first signal; in response to a third operation of the user on the matching relationship in the fourth user interface, obtaining the first path.

20. The method of claim 19, wherein, The method further comprises: in response to the first operation of the user on the first path in the first user interface, generating a mapping configuration between the second port and the first signal; after the response to the first operation of the user on the first path in the first user interface, completing connection between the first port and the second port based on the first path, the method further comprises: displaying a fifth user interface; the fifth user interface presents the nested software architecture including the first path with the completed connection, and presents a mapping relationship between the second port and the first signal.

21. The method according to any one of claims 16-20, characterized by, The nested software architecture belongs to a software architecture in AUTOSAR.

22. A software design apparatus, characterized by comprising: The apparatus comprises: The processing unit is configured to obtain a first path between a first port and a second port; the first port is a port in a first component included in a nested software architecture, the second port is a port in a second component at a different level from the first component in the nested software architecture, or the second port is a port in a third component in the nested software architecture; the first component and the second component belong to a software component unit with the smallest component division granularity in the nested software architecture; and the third component belongs to a software component unit with the largest component division granularity in the nested software architecture. The connecting unit is configured to complete connection between the first port and the second port based on the first path.

23. The apparatus of claim 22, wherein, In a case where the second port is a port in the second component, the processing unit is specifically configured to: determine the first path based on a first nested path and a second nested path; the first nested path indicates a position of the first component in the nested software architecture, and the second nested path indicates a position of the second component in the nested software architecture.

24. The apparatus of claim 23, wherein, In a case where the first port is a providing port associated with a first interface and the second port is a demand port associated with the first interface, the processing unit is specifically configured to: obtain a first port set based on the first nested path and the second nested path; the first port set includes one or more providing ports associated with the first interface and / or includes one or more demand ports associated with the first interface; determine the first path based on the first port, the first port set, and the second port.

25. The apparatus of claim 24, wherein, The first nested path and the second nested path include a fourth component; the fourth component belongs to an innermost combined component in a same combined component in the first nested path and the second nested path, and the combined component includes a software component with a smaller component division granularity than the combined component; the one or more providing ports associated with the first interface include providing ports associated with the first interface in each of the combined components between the first component and the fourth component in the first nested path; the one or more demand ports associated with the first interface include demand ports associated with the first interface in each of the combined components between the second component and the fourth component in the second nested path.

26. The apparatus of claim 25, wherein, The processing unit is further configured to: if no providing port associated with the first interface is configured in one or more of the combined components between the first component and the fourth component in the first nested path, newly create a providing port associated with the first interface in the one or more combined components.

27. The apparatus of claim 25 or 26, wherein, The processing unit is further configured to: if no demand port associated with the first interface is configured in part or all of the combined components between the second component and the fourth component in the second nested path, newly create a demand port associated with the second interface in the part or all of the combined components.

28. The apparatus of any of claims 24-27, wherein, The apparatus further comprises a display unit configured to display the first port and an association between the second port and the first interface on a first user interface before the processing unit obtains a first port set based on the first nested path and the second nested path; and receive a first operation of a user on the first user interface on the association, the first operation indicating to obtain the first path.

29. The apparatus of claim 22, wherein, In a case that the second port is a port in the third component, the processing unit is specifically configured to: determine the first path based on a third nested path, the third nested path indicating a position of the first component in the nested software architecture.

30. The apparatus of claim 29, wherein, The first port is associated with a first interface, a name of the first interface and a name of the first signal are fuzzy matched, and a transmission direction of the first port and a transmission direction of the first signal are both a first direction; the processing unit is specifically configured to: obtain a second port set based on the third nested path, the second port set comprising a target port in each combined component in the third nested path, the target port being a port associated with the first interface and having the first direction, the combined component comprising a software component having a component division granularity smaller than the combined component, the second port set comprising the second port; determine the first path based on the first port and the second port set.

31. The apparatus of claim 30, wherein, The processing unit is further configured to: if one or more combined components included in the third nested path are not configured with the target port, newly create the target port in the one or more combined components.

32. The apparatus of claim 30 or 31, wherein, The processing unit is specifically configured to: obtain a second port set based on the third nested path in response to a second operation of a user on a second user interface, the second user interface displaying a matching relationship between the first port and the first signal, the second operation indicating to obtain the first path.

33. The apparatus of any one of claims 29-32, wherein, The processing unit is further configured to generate a mapping configuration between the second port and the first signal after the connection unit completes the connection between the first port and the second port based on the first path.

34. The device of any one of claims 22-33, wherein, The connection unit is specifically configured to: complete the connection between the first port and the second port based on the first path in response to a third operation of a user on a third user interface, the third user interface displaying the first path, the third operation indicating to implement the connection between ports in the first path.

35. The device of any one of claims 22-34, wherein, The apparatus further comprises a saving unit configured to save a connection configuration of the first path into a configuration file of the nested software architecture after the connection unit completes the connection between the first port and the second port based on the first path.

36. The device of any one of claims 22-35, wherein, The nested software architecture belongs to a software architecture in AUTOSAR.

37. A software design apparatus, comprising: The apparatus comprises: The display unit is configured to display a first path in a first user interface; the first path is a communication path between a first port and a second port; the first port is a port in a first component included in a nested software architecture, the second port is a port in a second component at a different level from the first component in the nested software architecture, or the second port is a port in a third component in the nested software architecture; the first component and the second component belong to a software component unit with the smallest component division granularity in the nested software architecture; and the third component belongs to a software component unit with the largest component division granularity in the nested software architecture. The processing unit is configured to complete connection between the first port and the second port based on the first path in response to a first operation of a user on the first path in the first user interface.

38. The device of claim 37, wherein, In a case where the second port is a port in the second component, the first port is a provided port, and the second port is a required port; and the display unit is further configured to display, before displaying the first path in the first user interface, an association relationship between the first port and a first interface in a second user interface. The processing unit is further configured to acquire the first path in response to a second operation of a user on the association relationship in the second user interface.

39. The device of claim 38, wherein, The display unit is further configured to display a third user interface after the processing unit completes the connection between the first port and the second port based on the first path in response to the first operation of the user on the first path in the first user interface, The third user interface presents the nested software architecture including the first path with the completed connection.

40. The device of claim 37, wherein, In a case where the second port is a port in the third component, the display unit is further configured to display a matching relationship between the first port and a first signal in a fourth user interface before displaying the first path in the first user interface. The processing unit is further configured to acquire the first path in response to a third operation of a user on the matching relationship in the fourth user interface.

41. The device of claim 40, wherein, The processing unit is further configured to generate a mapping configuration between the second port and the first signal in response to the first operation of the user on the first path in the first user interface. The display unit is further configured to display a fifth user interface after the processing unit completes the connection between the first port and the second port based on the first path in response to the first operation of the user on the first path in the first user interface, The fifth user interface presents the nested software architecture including the first path with the completed connection, and presents a mapping relationship between the second port and the first signal.

42. The device of any one of claims 37-41, wherein, The nested software architecture belongs to a software architecture in AUTOSAR.

43. A software design apparatus, comprising: The apparatus comprises a processor and a memory, wherein the memory is configured to store a computer program or computer instructions, and the processor is configured to execute the computer program or computer instructions stored in the memory, so that the apparatus executes the method according to any one of claims 1-15; or so that the apparatus executes the method according to any one of claims 16-21.

44. A computer-readable storage medium, comprising: The computer readable storage medium stores a computer program or computer instructions, which are executed by a processor to implement the method according to any one of claims 1-15; or the computer program or computer instructions are executed by a processor to implement the method according to any one of claims 16-21.

45. A computer program product, characterised in that, When the computer program product is executed by a processor, the method according to any one of claims 1-15 will be implemented; or the method according to any one of claims 16-21 will be implemented.

Citation Information

Patent Citations

  • Autosar model library construction method based on Modelica language

    CN116610294A

  • Software architecture construction method and device, vehicle and storage medium

    CN116643737A

  • Method and device for determining incidence relation between functions

    CN117112010A

  • Development support device, and program

    JP2010282286A

  • Method for creating flatview of ECU software component based on autosar

    KR101628694B1