Parallel development module determination method and device, electronic equipment and storage medium
By obtaining the layer information and coupling relationship of the Autosar software stack module, it determines the modules that can be developed in parallel, which solves the problem that the OS Kernel module and MemoryMap module cannot be developed in parallel, and improves development efficiency.
Patent Information
- Application Number
- CN202311797865.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-25
- Publication Date
- 2025-06-27
AI Technical Summary
In the Autosar software stack, the OS Kernel module and the MemoryMap module cannot be developed in parallel, and the development efficiency is inefficient.
By obtaining the layer information of the module, determine the Autosar architecture layer to which the module belongs, and determine whether modules of different layers can be developed in parallel, and determine the modules that can be developed in parallel based on the hierarchical relationship and coupling relationship.
The parallel development of modules in the Autosar software stack is realized, which improves development efficiency and simplifies the development process.
Smart Images

Figure CN120215927A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of Autosar architecture, and particularly to a method, apparatus, electronic device and storage medium for determining modules that can be developed in parallel. Background Art
[0002] In the Autosar software stack based on the Autosar architecture, different modules belong to different layers of the Autosar architecture. For example, different modules belong to the Basic Software Layer (BSW) and the Application Software Layer (ASW) respectively.
[0003] In the related art, when developing different modules in the Autosar software stack, taking the need to develop the OS Kernel module and the MemoryMap module in the BSW as an example:
[0004] The OS Kernel module is the core of a real-time operating system, responsible for core functions such as task scheduling, interrupt management, and time management. The OS Kernel module is used to provide a real-time and multi-task environment for the ASW. The MemoryMap module is used to describe the memory layout of the microcontroller unit MCU. The MemoryMap module defines the memory addresses and their corresponding uses, such as the locations, sizes, and uses of RAM, ROM, Flash, etc. When developing the OS Kernel module, it is necessary to know which memory areas can be used for dynamic memory allocation such as task stacks and heaps, and the MemoryMap module provides this information. If the MemoryMap module changes, for example, the size or location of the RAM changes, then the OS Kernel module also needs to be adjusted accordingly.
[0005] Therefore, when developing the OS Kernel module and the MemoryMap module in the BSW, only the MemoryMap module can be developed first, and then the OS Kernel module can be developed. That is, the OS Kernel module and the MemoryMap module cannot be developed in parallel.
[0006] Generally, in order to improve the development efficiency of the modules to be developed in the Autosar software stack, it is necessary to develop the modules that can be developed in parallel simultaneously. However, in the related art, there is no method for determining which modules among the modules to be developed can be developed in parallel. Summary of the Invention
[0007] The present disclosure provides a method, apparatus, electronic device and storage medium for determining modules that can be developed in parallel.
[0008] According to a first aspect of the present disclosure, a method for determining parallel - developable modules is provided, including:
[0009] Obtain the layer information of each module in at least one module to be developed, where the layer information is used to indicate the layer of the Autosar architecture to which the corresponding module belongs;
[0010] Determine the layer of the Autosar architecture to which each module in at least one module to be developed belongs;
[0011] Determine that modules belonging to different layers of the Autosar architecture are parallel - developable modules.
[0012] In some embodiments of the present disclosure, after determining that modules belonging to different layers of the Autosar architecture are parallel - developable modules, the method for determining parallel - developable modules includes:
[0013] Determine whether the number of modules in each layer is greater than one;
[0014] In response to the number of modules in each layer not being greater than one, determine that each module is a parallel - developable module.
[0015] In some embodiments of the present disclosure, after determining whether the number of modules in each layer is greater than one, the method for determining parallel - developable modules further includes:
[0016] In response to the number of modules in at least one layer being greater than one, determine the layer with the number of modules greater than one;
[0017] Determine whether there is a coupling relationship between the modules in the layer with the number of modules greater than one;
[0018] Determine that modules in the same layer without a coupling relationship are parallel - developable modules.
[0019] In some embodiments of the present disclosure, determining whether there is a coupling relationship between the modules in the layer with the number of modules greater than one includes:
[0020] Determine whether the layer with the number of modules greater than one is the application software layer ASW, or determine whether the layer with the number of modules greater than one is the basic software layer BSW;
[0021] In response to the layer with the number of modules greater than one being the ASW, determine that there is no coupling relationship between each module in the ASW;
[0022] Or,
[0023] For a layer with more than one module as the BSW, determine the calling module corresponding to each module in the BSW according to a preset calling relationship; wherein, the preset calling relationship refers to the calling relationship between the modules in the ASW and the modules in the BSW, and the calling module refers to the module in the ASW.
[0024] Determine that there is no coupling relationship between the modules in the BSW with different corresponding calling modules.
[0025] In some embodiments of the present disclosure, the method for determining parallel - developable modules further includes:
[0026] Create a corresponding Application Programming Interface (API) for each parallel - developable module.
[0027] Using preset inputs, call each parallel - developable module through the API in different call orders to obtain multiple output results.
[0028] Determine that the parallel - developable modules with consistent multiple output results are modules that can be developed in parallel.
[0029] In some embodiments of the present disclosure, before calling each parallel - developable module through the API in different call orders, the method for determining parallel - developable modules further includes:
[0030] Generate at least one first order for calling each parallel - developable module through a random algorithm, where the first order refers to a random call order.
[0031] Calling each parallel - developable module through the API in different call orders includes:
[0032] Call each parallel - developable module through the API according to each first order in at least one first order.
[0033] In some embodiments of the present disclosure, before calling each parallel - developable module through the API in different call orders, the method for determining parallel - developable modules further includes:
[0034] Generate at least one second order for calling each parallel - developable module through a permutation and combination algorithm, where the second order refers to a permutation and combination call order.
[0035] The calling each parallel - developable module through the API in different call orders includes:
[0036] Call each parallel - developable module through the API according to each second order in the at least one second order.
[0037] According to a second aspect of the present disclosure, there is provided a device for determining modules that can be developed in parallel, including:
[0038] A layer information acquisition unit configured to acquire the layer information of each of at least one module to be developed, where the layer information is used to indicate the layer of the Autosar architecture to which the corresponding module belongs;
[0039] A layer determination unit configured to determine the layer of the Autosar architecture to which each of at least one module to be developed belongs;
[0040] A module determination unit for modules that can be developed in parallel configured to determine modules belonging to different layers of the Autosar architecture as modules that can be developed in parallel.
[0041] According to a third aspect of the present disclosure, there is provided an electronic device, including:
[0042] At least one processor; and
[0043] A memory communicatively connected to the at least one processor; wherein,
[0044] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the steps of the method for determining modules that can be developed in parallel provided in the foregoing first aspect.
[0045] According to a fourth aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the steps of the method for determining modules that can be developed in parallel provided in the first aspect.
[0046] The present disclosure provides a method, device, electronic device, and storage medium for determining modules that can be developed in parallel. Among them, the method includes: acquiring the layer information of each of at least one module to be developed, where the layer information is used to indicate the layer of the Autosar architecture to which the corresponding module belongs; determining the layer of the Autosar architecture to which each of at least one module to be developed belongs; determining modules belonging to different layers of the Autosar architecture as modules that can be developed in parallel.
[0047] According to the solution of the present disclosure, by determining the layer of the Autosar architecture to which the module to be developed belongs according to the layer information of the module to be developed; determining the modules that can be developed in parallel among the modules to be developed according to the modules belonging to different layers of the Autosar architecture; and developing the modules that can be developed in parallel simultaneously, the development efficiency of the modules to be developed in the Autosar software stack can be improved.
[0048] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present application, nor is it used to limit the scope of the present application. Other features of the present application will become readily understood through the following description. Description of the Drawings
[0049] The drawings are used to better understand the solution and do not constitute a limitation to the present disclosure. Among them:
[0050] Figure 1 is a schematic flowchart of the method for determining parallel development modules provided by the embodiments of the present disclosure;
[0051] Figure 2 is a schematic structural diagram of the Autosar module disassembly provided by the embodiments of the present disclosure;
[0052] Figure 3 is a schematic flowchart of the method for determining modules without coupling relationships in the same layer as parallel development modules provided by the embodiments of the present disclosure;
[0053] Figure 4 is a schematic flowchart of the method for determining that there is no coupling relationship between modules with different corresponding call modules in the BSW provided by the embodiments of the present disclosure;
[0054] Figure 5 is a schematic flowchart of the method for verifying whether parallel development modules can be developed in parallel provided by the embodiments of the present disclosure;
[0055] Figure 6 is a schematic structural diagram of the device for determining parallel development modules provided by the embodiments of the present disclosure;
[0056] Figure 7 is a schematic block diagram of an exemplary electronic device provided by the embodiments of the present disclosure. Detailed Embodiments
[0057] The following describes the exemplary embodiments of the present disclosure with reference to the drawings. Various details of the embodiments of the present disclosure are included to assist in understanding, and they should be considered merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted below.
[0058] The method, device, electronic device, and storage medium for determining parallel development modules according to the embodiments of the present disclosure will be described below with reference to the drawings.
[0059] In the present disclosure, by determining the layer of the Autosar architecture to which the module to be developed belongs according to the layer information of the module to be developed; determining the modules that can be developed in parallel among the modules to be developed according to the modules belonging to different layers of the Autosar architecture; and developing the modules that can be developed in parallel simultaneously, the development efficiency of the modules to be developed in the Autosar software stack can be improved. Figure 1 It is a schematic flowchart of a method for determining modules that can be developed in parallel provided by an embodiment of the present disclosure.
[0060] Based on this, a method for determining modules that can be developed in parallel provided by an embodiment of the present disclosure can be applied to the field of in-vehicle application development, and the execution subject of this method can be the processor of an in-vehicle application development tool.
[0061] As Figure 1 shown, the method for determining modules that can be developed in parallel provided by an embodiment of the present disclosure includes the following steps:
[0062] Step 101, obtain the layer information of each module in at least one module to be developed;
[0063] In one embodiment, obtain the layer information of each module in at least one module to be developed according to the Autosar architecture.
[0064] In one embodiment, as Figure 2 shown, the Autosar architecture includes a Basic Software Layer (BSW), an Application Software Layer (ASW), a Runtime Environment Layer (RTE), and a Microcontroller Layer.
[0065] In one embodiment, the BSW is mainly used to provide services for the upper-layer ASW and abstract the specific implementation details of the underlying hardware. The BSW includes an Operating System Kernel (OS Kernel) module, a Memory Mapping (MemoryMap) module, a Diagnostic Log and Trace (DLT) module, a Non-Volatile RAM (NV) module, a Diagnostics Communication Manager (DCM) module, a Diagnostic Event Management (DEM) module, an Electronic Control Unit Manager (ECU Manager, ECUM) module, etc. Among them, the OS Kernel module is the core of the real-time operating system, responsible for core functions such as task scheduling, interrupt management, and time management. The OS Kernel module is used to provide a real-time and multitasking environment for the ASW. The MemoryMap module is used to describe the memory layout of the microcontroller unit (MCU). The MemoryMap module defines the memory addresses and their corresponding uses, such as the locations, sizes, and uses of RAM, ROM, Flash, etc. When developing the OS Kernel module, it is necessary to know which memory areas can be used for dynamic memory allocation such as task stacks and heaps, and the MemoryMap module provides this information. If the MemoryMap module changes, for example, the size or location of the RAM changes, then the OS Kernel module also needs to be adjusted accordingly. Therefore, when developing the OS Kernel module and the MemoryMap module in the BSW, only the MemoryMap module can be developed first, and then the OS Kernel module can be developed, that is, the OS Kernel module and the MemoryMap module cannot be developed in parallel.
[0066] In one embodiment, the ASW is used to implement the specific functions and application logics of the vehicle and may include ASW1, ASW2,..., ASW n Obviously, these application software do not affect each other and can be developed in parallel. Among them, ASW1, ASW2,..., ASW nIt can be an Application Software Component (Application SWC) module, a Sensor / Actuator Software Component (Sensor / Actuator SWC) module, a Calibration Parameter Component (Parameter SWC) module, an ECU Abstraction Software Component (ECU Abstraction SWC) module, a Complex Device Driver Software Component (Complex Device Driver SWC) module, a Service Software Component (Service SWC) module, etc. Among them, the Application SWC mainly implements application layer algorithms. The Sensor / Actuator SWC is mainly used to process the signals of specific sensors / actuators and needs to call the NV module in the BSW layer to record measurement results or configure sensor parameters. The Parameter SWC is used to provide calibration parameter values. The ECU Abstraction SWC mainly provides the function of accessing specific I / Os and may call the DLT module in the BSW layer to configure or control specific hardware devices. The Complex Device Driver SWC can define ports to communicate with other software components and can also directly interact with the ECU hardware. The Service SWC is mainly used for the BSW and interacts with other types of software components through interfaces.
[0067] In one embodiment, the RTE is between the ASW and the BSW, manages the communication between the application software components in the ASW and the basic software in the BSW, and provides a standardized interface for the application software components in the ASW, so that the ASW can call the services of the basic software through Application Programming Interface (API) functions. The RTE includes a Task Mapping module, a Port Mapping module, a Data Mapping module, and a Service Mapping module.
[0068] In one embodiment, the Microcontroller Layer is generally provided by chip manufacturers and is not within the scope of this disclosure.
[0069] In one embodiment, the layer information is used to indicate the layer of the Autosar architecture to which the corresponding module belongs. For example, the aforementioned DLT and NV belong to the BSW in the Autosar architecture; the aforementioned Application SWC module and Sensor / Actuator SWC module belong to the ASW in the Autosar architecture.
[0070] Step 102, determine the layer of the Autosar architecture to which each of the at least one module to be developed belongs;
[0071] In one embodiment, according to the layer information of each module, determine the BSW, ASW, or RTE of the Autosar architecture to which each module in at least one module to be developed belongs.
[0072] Step 103: Determine the modules belonging to different layers of the Autosar architecture as modules that can be developed in parallel.
[0073] In one embodiment, as described above, the DLT module belongs to the BSW in the Autosar architecture, and the foregoing Application SWC module belongs to the ASW in the Autosar architecture. The DLT module and the Application SWC module belong to modules in different layers of the Autosar architecture. Therefore, it can be determined that the DLT module and the Application SWC module are modules that can be developed in parallel.
[0074] In one embodiment, there may be zero, one, or more modules in each layer of different layers of the Autosar architecture.
[0075] In one embodiment, after step 103, the method for determining modules that can be developed in parallel includes:
[0076] Determine whether the number of modules in each layer is greater than one;
[0077] In one embodiment, according to the layer of the Autosar architecture to which each module in at least one module to be developed belongs, determine whether the number of modules in each layer is greater than one.
[0078] In response to the number of modules in each layer not being greater than one, determine each module as a module that can be developed in parallel.
[0079] In one embodiment, the number of modules to be developed in each layer may be zero or one. Among them, the number of modules to be developed being zero means that there are no modules to be developed in the corresponding layer of the Autosar architecture.
[0080] In one embodiment, if it is determined that the number of modules to be developed in each layer is not greater than one, then determine the modules to be developed in each layer as modules that can be developed in parallel.
[0081] In one embodiment, if the only module to be developed in the foregoing BSW is the DLT module, and the only module to be developed in the foregoing ASW is the Application SWC module, then determine the DLT module and the Application SWC module as modules that can be developed in parallel.
[0082] In one embodiment, as Figure 3 shown, the method for determining modules that can be developed in parallel further includes:
[0083] Step 301, in response to the number of modules in at least one layer being greater than one, determine the layer in which the number of modules is greater than one;
[0084] In one embodiment, only when the number of modules to be developed in one layer is greater than one, determine the layer corresponding to the number of modules being greater than one. As described above, if the modules to be developed are the Parameter SWC module and the Service SWC module, then the layer in which the number of modules is greater than one is determined to be the ASW.
[0085] In one embodiment, it is possible that the number of modules to be developed in two or more layers is greater than one. Determine all layers in which the number of modules to be developed is greater than one. As described above, if the modules to be developed are the Parameter SWC module, the Service SWC module, the OS Kernel module, and the MemoryMap module, then the layers corresponding to the number of modules being greater than one are determined to be the ASW and the BSW. Among them, the layers corresponding to the Parameter SWC module and the Service SWC module are the ASW, and the layers corresponding to the OS Kernel module and the MemoryMap module are the BSW.
[0086] Step 302, determine whether there is a coupling relationship between the modules in the layer where the number of modules is greater than one;
[0087] In one embodiment, respectively determine whether there is a coupling relationship between the modules in each layer where the number of modules is greater than one.
[0088] In one embodiment, if it is determined that there is no coupling relationship between the Parameter SWC module and the Service SWC module in the aforementioned ASW, and it is determined that there is a coupling relationship between the OS Kernel module and the MemoryMap module in the BSW.
[0089] Step 303, determine that the modules in the same layer that do not have a coupling relationship are modules that can be developed in parallel.
[0090] In one embodiment, the modules that do not have a coupling relationship do not affect each other. For example, the Parameter SWC module and the Service SWC module do not affect each other, and changing the Parameter SWC module does not affect the Service SWC module.
[0091] In one embodiment, determine that the Parameter SWC module and the Service SWC module in the aforementioned ASW are modules that can be developed in parallel.
[0092] In one embodiment, as Figure 4 shown, Step 302 includes:
[0093] Step 401: Determine whether the layer with more than one module is an ASW, or determine whether the layer with more than one module is a BSW;
[0094] In one embodiment, according to the Autosar architecture, determine the layer corresponding to the module to be developed with more than one module.
[0095] Step 402: In response to the layer with more than one module being an ASW, determine that there is no coupling relationship between each module in the ASW;
[0096] Or,
[0097] In response to the layer with more than one module being a BSW, judge the calling module corresponding to each module in the BSW according to the preset calling relationship; wherein, the preset calling relationship refers to the calling relationship between the modules in the ASW and the modules in the BSW, and the calling module refers to the module in the ASW;
[0098] In one embodiment, since each module in the ASW is an independent application layer algorithm and each module does not affect each other. Therefore, if the layer corresponding to the module to be developed with more than one module is an ASW, it can be determined that there is no coupling relationship between the modules to be developed in the ASW, that is, the modules to be developed in the ASW are modules that can be developed in parallel.
[0099] In one embodiment, the preset calling relationship is such that the ECU Abstraction SWC module in the ASW may call the DLT module in the BSW layer to configure or control specific hardware devices; the Sensor / Actuator SWC module in the ASW needs to call the NV module in the BSW layer to record measurement results or configure sensor parameters.
[0100] In one embodiment, if the layer corresponding to the module to be developed with more than one module is a BSW, then according to the above preset calling relationship, judge the ECU Abstraction SWC module in the ASW corresponding to the DLT module in the BSW, and the Sensor / Actuator SWC module in the ASW corresponding to the NV module in the BSW.
[0101] Step 403: Determine that there is no coupling relationship between the modules in the BSW with different corresponding calling modules.
[0102] In one embodiment, according to the modules in the ASW corresponding to each module in the BSW, it is determined that there is no coupling relationship between the modules in the ASW. For example, according to the fact that the ECU Abstraction SWC module and the Sensor / Actuator SWC module in the ASW corresponding to the DLT module and the NV module in the foregoing BSW are different, it is determined that there is no coupling relationship between the DLT module and the NV module in the BSW, that is, the DLT module and the NV module are modules that can be developed in parallel.
[0103] In one embodiment, for the determined modules that can be developed in parallel, in order to ensure the accuracy of the modules that can be developed in parallel, it is also necessary to verify the determined modules that can be developed in parallel.
[0104] Figure 5 It is a schematic flowchart of a method for verifying whether modules that can be developed in parallel can be developed in parallel provided by an embodiment of the present disclosure.
[0105] Such as Figure 5 As shown, the method for determining modules that can be developed in parallel provided by an embodiment of the present disclosure further includes the following verification steps:
[0106] Step 501, create corresponding APIs for each module that can be developed in parallel;
[0107] In one embodiment, before step 501, it is also necessary to determine the modules that can be developed in parallel among the modules to be developed by using the above method for determining modules that can be developed in parallel.
[0108] In one embodiment, if there is only one module to be developed, the module can be developed independently, and in the present disclosure, only the case of developing multiple modules simultaneously needs to be verified.
[0109] In one embodiment, the modules to be developed include multiple modules belonging to the ASW of the Autosar architecture and multiple modules belonging to the BSW of the Autosar architecture.
[0110] In one embodiment, create corresponding APIs for each module that can be developed in parallel. By calling the APIs corresponding to the modules that can be developed in parallel, the configuration of each module that can be developed in parallel can be completed.
[0111] Step 502, use the preset input to call each module that can be developed in parallel through the API in different call orders to obtain multiple output results;
[0112] In one embodiment, the preset input can be automatically generated or obtained from historical information.
[0113] In one embodiment, if it is determined that each module that can be developed in parallel can be developed in parallel, then the call order of each module that can be developed in parallel does not affect the final output result.
[0114] In one embodiment, using a preset input, each module in the modules that can be developed in parallel can be called through an API according to different call orders, and a plurality of output results are obtained.
[0115] Step 503: Determine that the modules that can be developed in parallel and have consistent multiple output results are modules that can be developed in parallel.
[0116] In one embodiment, by comparing each output result among the multiple output results, if each output result is consistent, it can be determined that each module that can be developed in parallel can be developed in parallel; if the output results are inconsistent, it can be determined that each module that can be developed in parallel cannot be developed in parallel.
[0117] In one embodiment, before step 503, the method for determining modules that can be developed in parallel further includes:
[0118] Generate at least one first order for calling each module that can be developed in parallel through a random algorithm;
[0119] In one embodiment, the first order refers to a random call order.
[0120] In one embodiment, the random algorithm may include one or more of the Monte Carlo method, the MCMC method, the random search algorithm, and the random game tree.
[0121] In one embodiment, the Monte Carlo method can be used to generate at least one first order for calling each module that can be developed in parallel.
[0122] In one embodiment, the Markov Chain Monte Carlo (MCMC) method, such as Bayesian inference, can be used to generate at least one first order for calling each module that can be developed in parallel.
[0123] In one embodiment, the random search algorithm can also be used multiple times to generate at least one first order for calling each module that can be developed in parallel.
[0124] In one embodiment, the random game tree in game theory can also be used multiple times to generate at least one first order for calling each module that can be developed in parallel.
[0125] Correspondingly,
[0126] Calling each module that can be developed in parallel through an API according to different call orders includes:
[0127] Through the API, call each module that can be developed in parallel according to each first order in at least one first order.
[0128] In one embodiment, each of the modules that can be developed in parallel is called according to each first order in at least one first order through an API, and a plurality of output results are obtained. If the plurality of output results are consistent, it is determined that each of the modules that can be developed in parallel can be developed in parallel; if the plurality of output results are inconsistent, it is determined that each of the modules that can be developed in parallel cannot be developed in parallel.
[0129] In one embodiment, before step 503, the method for determining modules that can be developed in parallel further includes:
[0130] Generating at least one second order for calling each of the modules that can be developed in parallel through a permutation and combination algorithm;
[0131] In one embodiment, the second order refers to a permutation and combination call order.
[0132] In one embodiment, the permutation and combination algorithm includes one or both of a full permutation algorithm and a combination algorithm.
[0133] In one embodiment, all second orders for calling each of the modules that can be developed in parallel are generated through a full permutation algorithm.
[0134] In one embodiment, all second orders for calling each of the modules that can be developed in parallel are generated through a combination algorithm.
[0135] Correspondingly,
[0136] Calling each of the modules that can be developed in parallel through the API according to different call orders includes:
[0137] Calling each of the modules that can be developed in parallel according to each second order in at least one second order through the API.
[0138] In one embodiment, each of the modules that can be developed in parallel is called according to each second order in at least one second order through the API, and a plurality of output results are obtained. If the plurality of output results are consistent, it is determined that each of the modules that can be developed in parallel can be developed in parallel; if the plurality of output results are inconsistent, it is determined that each of the modules that can be developed in parallel cannot be developed in parallel.
[0139] In one embodiment, the first order and the second order can be combined to obtain a third order, and each of the modules that can be developed in parallel is called according to the third order through the API.
[0140] The method for determining modules that can be developed in parallel provided by the embodiments of the present disclosure includes: obtaining layer information of each module in at least one module to be developed, where the layer information is used to indicate the layer of the Autosar architecture to which the corresponding module belongs; determining the layer of the Autosar architecture to which each module in at least one module to be developed belongs; determining modules belonging to different layers of the Autosar architecture as modules that can be developed in parallel.
[0141] According to the solution of the present disclosure:
[0142] First, according to the layer information of the module to be developed, determine the layer of the Autosar architecture to which the module to be developed belongs; according to the modules belonging to different layers of the Autosar architecture, determine the modules that can be developed in parallel in the module to be developed; developing the modules that can be developed in parallel simultaneously can improve the development efficiency of the modules to be developed in the Autosar software stack.
[0143] Secondly, by determining the modules that can be developed in parallel in the module to be developed according to the coupling relationship between the modules to be developed, the degree of parallel development of the modules to be developed is further improved.
[0144] Thirdly, by using a random algorithm or a permutation and combination algorithm, generate all the sequences of calling each module that can be developed in parallel, which can verify the correctness of the determined results of the modules that can be developed in parallel.
[0145] Corresponding to the above method for determining modules that can be developed in parallel, the present invention also provides a device for determining modules that can be developed in parallel. Since the device embodiment of the present invention corresponds to the above method embodiment, for the details not disclosed in the device embodiment, reference can be made to the above method embodiment, and the present invention will not be elaborated herein.
[0146] Figure 6 FIG. is a schematic structural diagram of a device for determining modules that can be developed in parallel provided for an embodiment of the present disclosure, as Figure 6 shown, the device 600 for determining modules that can be developed in parallel includes:
[0147] A layer information acquisition unit 601, configured to acquire the layer information of each module in at least one module to be developed, where the layer information is used to indicate the layer of the Autosar architecture to which the corresponding module belongs;
[0148] A layer determination unit 602, configured to determine the layer of the Autosar architecture to which each module in at least one module to be developed belongs according to the layer information of each module;
[0149] A module that can be developed in parallel determination unit 603, configured to determine that modules belonging to different layers of the Autosar architecture are modules that can be developed in parallel.
[0150] In one embodiment, the module that can be developed in parallel determination unit 603 is specifically configured to:
[0151] Determine whether the number of modules in each layer is greater than one;
[0152] In response to the number of modules in each layer not being greater than one, determine that each module is a module that can be developed in parallel.
[0153] In one embodiment, the parallel development module determination device 600 further includes a second parallel development module determination unit, and the second parallel development module determination unit is configured to:
[0154] In response to the number of modules in at least one layer being greater than one, determine the layer in which the number of modules is greater than one;
[0155] Determine whether there is a coupling relationship between the modules in the layer where the number of modules is greater than one;
[0156] Determine that the modules in the same layer that do not have a coupling relationship are modules that can be developed in parallel.
[0157] In one embodiment, the second parallel development module determination unit is further configured to:
[0158] Determine whether the layer where the number of modules is greater than one is the application software layer ASW, or determine whether the layer where the number of modules is greater than one is the basic software layer BSW;
[0159] In response to the layer where the number of modules is greater than one being the ASW, determine that there is no coupling relationship between each module in the ASW;
[0160] Or,
[0161] In response to the layer where the number of modules is greater than one being the BSW, determine the calling module corresponding to each module in the BSW according to a preset calling relationship; wherein, the preset calling relationship refers to the calling relationship between the modules in the ASW and the modules in the BSW, and the calling module refers to the module in the ASW;
[0162] Determine that there is no coupling relationship between the modules in the BSW whose corresponding calling modules are different.
[0163] In one embodiment, the parallel development module determination device 600 further includes a verification unit, and the verification unit is specifically configured to:
[0164] Create a corresponding API for each module that can be developed in parallel;
[0165] Using a preset input, call each module that can be developed in parallel through the API in different call orders to obtain multiple output results;
[0166] Determine that the modules that can be developed in parallel with the consistent multiple output results are modules that can be developed in parallel.
[0167] In one embodiment, the parallel development module determination device 600 further includes a call order generation unit, and the call order generation unit is configured to:
[0168] Generate at least one first order for calling each module that can be developed in parallel through a random algorithm, and the first order refers to a random call order.
[0169] Correspondingly, the verification unit is specifically configured to:
[0170] Call each of the parallel-developable modules through the API according to each first order in at least one first order or each second order in all second orders.
[0171] In one embodiment, the call order generation unit is further configured to:
[0172] Generate at least one second order for calling each of the parallel-developable modules through a permutation and combination algorithm, where the second order refers to a permutation and combination call order.
[0173] Correspondingly, the verification unit is specifically configured to:
[0174] Call each of the parallel-developable modules through the API according to each second order in at least one second order.
[0175] It should be noted that the foregoing explanation of the method embodiments also applies to the device in this embodiment. The principle is the same and will not be further limited in this embodiment.
[0176] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a non-transitory computer-readable storage medium storing computer instructions, and a computer program product.
[0177] Specifically, an embodiment of the present disclosure provides an electronic device, including:
[0178] At least one processor; and
[0179] A memory communicatively connected to the at least one processor; wherein,
[0180] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the steps of the parallel-developable module determination method as described above.
[0181] An embodiment of the present disclosure provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the steps of the parallel-developable module determination method as described above.
[0182] Figure 7FIG. shows a schematic block diagram of an exemplary electronic device 700 that can be used to implement embodiments of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as, for example, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, for example, personal digital processors, cellular telephones, smart phones, wearable devices, in-vehicle devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely exemplary and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0183] As Figure 7 shown, the electronic device 700 includes a computing unit 701 that can perform various appropriate actions and processes according to a computer program stored in a ROM (Read-Only Memory) 702 or a computer program loaded from a storage unit 708 into a RAM (Random Access Memory) 703. In the RAM 703, various programs and data required for the operation of the device 700 can also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An I / O (Input / Output) interface 705 is also connected to the bus 704.
[0184] Multiple components in the device 700 are connected to the I / O interface 705, including: an input unit 704, such as a keyboard, a mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a magnetic disk, an optical disk, etc.; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit allows the device 700 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0185] The computing unit can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, CPU (Central Processing Unit), GPU (Graphic Processing Units), various dedicated AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, DSP (Digital Signal Processor), and any suitable processor, controller, microcontroller, etc. The computing unit 701 executes the various methods and processes described above, such as the parallel development module determination method. For example, in some embodiments, the parallel development module determination method can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 708. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the methods described above can be performed. Alternatively, in other embodiments, the computing unit 701 can be configured to execute the aforementioned parallel development module determination method by any other suitable means (e.g., by means of firmware).
[0186] The various embodiments of the systems and techniques described above in this document can be implemented in digital electronic circuitry, integrated circuit systems, FPGA (Field Programmable Gate Array), ASIC (Application-Specific Integrated Circuit), ASSP (Application Specific Standard Product), SOC (System On Chip), CPLD (Complex Programmable Logic Device), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special-purpose or general-purpose programmable processor, and can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit the data and instructions to the storage system, the at least one input device, and the at least one output device.
[0187] The program code for implementing the methods of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing devices, such that when the program codes are executed by the processor or controller, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The program codes can be executed entirely on the machine, partially on the machine, executed partially on the machine and partially on a remote machine as an independent software package, or executed entirely on a remote machine or server.
[0188] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media would include electrical connections based on one or more wires, portable computer disks, hard disks, RAM, ROM, EPROM (Electrically Programmable Read-Only-Memory), or flash memory, optical fibers, CD-ROM (Compact Disc Read-Only Memory), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0189] It should be understood that various forms of the processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in the present disclosure can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved. No limitations are imposed herein.
[0190] The above specific embodiments do not constitute a limitation on the protection scope of the present disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present disclosure shall be included within the protection scope of the present disclosure.
Claims
1. A method for determining parallel development modules, characterized in that, including: obtaining layer information of each module in at least one module to be developed, where the layer information is used to indicate the layer of the Autosar architecture to which the corresponding module belongs; determining the layer of the Autosar architecture to which each module in at least one module to be developed belongs; determining that modules belonging to different layers of the Autosar architecture are modules that can be developed in parallel.
2. The method according to claim 1, characterized in that After determining that modules belonging to different layers of the Autosar architecture are modules that can be developed in parallel, the method includes: determining whether the number of modules in each layer is greater than one; in response to the number of modules in each layer not being greater than one, determining that each module is a module that can be developed in parallel.
3. The method according to claim 2, wherein After determining whether the number of modules in each layer is greater than one, the method further includes: in response to the number of modules in at least one layer being greater than one, determining the layer in which the number of modules is greater than one; determining whether there is a coupling relationship between the modules in the layer where the number of modules is greater than one; determining that modules in the same layer without a coupling relationship are modules that can be developed in parallel.
4. The method according to claim 3, wherein Determining whether there is a coupling relationship between the modules in the layer where the number of modules is greater than one includes: determining whether the layer where the number of modules is greater than one is the application software layer ASW, or determining whether the layer where the number of modules is greater than one is the basic software layer BSW; in response to the layer where the number of modules is greater than one being the ASW, determining that there is no coupling relationship between each module in the ASW; or, in response to the layer where the number of modules is greater than one being the BSW, judging the calling module corresponding to each module in the BSW according to a preset calling relationship; where the preset calling relationship refers to the calling relationship between the modules in the ASW and the modules in the BSW, and the calling module refers to the module in the ASW; determining that there is no coupling relationship between the modules in the BSW corresponding to different calling modules.
5. The method according to claim 3 or 4, characterized in that, After determining that modules in the same layer without a coupling relationship are modules that can be developed in parallel, the method further includes: creating a corresponding application programming interface API for each module that can be developed in parallel; using a preset input, calling each module that can be developed in parallel through the API in different call orders to obtain multiple output results; determining that the modules that can be developed in parallel with consistent multiple output results are modules that can be developed in parallel.
6. The method according to claim 5, characterized in that Before calling each module that can be developed in parallel through the API in different call orders, the method further includes: generating at least one first order for calling each module that can be developed in parallel through a random algorithm, where the first order refers to a random call order; Calling each module that can be developed in parallel through the API in different call orders includes: calling each module that can be developed in parallel through the API according to each first order in the at least one first order.
7. The method according to claim 5, wherein Before calling each module that can be developed in parallel through the API in different call orders, the method further includes: generating at least one second order for calling each module that can be developed in parallel through a permutation and combination algorithm, where the second order refers to a permutation and combination call order; Invoking each module that can be developed in parallel through the API in different call sequences includes: Invoking each of the modules that can be developed in parallel through the API in each of the at least one second sequence.
8. An apparatus for determining parallel development modules, characterized in that, Including: A layer information acquisition unit configured to acquire layer information of each of at least one module to be developed, where the layer information is used to indicate the layer of the Autosar architecture to which the corresponding module belongs; A layer determination unit configured to determine the layer of the Autosar architecture to which each of at least one module to be developed belongs; A first parallel-developable module determination unit configured to determine modules belonging to different layers of the Autosar architecture as modules that can be developed in parallel.
9. An electronic device, comprising: At least one processor; And A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to execute the method according to any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 7.