AUTOSAR software architecture, agent module design method, electronic equipment, medium and product
By introducing proxy modules and target interfaces into the AUTOSAR architecture, the limitations of API functions of traditional architectures in the diversified reading and writing requirements of EEPROM are solved, and efficient and flexible data interaction is achieved, which reduces development complexity and improves system expansion. sex.
Patent Information
- Application Number
- CN202410855158.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-11-19
AI Technical Summary
When traditional AUTOSAR architecture faces diverse EEPROM reading and writing needs, API functions are limited, resulting in the need to add additional code in the application layer or driver layer, which increases development complexity and maintenance difficulty, and affects the flexibility of system expansion and porting.
Establish a proxy module at the running environment layer and set up multiple target interfaces so that the application can send data read and write requests to the proxy module through the target interface. The proxy module calls the objective functions of the basic software layer according to different read and write requirements to realize the application Read or write program data.
Through the design of proxy modules, the limitations of API functions are solved, the complexity of development and maintenance is reduced, the system is expanded and portable flexibility is improved, the diverse data access needs are met, and the real-time and consistency of data is ensured. .
Smart Images

Figure CN118981303A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of software communication technology, and in particular to an AUTOSAR software architecture, an agent module design method, an electronic device, a medium and a product. Background Art
[0002] With the development of vehicle electronic and electrical architecture, the requirements for EEPROM (Electrically Erasable Programmable Read-Only Memory) read and write are becoming increasingly diverse. The traditional AUTOSAR (AUTomotive Open System Architecture) architecture directly passes the application layer service interface to the basic software layer through the RTE (Runtime Environment) layer. The read and write operations of EEPROM are mainly implemented through modules such as EA (Electronic Architecture) and NVM (Non-Volatile Memory) to achieve basic read and write and status feedback functions.
[0003] However, in the face of diverse customization requirements, the API (Application Programming Interface) provided by the standard AUTOSAR architecture often cannot directly meet them. Therefore, it is necessary to improve the functions by writing additional code at the application layer or complex driver layer, but this also increases the complexity of development and the difficulty of maintenance. Summary of the invention
[0004] The present application provides an AUTOSAR software architecture, a proxy module design method, an electronic device, a medium and a product to solve the problems of API function limitations in related technologies, the need to add additional code at the application layer or the driver layer, which increases the complexity of development and maintenance, and affects the flexibility of system expansion and transplantation.
[0005] The first aspect of the present application provides an AUTOSAR software architecture, including: an application layer, the application layer including at least one application; a basic software layer, used to store data of the at least one application; an operating environment layer, the operating environment layer is established with a proxy module, the proxy module is provided with multiple target interfaces, the proxy module is connected to the interface of at least one application and the interface of the basic software layer through the multiple target interfaces, calls the target function corresponding to the basic software layer according to the read requirement and / or the write requirement, and calls the interface of the application based on the target function to realize the reading or writing of the data of the application.
[0006] Optionally, the read requirement includes a periodic read requirement, a single read requirement and a power-on read requirement, and the write requirement includes a periodic write requirement, a single write requirement and a power-off write requirement.
[0007] Optionally, the condition triggering the read request includes at least one of timed or periodic reading, event triggering, state change, data synchronization or external request.
[0008] Optionally, the condition triggering the write requirement includes at least one of user input, status update, timed or periodic writing, event triggering, external request, and data processing.
[0009] Optionally, the target interface includes at least one of a periodic read interface, a periodic write interface, a single read interface, a single write interface, a power-down write interface and a power-up read interface.
[0010] Optionally, the power-off write interface and the power-on read interface are respectively connected to a startup interface.
[0011] Optionally, the basic software layer includes an abstract module, an interaction module and a storage module, wherein the abstract module provides an abstract interface, the interaction module handles the communication and interaction between the basic software layer, the operating environment layer and the application layer, and the storage module stores and manages data.
[0012] The second aspect of the present application provides a proxy module design method, which is implemented using the AUTOSAR software architecture as described above, wherein the method includes the following steps: identifying read requirements and / or write requirements; calling the target function corresponding to the basic software layer according to the read requirements and / or write requirements; and calling the interface of the application based on the target function to process the reading or writing of the application's data.
[0013] The third aspect of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the proxy module design method as described in the above embodiment.
[0014] The fourth aspect of the present application provides a computer-readable storage medium on which a computer program is stored. The program is executed by a processor to implement the proxy module design method as described in the above embodiment.
[0015] The fifth aspect of the present application provides a computer program product, including a computer program or instructions, which are executed by a processor to implement the proxy module design method as described in the above embodiments.
[0016] Therefore, this application includes the following beneficial effects:
[0017] The embodiment of the present application establishes a proxy module in the operating environment layer and sets up multiple target interfaces, so that the application can send data read and write requests to the proxy module through the target interface. After receiving the request, the proxy module can call the corresponding target function in the basic software layer according to different read requirements and / or write requirements, thereby realizing the reading or writing of application data. In this way, the technical problems such as the limitation of API functions in the related technology, the need to add additional code in the application layer or driver layer, the increase in the complexity of development and maintenance, and the impact on the flexibility of system expansion and transplantation are solved.
[0018] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0020] Figure 1 A flowchart of the AUTOSAR software architecture provided according to the prior art;
[0021] Figure 2 A schematic diagram of an AUTOSAR software architecture provided according to an embodiment of the present application;
[0022] Figure 3 A flowchart of an AUTOSAR software architecture provided according to an embodiment of the present application;
[0023] Figure 4 A flowchart of a proxy module design method provided according to an embodiment of the present application;
[0024] Figure 5 Schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0025] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.
[0026] In the development of electronic control products, AUTOSAR, a standardized and modular software architecture solution, is adopted. However, with the emergence of customized requirements for different projects, the basic AUTOSAR architecture often seems to be stretched, requiring customized supplements and improvements in the application layer or complex driver code.
[0027] In order to meet these diverse development needs, it is expected that more optional configuration solutions will be introduced based on the AUTOSAR architecture. Figure 1 As shown in Figure 1, the service-oriented interface of the SWC layer (Software Component, application layer) relies on the runtime RTE layer to communicate with the BSW (Basic Software, basic software) layer. The RTE layer is responsible for encapsulating the communication and services of the basic software layer and providing a standardized interface for the application layer, so that the application layer can call the services of the basic software through API functions.
[0028] However, with the evolution of vehicle electronic and electrical architecture, the requirements for EEPROM read and write are becoming increasingly diverse. Although the API interfaces provided by AUTOSAR can meet basic read and write and status feedback requirements, in certain scenarios, these interfaces may not be able to directly support complex read and write strategies.
[0029] From the perspective of software architecture, in the traditional AUTOSAR architecture, the service interface of the application layer is directly passed to the basic software layer through the RTE layer, lacking sufficient intermediate logic processing layers. This means that when a specific read and write strategy needs to be implemented, developers often need to write additional code in the application layer or complex drivers, which not only increases the development workload, but also may affect the clarity and maintainability of the software architecture.
[0030] Therefore, in order to improve development efficiency and the flexibility of software architecture, it is necessary to introduce more configurable options and middleware layers based on the AUTOSAR architecture. These middleware layers will be located between the RTE layer and the BSW layer, responsible for processing the complex logic and strategies in EEPROM reading and writing, thereby reducing the development burden of the application layer and complex drivers.
[0031] The following describes the AUTOSAR software architecture, proxy module design method, electronic device, medium and product of the embodiment of the present application with reference to the accompanying drawings. In view of the problem of artificial reception of writing in the application layer or complex driver mentioned in the above background technology, the present application provides an AUTOSAR software architecture, by establishing a proxy module in the operating environment layer, and setting up multiple target interfaces, so that the application can send data read and write requests to the proxy module through the target interface. After receiving the request, the proxy module can call the corresponding target function in the basic software layer according to different read requirements and / or write requirements, thereby realizing the reading or writing of application data. Thus, the API function limitations in the related technology are solved, and additional code needs to be added in the application layer or driver layer, resulting in increased complexity of development and maintenance, and affecting the flexibility of system expansion and transplantation.
[0032] Specifically, Figure 2A schematic diagram of an AUTOSAR software architecture provided in an embodiment of the present application.
[0033] like Figure 2 As shown, the AUTOSAR software architecture includes: an application layer 100 , an operating environment layer 200 and a basic software layer 300 .
[0034] Among them, the application layer 100 includes at least one application; the operating environment layer 200 is established with a proxy module, and the proxy module sets multiple target interfaces. The proxy module calls the target function corresponding to the basic software layer according to the read demand and / or write demand through the multiple target interfaces and the interface of at least one application and the interface of the basic software layer 300, and calls the interface of the application based on the target function to realize the reading or writing of the application data; the basic software layer 300 is used to store the data of at least one application.
[0035] It can be understood that the embodiment of the present application realizes efficient and flexible data interaction between the application layer 100 and the basic software layer 300 by establishing a proxy module in the operating environment layer 200 and setting multiple target interfaces. The proxy module can call the target function of the basic software layer according to the read and write requirements, and realize the reading or writing of data through the interface of the application program, thereby improving the scalability and maintainability of the software architecture.
[0036] In the embodiment of the present application, the read requirement includes a periodic read requirement, a single read requirement, and a power-on read requirement, and the write requirement includes a periodic write requirement, a single write requirement, and a power-off write requirement.
[0037] It can be understood that the embodiments of the present application support multiple read and write requirements such as periodic read / write, single read / write, power-on read and power-off write, effectively meeting the diverse needs of different applications in data access.
[0038] In an embodiment of the present application, the condition for triggering a read request includes at least one of timed or periodic reading, event triggering, state change, data synchronization, or external request.
[0039] It can be understood that the embodiments of the present application achieve accurate and efficient access of the application layer to the basic software layer data by flexibly setting the conditions for triggering read requests, including at least one of timed or periodic reading, event triggering, state change, data synchronization or external request, which not only improves the flexibility of data interaction, but also ensures the consistency and real-time nature of the data.
[0040] In an embodiment of the present application, the conditions for triggering a write request include at least one of user input, status update, timed or periodic writing, event triggering, external request, and data processing.
[0041] It can be understood that the embodiments of the present application set a variety of triggering write demand conditions, including user input, status update, timed or periodic writing, event triggering, external request, data processing, etc., so that the basic software layer can flexibly respond to write requests from various application layers, thereby enhancing the flexibility and responsiveness of the software architecture and ensuring the timeliness and accuracy of data updates.
[0042] In an embodiment of the present application, the target interface includes at least one of a periodic read interface, a periodic write interface, a single read interface, a single write interface, a power-down write interface and a power-up read interface.
[0043] In the embodiment of the present application, the power-off write interface and the power-on read interface are respectively connected to the startup interface.
[0044] In an embodiment of the present application, the basic software layer includes an abstract module, an interaction module and a storage module.
[0045] Among them, the abstract module provides an abstract interface, the interaction module handles the communication and interaction between the basic software layer, the operating environment layer and the application layer, and the storage module stores and manages data.
[0046] It can be understood that the embodiment of the present application realizes the abstract management of data, efficient processing of inter-layer communication and reliable storage of data by designing the architecture of abstract module, interaction module and storage module. The abstract module provides a unified interface to simplify the access of data by the application layer; the interaction module ensures smooth communication between the operating environment layer and the application layer and the basic software layer; the storage module provides the function of secure storage and management of data, enhances the modularity, maintainability and scalability of the software architecture, and provides stable and reliable data support for complex applications.
[0047] According to the AUTOSAR software architecture proposed in the embodiment of the present application, by establishing a proxy module in the operating environment layer and setting up multiple target interfaces, the application can send data read and write requests to the proxy module through the target interface. After receiving the request, the proxy module can call the corresponding target function in the basic software layer according to different read requirements and / or write requirements, thereby realizing the reading or writing of application data. In this way, the API function limitations in the related technology are solved, and additional code needs to be added in the application layer or driver layer, resulting in increased development and maintenance complexity, and affecting the flexibility of system expansion and transplantation.
[0048] The following will be combined Figure 3 The AUTOSAR software architecture is explained in detail as follows: Under the premise of maintaining the vehicle architecture design and the application layer task cycle unchanged, an EEPROM read and write proxy module is integrated in the RTE layer of the AUTOSAR software architecture to provide a set of basic read and write service API interfaces.
[0049] Establish a proxy module. The proxy module designed in the RTE layer provides six API interfaces based on the service interface, corresponding to the functions of periodic read, periodic write, single read, single write, power-off write and power-on read. These interfaces provide a unified access mechanism for the application layer and simplify the data reading and writing process.
[0050] Among them, the periodic read and write service is for specific functions, such as power-related functions, when periodic data recording is required, the application layer can call the periodic read and write service interface. The proxy module will periodically access the application in the SWC to read data and perform read and write operations on the EEPROM through the BSW;
[0051] Secondly, for most functions, the data that need to be recorded generally need to be written before power-off to ensure that the data is not lost. Therefore, corresponding service interfaces related to power-off writing and power-on reading are provided to avoid the repeated calling of the interfaces of the power-on and power-off modules by each SWC in the application layer to read and write after judgment. It also avoids the situation where some APPs are not completed and the data is not written due to the power-off time being too short.
[0052] Because the proxy module is used, the service interface API provided can be called by multiple applications at the same time. Therefore, when an application originally designed for periodic reading and writing needs to perform a single reading and writing operation under specific working conditions, the periodic reading and writing API and the single reading and writing API can be called simultaneously in the same application target function;
[0053] The embodiment of the present application significantly reduces the CPU resource usage by placing the proxy module in the RTE layer. The proxy module will only run when an application calls the API interface to process the data in the RAM. This greatly reduces the CPU resources used by each application to directly call the BSW module separately, and also shortens the time required for each read and write operation, thereby avoiding problems such as data loss or delay.
[0054] In summary, the RTE layer based on the AUTOSAR software structure introduces an EEPROM read-write proxy module, which effectively meets the vehicle data read-write requirements through six unique processing methods, reduces CPU resource usage, and improves flexibility and operability. The controller software performance is optimized without changing the vehicle architecture, ensuring product versatility and scalability of service-oriented design. At the same time, the stability of application layer tasks is guaranteed, the complexity of architecture design is simplified, and repetitive work is avoided through integrated development tools to improve development efficiency.
[0055] Figure 4 A schematic diagram of a proxy module design method provided in an embodiment of the present application.
[0056] like Figure 4As shown, the proxy module design method is implemented using the AUTOSAR software architecture as described above, wherein the proxy module design method includes the following steps:
[0057] In step S101 , a read request and / or a write request is identified.
[0058] It can be understood that the embodiments of the present application accurately identify read requirements and / or write requirements, providing a solid foundation for subsequent data processing.
[0059] In step S102, a target function corresponding to the basic software layer is called according to a read requirement and / or a write requirement.
[0060] Among them, the target function may include the underlying logic related to data reading and writing, such as file system operations, database queries, etc.
[0061] It is understandable that the embodiment of the present application accurately calls the target function corresponding to the basic software layer according to the read demand and / or write demand, makes full use of the optimized and verified function library in the basic software layer, can ensure the accuracy and efficiency of data processing, and by directly calling the target function, it eliminates unnecessary intermediate links and data conversion, greatly reducing the complexity of data processing and the potential risk of errors. At the same time, the ability to flexibly adjust the data processing method and process to adapt to the personalized needs of different application scenarios and data types.
[0062] In step S103, the reading or writing of data of the application program is processed by calling the interface of the application program based on the target function.
[0063] It can be understood that the embodiments of the present application achieve efficient, accurate and flexible application data reading and writing operations by accurately calling the target functions of the basic software layer and using these functions to directly call the application program interface.
[0064] According to the proxy module design method proposed in the embodiment of the present application, by establishing a proxy module in the operating environment layer and setting up multiple target interfaces, the application can send data read and write requests to the proxy module through the target interface. After receiving the request, the proxy module can call the corresponding target function in the basic software layer according to different read requirements and / or write requirements, thereby realizing the reading or writing of application data. In this way, the API function limitations in the related technology are solved, and additional code needs to be added in the application layer or driver layer, resulting in increased complexity of development and maintenance, and affecting the flexibility of system expansion and transplantation.
[0065] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may include:
[0066] A memory 501 , a processor 502 , and a computer program stored in the memory 501 and executable on the processor 502 .
[0067] When the processor 502 executes the program, the proxy module design method provided in the above embodiment is implemented.
[0068] Furthermore, the electronic device further comprises:
[0069] The communication interface 503 is used for communication between the memory 501 and the processor 502 .
[0070] The memory 501 is used to store computer programs that can be executed on the processor 502 .
[0071] The memory 501 may include a high-speed RAM (Random Access Memory) memory, and may also include a non-volatile memory, such as at least one disk memory.
[0072] If the memory 501, the processor 502 and the communication interface 503 are implemented independently, the communication interface 503, the memory 501 and the processor 502 can be connected to each other through a bus and communicate with each other. The bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0073] Optionally, in a specific implementation, if the memory 501, the processor 502 and the communication interface 503 are integrated on a chip, the memory 501, the processor 502 and the communication interface 503 can communicate with each other through an internal interface.
[0074] The processor 502 may be a CPU (Central Processing Unit), or an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application.
[0075] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the above-mentioned proxy module design method is implemented.
[0076] An embodiment of the present application also provides a computer program product, including a computer program or instructions, which, when executed by a processor, implements the above-mentioned proxy module design method.
[0077] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms are not necessarily directed to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0078] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0079] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or N executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.
[0080] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiment, the N steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array, a field programmable gate array, etc.
[0081] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0082] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in the field can change, modify, replace and modify the above embodiments within the scope of the present application.
Claims
1. An AUTOSAR software architecture, It is characterized in that include: An application layer, the application layer comprising at least one application program; A basic software layer for storing data of the at least one application; An operating environment layer is provided with a proxy module, wherein the proxy module is provided with a plurality of target interfaces, and the proxy module is connected with an interface of at least one application and an interface of the basic software layer through the plurality of target interfaces, and calls a target function corresponding to the basic software layer according to a read demand and / or a write demand, and calls the interface of the application based on the target function to realize the reading or writing of the data of the application.
2. The AUTOSAR software architecture according to claim 1, It is characterized in that The read requirements include periodic read requirements, single read requirements and power-on read requirements, and the write requirements include periodic write requirements, single write requirements and power-off write requirements.
3. The AUTOSAR software architecture according to claim 2, It is characterized in that The conditions triggering the read requirement include at least one of timed or periodic reading, event triggering, state change, data synchronization or external request; the conditions triggering the write requirement include at least one of user input, state update, timed or periodic writing, event triggering, external request, and data processing.
4. The AUTOSAR software architecture according to claim 1, It is characterized in that The target interface includes at least one of a periodic read interface, a periodic write interface, a single read interface, a single write interface, a power-off write interface, and a power-on read interface.
5. The AUTOSAR software architecture according to claim 4, It is characterized in that The power-off write interface and the power-on read interface are both connected to the power-off and power-off service interfaces of the application layer.
6. The AUTOSAR software architecture according to claim 1, It is characterized in that The basic software layer includes an abstract module, an interaction module and a storage module, wherein the abstract module provides an abstract interface, the interaction module processes the interaction data between the basic software layer, the operating environment layer and the application layer, and the storage module stores data of at least one application.
7. A proxy module design method, It is characterized in that The method is implemented using the AUTOSAR software architecture of any one of claims 1 to 6, wherein the method comprises the following steps: Identify read requirements and / or write requirements; Calling a target function corresponding to the basic software layer according to the read requirement and / or the write requirement; The target function calls the interface of the application program to process the reading or writing of the data of the application program.
8. An electronic device, It is characterized in that include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the proxy module design method according to claim 7.
9. A computer-readable storage medium having a computer program or instructions stored thereon, It is characterized in that When the computer program or instruction is executed, the agent module design method described in claim 7 is implemented.
10. A computer program product comprising a computer program or instructions, It is characterized in that When the computer program or instruction is executed, the agent module design method described in claim 7 is implemented.
