Parameter configuration method, device, and system

The embedded device's service layer automates the retrieval and management of hardware resource parameters for AUTOSAR, improving configuration efficiency, reducing errors, and optimizing resource usage and power consumption.

JP7547636B2Active Publication Date: 2024-09-09YINWANG INTELLIGENT TECHNOLOGIES CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2023532418
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2020-11-27
Filing Date
2021-09-09
Publication Date
2024-09-09
Estimated Expiration
2041-09-09

AI Technical Summary

Technical Problem

The manual entry of hardware resource parameters in the AUTOSAR configuration process leads to low parameter configuration efficiency and a high likelihood of errors.

Method used

The service layer of an embedded device automatically obtains hardware resource parameters and sends them to AUTOSAR development tools, generating configuration and executable files, with the ability to adjust resource status based on management policies.

Benefits of technology

This approach enhances parameter configuration efficiency, reduces the likelihood of errors, and improves application development efficiency while optimizing power consumption and resource scheduling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007547636000003
    Figure 0007547636000003
  • Figure 0007547636000008
    Figure 0007547636000008
  • Figure 0007547636000006
    Figure 0007547636000006
Patent Text Reader

Abstract

This application provides a parameter configuration method, apparatus, and system, related to the field of intelligent vehicles. In the solution provided in this application, a service layer of an embedded device can directly obtain hardware resource parameters from a hardware layer and send the hardware resource parameters to an AUTOSAR development tool, which then generates a configuration file and an executable file. Developers do not need to manually input hardware resource parameters into the development tool. Therefore, parameter configuration efficiency can be effectively improved, the probability of incorrect parameter configuration can be reduced, and application development efficiency can be further improved. The embedded device can be applied to vehicles such as intelligent vehicles, connected vehicles, or new energy vehicles.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] This application claims priority to Chinese Patent Application No. 202011364749.6, entitled “Parameter Configuration Method, Apparatus, and System,” filed on November 27, 2020, the entire contents of which are incorporated herein by reference.

[0002] The present application relates to the field of intelligent vehicles, and in particular to a parameter configuration method, apparatus, and system. [Background technology]

[0003] Automotive open systems architecture (AUTOSAR) is an open, standardized software architecture developed for the automotive industry.

[0004] If an application is developed based on AUTOSAR, a user may determine the hardware configuration of a device by remotely connecting to the device using a protocol such as a remote terminal (Telnet) or secure shell (ssh) and entering a command line, or the user may check a hardware manual to determine the hardware configuration of the device. Then, the user may manually enter hardware resource parameters into an AUTOSAR configuration tool based on the hardware configuration. The configuration tool may then determine the hardware configuration of the device based on the hardware configuration entered by the user. resource A description file may be generated based on the parameters, and an AUTOSAR generation tool may further generate configuration files and executable files based on the description file.

[0005] However, the above development process requires users to manually input hardware resource parameters, resulting in low parameter configuration efficiency. Summary of the Invention

[0006] The present application provides a parameter configuration method, apparatus and system to solve the problem of low parameter configuration efficiency caused by manual parameter configuration. [Means for solving the problem]

[0007] According to one aspect, a parameter configuration method is provided and applied to an embedded device using AUTOSAR. The embedded device includes a hardware layer, a service layer, and an application layer. The method includes the service layer obtaining hardware resource parameters of the hardware layer and sending the hardware resource parameters to an AUTOSAR development tool. The hardware resource parameters are used by the AUTOSAR development tool to generate executable files and configuration files, which can be stored in the hardware layer. The service layer can then operate the executable files based on the configuration files.

[0008] The service layer can directly obtain the hardware resource parameters of the hardware layer and send the hardware resource parameters to the AUTOSAR development tool, so that the developer does not need to manually input the hardware resource parameters into the development tool, thereby effectively improving the parameter configuration efficiency and reducing the probability of incorrect parameter configuration.

[0009] Optionally, the configuration file includes a resource management policy. The method may further include the service layer adjusting, based on the resource management policy, an operational status of a hardware resource included in the hardware layer.

[0010] The service layer can flexibly schedule hardware resources based on resource management policies in a configuration file.

[0011] Optionally, the resource management policy may include an identifier and a first property of the target hardware resource, where the first property indicates a resource management scheme of the target hardware resource. A process of the service layer adjusting an operational status of a hardware resource included in the hardware layer based on the resource management policy may include the service layer adjusting an operational status of the target hardware resource indicated by the identifier based on the resource management scheme indicated by the first property.

[0012] In the resource management policy, different resource management schemes can be configured for different hardware resources, so that the service layer can make desired adjustments to the operating statuses of different hardware resources based on the resource management policy.

[0013] Optionally, the resource management policy may further include a second property. The second property indicates a startup condition for managing the target hardware resource. The process of the service layer adjusting the operation status of the target hardware resource indicated by the identifier based on the resource management scheme indicated by the first property may include, when the service layer determines that the operation status of the target hardware resource indicated by the identifier satisfies the startup condition indicated by the second property, the service layer adjusting the operation status of the target hardware resource based on the resource management scheme indicated by the first property.

[0014] In other words, the service layer may adjust the operation status of the target hardware resource after determining that the operation status of the target hardware resource meets the start-up condition. If the service layer determines that the operation status of the target hardware resource does not meet the start-up condition, the service layer does not need to adjust the operation status of the target hardware resource. In this way, the performance of the embedded device can be prevented from being affected by erroneously adjusting the operation status of the hardware resource, and the reliability of resource scheduling is guaranteed.

[0015] Optionally, the resource management scheme includes disabling the target hardware resource or reducing the operating frequency of the target hardware resource.

[0016] The service layer can effectively reduce the power consumption of the embedded device by disabling the target hardware resource or reducing the operating frequency of the target hardware resource.

[0017] Optionally, the process of the service layer adjusting the operational status of a hardware resource included in the hardware layer based on the resource management policy may include, when the service layer detects that a state switch occurs in the embedded device and the state switch satisfies a hardware resource adjustment condition, the service layer adjusting the operational status of the hardware resource based on the resource management policy.

[0018] The adjustment conditions may be pre-configured in the service layer or carried in a configuration file. When a state switch satisfies the adjustment conditions, the operation status of the hardware resource is adjusted, thereby avoiding an unstable state of the embedded device caused by frequent adjustment of the operation status of the hardware resource.

[0019] Optionally, the process of the service layer obtaining hardware resource parameters of the hardware layer may include the service layer receiving a configuration command sent by the AUTOSAR development tool, and the service layer obtaining the hardware resource parameters of the hardware layer according to the configuration command.

[0020] Optionally, the hardware resource parameters may include machine parameters and system parameters. The machine parameters may include at least a processor-related parameter, a memory-related parameter, and a hard disk-related parameter. The system parameters may include network parameters, for example, a network adapter-related parameter.

[0021] According to another aspect, an embedded device is provided. The embedded device uses AUTOSAR, and the embedded device includes a hardware layer, a service layer, and an application layer. The service layer may include a communication interface and at least one module. The communication interface and the at least one module may be configured to implement the parameter configuration method provided in the previous aspect.

[0022] According to yet another aspect, an embedded device is provided. The embedded device uses AUTOSAR, and the embedded device includes a memory and a processor. The memory is configured to store a computer program. The processor executes the computer program stored in the memory, thereby configuring the embedded device to perform the parameter configuration method provided in the previous aspect.

[0023] According to yet another aspect, a parameter configuration system is provided, the system including an AUTOSAR development tool and an embedded device according to the previous aspect, the AUTOSAR development tool configured to generate executable files and configuration files based on hardware resource parameters sent by a service layer of the embedded device.

[0024] According to yet another aspect, a computer-readable storage medium is provided having instructions stored thereon, the instructions being executable by a processor to implement the parameter configuration method provided in the aforementioned aspect.

[0025] According to a further aspect, there is provided a computer program product comprising instructions, which when run on a computer, enable the computer to perform the parameter configuration method provided in the above aspect.

[0026] According to yet a further aspect, there is provided a chip comprising programmable logic circuitry and / or program instructions, which when operated, is configured to perform the parameter configuration method provided in the previous aspect.

[0027] The technical solutions provided in this application include at least the following beneficial effects:

[0028] This application provides a parameter configuration method, apparatus, and system. The service layer of an embedded device can directly obtain hardware resource parameters of a hardware layer and send the hardware resource parameters to an AUTOSAR development tool, so that the AUTOSAR development tool generates a configuration file and an executable file. Developers do not need to manually input hardware resource parameters into the development tool. Therefore, the parameter configuration efficiency can be effectively improved, the probability of incorrect parameter configuration can be reduced, and application development efficiency can be further improved. [Brief description of the drawings]

[0029] [Figure 1] FIG. 1 is an architecture diagram of an AUTOSAR AP according to one embodiment of the present application. [Diagram 2] FIG. 2 is a schematic diagram of an application scenario of a parameter configuration method according to an embodiment of the present application; [Diagram 3] 2 is a flowchart of a parameter configuration method according to an embodiment of the present application. [Figure 4] FIG. 2 is a schematic diagram of a structure of a target service module of a service layer according to an embodiment of the present application; [Diagram 5] FIG. 2 is a schematic diagram of a configuration interface of a configuration tool according to an embodiment of the present application. [Figure 6] FIG. 13 is a schematic diagram of a configuration interface of another configuration tool according to an embodiment of the present application. [Figure 7] 2 is a flowchart of a method for adjusting an operational status of a hardware resource according to an embodiment of the present application; [Figure 8A] 4 is a flowchart of another parameter configuration method according to an embodiment of the present application. [Figure 8B] 4 is a flowchart of another parameter configuration method according to an embodiment of the present application. [Figure 9] FIG. 2 is a schematic diagram of a server layer structure according to an embodiment of the present application; [Figure 10] FIG. 1 is a schematic diagram of a structure of an embedded device according to an embodiment of the present application. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0030] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS With reference to the accompanying drawings, the following describes in detail the parameter configuration method, apparatus and system provided in the embodiments of the present application.

[0031] The basic software (BSW) layer of the AUTOSAR layered software architecture can be applied to vehicles produced by different manufacturers and to electronic components provided by different suppliers. This reduces research and development costs and can adapt to the increasingly complex electrical and software architectures of automobiles. AUTOSAR includes two main types of platforms:

[0032] 1. AUTOSAR classic platform (CP): AUTOSAR CP is an embedded real-time electronic control unit (ECU) standard based on the open systems and the corresponding interfaces for automotive electronics (OSEK) standard. The architecture of AUTOSAR CP includes an application layer running on a microcontroller, a runtime environment (RTE) layer, and a BSW layer. The application layer is essentially independent of hardware. Software components in the application layer communicate with each other using the RTE layer, and the software components also need to access the BSW using the RTE.

[0033] 2. AUTOSAR adaptive platform (AP): AUTOSAR AP can use two types of interfaces: service interface and application programming interface (API). AUTOSAR AP consists of a service layer and a distributed function cluster in the AUTOSAR AP base.

[0034] Figure 1 is an architecture diagram of an AUTOSAR AP according to one embodiment of the present application. As shown in Figure 1, the architecture of the AUTOSAR AP may include a hardware layer 01, an operating system (OS) interface 02, a service layer 03, and an application layer 04. The OS interface 02 may be a portable operating system interface (POSIX). The service layer 03 may include multiple middlewares, which may also be referred to as service modules.

[0035] See, for example, Figure 1. The service layer 03 may include the following service modules: a communication management (CM) module, a core type module, a RESTful module, a persistency module, an execution management (EM) module, a time synchronization module, a platform health management (PHM) module, an identity and access management (IAM) module, a diagnostics module, a log and trace module, a cryptograph module, a state management (SM) module, a network management (NM) module, and an update and configuration management module, etc. RESTful is a development methodology based on representational state transfer (REST).

[0036] With the advent of automotive intelligence and electrification, automobiles' electronic computing power is becoming higher and higher, their memory is becoming larger and larger, and their electronic and electrical structures are becoming more and more complex. As a result, AUTOSAR configuration items are large in scale, complex in structure, and have a high learning threshold. For example, as the hardware structure of a device becomes more and more complex, the number of hardware resource parameters that need to be manually entered by the user increases. As a result, the parameter configuration process is prone to errors and the configuration efficiency is low.

[0037] An embodiment of the present application provides a parameter configuration method to solve the problem of low efficiency in configuring hardware resource parameters. Figure 2 is a schematic diagram of an application scenario of the parameter configuration method according to an embodiment of the present application. As shown in Figure 2, the application scenario may include an embedded device 001 using AUTOSAR and an AUTOSAR development tool 002. The AUTOSAR development tool 002 may include a configuration tool 0021 and a generation tool 0022. The configuration tool 0021 is configured to generate a description file based on the acquired configuration parameters (including hardware resource parameters and function configuration parameters). The generation tool 0022 is configured to generate a configuration file and an executable (exe) file based on the description file. For example, the generation tool 0022 may generate a code file based on the description file, and then compile the code file to obtain the executable file.

[0038] The description file may be a file in the AUTOSAR extensible markup language (arxml) format. The configuration file may be a file in the JavaScript object notation (JSON) format.

[0039] 3 is a flowchart of a parameter configuration method according to an embodiment of the present application. The method can be applied to the application scenario shown in FIG. 2. For example, the embedded device shown in FIG. 001 As shown in Figure 1, embedded devices can use AUTOSAR APs. 001 may include a hardware layer 01, a service layer 03, and an application layer 04. See Figure 2. The method includes the following steps.

[0040] Step 101: The configuration tool sends configuration instructions to the service layer.

[0041] In this embodiment of the present application, when the configuration tool needs to obtain the hardware resource parameters of the hardware layer of the embedded device to generate a description file, the configuration tool may send a configuration instruction to the service layer, which is used to instruct the service layer to obtain the hardware resource parameters of the hardware layer.

[0042] Optionally, there may be one target service module among multiple service modules included in the service layer of the embedded device. The target service module may communicate with a configuration tool and may schedule and manage hardware resources included in the hardware layer. The target service module may be an EM module, an SM module, a CM module, or a PHM module of the service layer, etc.

[0043] 4 is a schematic diagram of the structure of a target service module of a service layer according to an embodiment of the present application. As shown in FIG. 4, the target service module may include a communication interface 031 and a resource management module 032. The communication interface 031 is configured to communicate with a configuration tool. Correspondingly, the configuration tool may send configuration instructions to the communication interface 031 of the target service module of the service layer. The resource management module 032 includes an analysis submodule 032a and a management submodule 032b. The analysis submodule 032a is configured to analyze and obtain hardware resource parameters of the hardware layer, and the management submodule 032b is configured to schedule and manage the hardware resources included in the hardware layer.

[0044] The communication interface 031 may be an interface developed based on a protocol such as the transmission control protocol (TCP), the hypertext transfer protocol (HTTP), or the remote procedure call (RPC).

[0045] Step 102: The service layer obtains hardware resource parameters of the hardware layer according to the configuration instructions.

[0046] After receiving the configuration command, the service layer of the embedded device may obtain hardware resource parameters of the hardware layer in response to the configuration command. In this embodiment of the present application, the hardware resource parameters may include machine parameters and system parameters. The machine parameters may include at least processor-related parameters, memory-related parameters, and hard disk-related parameters. The system parameters may include network parameters, for example, network adapter-related parameters. The processor may include a central processing unit (CPU), etc., and the processor may include multiple processor cores.

[0047] Optionally, in addition to the machine parameters and system parameters, the hardware resource parameters may further include other types of parameters, which may include related parameters of an electronic control unit (ECU), related parameters of a microcontroller unit (MCU), and related parameters of peripheral devices (e.g., sensors such as cameras, laser radars, etc.).

[0048] See Figure 4. After receiving the configuration command, the communication interface 031 of the target service module of the service layer may send the configuration command to the resource management module 032. The analysis sub-module 032a in the resource management module 032 may further obtain hardware resource parameters of the hardware layer in response to the configuration command.

[0049] Step 103: The service layer sends the hardware resource parameters to the configuration tool.

[0050] After obtaining the hardware resource parameters, the service layer may send the hardware resource parameters to a configuration tool in the AUTOSAR development tool, which may use the hardware resource parameters to generate a description file, and a generation tool in the development tool may further generate an executable file and a configuration file based on the description file.

[0051] For example, see Figure 4. The target service module of the service layer may send the obtained hardware resource parameters to the configuration tool via the communication interface 031.

[0052] FIG. 5 is a schematic diagram of a configuration interface of a configuration tool according to an embodiment of the present application. As shown in FIG. 5, the machine parameters sent by the service layer and received by the configuration tool may include CPU-related parameters, and the CPU-related parameters may include parameters of each core in the CPU. For example, see FIG. 5. The CPU-related parameters may include parameters of core0 to core3 in CPU0, and parameters of core0 and core1 in CPU1. The parameters of each core may include the following properties: category, checksum, core ID, short name, timestamp, and universally unique identifier (UUID).

[0053] Figure 6 is a schematic diagram of a configuration interface of another configuration tool according to an embodiment of the present application. As shown in Figure 6, the system parameters sent by the service layer and received by the configuration tool may include Ethernet-related parameters. See Figure 6. The Ethernet-related parameters may include at least one of the following properties: baud rate, checksum, coupling port switchoff delay, protocol name, protocol version, speed, and timestamp.

[0054] The Ethernet related parameters may further include Internet protocol version 4 (IPv4) configuration parameters, where the IPv4 configuration parameters may include at least one of the following properties: assignment priority, checksum, default gateway, domain name system (DNS) server address, IP address keep behavior, IPv4 address, IPv4 address source, network mask, timestamp, and time-to-live (TTL) value. The value of the property: IP address keep behavior is store persistently, and the value of the property: IPv4 address source is DHCPV-4, which represents the dynamic host configuration protocol (DHCP) used to configure IP addresses required by IPv4 hosts.

[0055] Step 104: The configuration tool generates a description file based on the hardware resource parameters.

[0056] In this embodiment of the present application, the AUTOSAR metamodel is pre-configured in the configuration tool. After receiving the hardware resource parameters sent by the server layer, the configuration tool may generate an AUTOSAR model based on the hardware resource parameters and the metamodel. This process may also be called mapping the hardware resource parameters to the AUTOSAR model. Then, the AUTOSAR model is exported from the memory of the configuration tool to a hard disk of the configuration tool to obtain a description file. The description file may be a file in .arxml format.

[0057] The AUTOSAR metamodel is a unified modeling language (UML) model for defining the language for describing AUTOSAR systems, and is a graphical representation of templates (which define the structure of software components and ECUs, etc., to form an AUTOSAR hardware and software system). The AUTOSAR model is Meta There is an instance of the model.

[0058] Step 105: The generation tool generates an executable file and a configuration file based on the description file.

[0059] After the configuration tool generates the description file, the generation tool may obtain the description file and generate an executable file and a configuration file based on the description file. The executable file may be a file in .exe format, and the configuration file may be a file in .jason format. In this embodiment of the present application, the developer may further store both the executable file and the configuration file generated by the generation tool in the hardware layer of the embedded device.

[0060] Step 106: The service layer runs the executable file based on the configuration file.

[0061] In this embodiment of the present application, the service layer may read the configuration file at the hardware layer and run the executable file based on the configuration file.

[0062] Step 107: The service layer adjusts the operating status of the hardware resources included in the hardware layer according to the resource management policy in the configuration file.

[0063] The configuration file may include a resource management policy. The service layer may adjust the operation status of the hardware resources included in the hardware layer based on the resource management policy in the operation process of the embedded device. In this way, the hardware resources can be flexibly scheduled and managed, and the power consumption of the embedded device can be effectively reduced without affecting the proper operation of the embedded device.

[0064] Optionally, the resource management policy in the configuration file may include at least one policy configuration item, and each policy configuration item is used to indicate a management policy of a hardware resource of a hardware layer. A target hardware resource of a hardware layer is used as an example. The policy configuration item of the target hardware resource may include an identifier of the target hardware resource and a first property. The first property indicates a resource management scheme of the target hardware resource, and the resource management scheme may include disabling the target hardware resource or reducing the operating frequency of the target hardware resource.

[0065] For example, if the target hardware resource is a processor core, the identifier of the target hardware resource may include an identifier (ID) of the processor core and an ID of the processor to which the processor core belongs. If the target hardware resource is a sensor, the identifier of the target hardware resource may be an ID of the sensor.

[0066] It may be understood that in the resource management policy, different resource management schemes may be configured for different hardware resources, such that the service layer can make desired adjustments to the operational status of different hardware resources based on the resource management policy.

[0067] In this embodiment of the present application, the policy configuration item of the target hardware resource may further include a second property, and the second property indicates a startup condition for managing the target hardware resource. In other words, the service layer may adjust the operation status of the target hardware resource after determining that the operation status of the target hardware resource meets the startup condition. In this way, Hardware It can prevent the performance of the embedded device from being affected by erroneously adjusting the operating status of resources, and the reliability of resource scheduling is guaranteed.

[0068] The implementation process of step 107 is described using an example in which the policy configuration item of the target hardware resource includes an identifier of the target hardware resource, a first property, and a second property, see Fig. 7. Step 107 may include the following steps:

[0069] Step 1071: When detecting that a state switch occurs in the embedded device, the service layer determines whether the state switch satisfies a hardware resource adjustment condition.

[0070] In this embodiment of the present application, the service layer may monitor the status of the embedded device (which may also be referred to as the machine status) in real time during the operation process of the embedded device. When detecting that the state of the embedded device has changed, i.e., when the state of the embedded device is switched, the service layer may further detect whether the state switch satisfies the hardware resource adjustment condition. If the service layer determines that the state switch satisfies the hardware resource adjustment condition, step 1072 may be performed. If the service layer determines that the state switch does not satisfy the hardware resource adjustment condition, the service layer may terminate the operation, i.e., do not adjust the operation status of the hardware resource. In addition, the service layer may continue to monitor the status of the embedded device.

[0071] The adjustment conditions may be pre-configured in the service layer or carried in a configuration file. For example, the adjustment conditions may include one or more of the following conditions: a change in hardware resource utilization (e.g., CPU utilization) before and after a state switch is greater than a change threshold, after a state switch, the hardware resource utilization is less than a utilization threshold, after a state switch, some processes are in a zombie state, and after a state switch, a task executed by the embedded device is a task whose performance consumption is less than a consumption threshold.

[0072] According to the method provided in this embodiment of the present application, the operational status of a hardware resource can be adjusted when the state switching meets an adjustment condition, thereby avoiding an unstable state of the embedded device caused by frequent adjustment of the operational status of the hardware resource.

[0073] Step 1072: The service layer detects whether the operation status of the target hardware resource of the hardware layer satisfies the activation condition indicated by the second property.

[0074] When detecting that a state switch of the embedded device satisfies a hardware resource adjustment condition, the service layer may adjust the operational status of a hardware resource included in the hardware layer based on a resource management policy in the configuration file. If the resource management policy includes a policy configuration item for a target hardware resource, the service layer may determine a target hardware resource of the hardware layer based on an identifier in the policy configuration item and detect whether the target hardware resource satisfies the activation condition indicated by the second property.

[0075] If the service layer determines that the operation status of the target hardware resource satisfies the start-up condition indicated by the second property, the service layer may continue to perform step 1073. If the service layer determines that the operation status of the target hardware resource does not satisfy the start-up condition indicated by the second property, the service layer may terminate the operation, i.e., do not adjust the operation status of the target hardware resource. In this way, the performance of the embedded device can be prevented from being affected by erroneously adjusting the operation status of the hardware resource, and the reliability of resource scheduling is guaranteed.

[0076] Step 1073: The service layer adjusts the operation status of the target hardware resource based on the resource management scheme indicated by the first property.

[0077] If the service layer determines that the operational status of the target hardware resource satisfies the activation condition indicated by the second property, the service layer may adjust the operational status of the target hardware resource based on the resource management scheme indicated by the first property.

[0078] For example, assume that the target hardware resource is a processor core in the hardware layer, the resource management scheme indicated by a first property in the resource configuration item of the processor core is to disable the processor core, and the activation condition indicated by a second property is that the processor core is less than 10% utilized, in which case the service layer may disable the processor core when it detects that the processor core is less than 10% utilized.

[0079] It should be understood that the hardware layer may include multiple hardware resources, for example, a processor, a memory, a network adapter, an ECU, an MCU, and peripherals, and the processor may further include multiple different processor cores. Thus, the resource management policy may include policy configuration items of multiple different hardware resources. Correspondingly, the service layer may adjust the operation status of the corresponding hardware resource based on each policy configuration item to implement flexible scheduling of the hardware resources of the hardware layer.

[0080] In this embodiment of the present application, for at least one type of hardware resource (e.g., processor, memory, network adapter, ECU, MCU, peripherals, etc.) of the hardware layer, a strategy config item for managing the hardware resource may be added to the metamodel stored in the configuration tool. After the configuration tool generates a configuration file based on the metamodel, the configuration file may include the policy configuration item of the hardware resource.

[0081] For example, a processor in the hardware layer is a CPU. For a processor core in a CPU, a new policy configuration item to be added to the metamodel can be shown in Table 1, where the base type of the policy configuration item is the AUTOSAR object (AR object) type. See Table 1. It can be seen that a policy configuration item includes multiple properties (attribute, attr).

[0082] The type of the property whose name is Shortname may be String, the configurable number of the property is 1, and the property may be used to identify the name of a policy configuration item. For example, the name of a policy configuration item for CPU may be CPU Strategy Config.

[0083] The type of the property whose property name is CpuId may be a non-negative integer, the number of configurable properties may be 1, the property may be used to identify the processor to which the processor core belongs (corresponding to the processor in the machine parameter), and the value range of the property may be 0 or greater.

[0084] The type of the property whose property name is CoreId may be a non-negative integer, the number of configurable properties may be 1, the property may be used to identify a processor core (corresponding to the Processor Core in the machine parameter), and the value range of the property may be 0 or greater.

[0085] The type of the property whose property name is Method may be an enumeration type, the number of configurable properties may be 1, the property may be used to indicate a resource management scheme, and the value of the property may be to reduce or close the operating frequency.

[0086] The type of the property whose property name is Threshold may be a non-negative integer, the number of configurable properties may be 0 or 1, the property may be used to indicate a lower threshold that the utilization must reach when resource management is initiated, and the value range of the property may be [0,100]. That is, when the utilization of the processor core is greater than the value of the property whose property name is Threshold, the service layer may adjust the operating status of the processor core based on the resource management method indicated by the property whose property name is Method.

[0087] The number of configurable properties in Table 1 indicates whether a policy configuration item must include the property. If the number of configurable properties is 1, the policy configuration item must include the property. If the number of configurable properties is 0 or 1, the policy configuration item may or may not include the property. For example, a property with the property name Threshold may not be included in the policy configuration item for the processor core shown in Table 1.

[0088] [Table 1]

[0089] After the configuration tool generates the configuration file based on the metamodel, in a policy configuration item of a processor core in the configuration file, it can be understood that the identifier of the processor core includes a value of a property whose property name is CpuId and a value of a property whose property name is CoreId. The first property is a value of a property whose property name is Method, and the second property is a value of a property whose property name is Threshold. It can be further understood that for policy configuration items of hardware resources such as ECUs and MCUs in the hardware layer, refer to Table 1.

[0090] For the peripheral device of the hardware layer, a new policy configuration item to be added to the metamodel may be shown in Table 2. See Table 2. It can be seen that the policy configuration item may also include multiple properties. The type of the property whose property name is Shortname may be a string, the number of configurable properties is 1, and the property may be used to identify the name of the policy configuration item. For example, the name may be Device Power Config.

[0091] The type of the property whose property name is DeviceID may be a non-negative integer, the number of configurable properties is 1, and the property may be used to identify the identifier of the peripheral device for which resource management needs to be performed.

[0092] The type of the property whose property name is Method may be an enumeration type, the number of configurable properties is 1, and the property may be used to indicate a resource management method. For example, the value of the property may be to reduce or disable the operating frequency.

[0093] [Table 2]

[0094] In this embodiment of the present application, if the configuration file includes a resource configuration item of a hardware resource, the target service module may manage the hardware resource based on the device status in the operation process of the embedded device. For example, assuming that the configuration file includes a resource configuration item of a laser radar and the value of the property with the property name Method in the resource configuration item is disabled, the target service module may turn off the power of the laser radar in the parking state. If the configuration file includes a resource configuration item of a front camera and the value of the property with the property name Method in the resource configuration item is disabled, the target service module may turn off the power of the front camera when reversing.

[0095] It may be further understood that a series of steps of the aforementioned parameter configuration method provided in this embodiment of the present application may be appropriately adjusted, or steps may be appropriately added or deleted based on a situation. For example, step 101 may be deleted based on a situation. Alternatively, step 1071 may be deleted based on a situation, i.e., when detecting that a state switch occurs in the embedded device, the service layer may directly adjust the operation status of the hardware resource based on the resource management policy without determining whether the state switch meets the adjustment condition. Alternatively, step 1072 may be deleted based on a situation, i.e., the policy configuration item may not include the second property. Correspondingly, the service layer does not need to determine whether the operation status of the target hardware resource meets the activation condition, but can directly adjust the operation status of the target hardware resource based on the resource management scheme indicated by the first property.

[0096] The following uses an example in which the EM module of the service layer is the target service module to describe a parameter configuration method provided in an embodiment of the present application, see Figure 8A and Figure 8B. The method may include the following steps:

[0097] Step 201: The configuration file is read.

[0098] In this embodiment of the present application, after being started, the EM module may first read the configuration file stored in the hardware layer. Then, the EM module may perform the following steps 202, 203, and 204.

[0099] Step 202: Start other service modules in the service layer according to the configuration file, and start applications in the application layer.

[0100] Based on the configuration parameters in the configuration file, the EM may launch other service modules (eg, the CM module and the SM module) in the service layer and launch applications in the application layer.

[0101] Step 203: Enable the command listening function.

[0102] The EM module may enable the command listening function based on the configuration file and perform step 205 .

[0103] Step 204: The status listening function is enabled.

[0104] In this embodiment of the present application, the EM module may further enable the status listening function based on the configuration file and perform step 209 .

[0105] Step 205: Detect whether a command has been received.

[0106] After enabling the command listening function, the EM module can detect in real time whether a command sent by another device (e.g., a configuration tool) is received. If the EM module receives a command, step 206 can be performed. If the EM module does not receive a command, step 205 can be continued, i.e., detect whether a command is received.

[0107] Step 206: Parse the instruction type.

[0108] After receiving the command, the EM module may parse the command to determine the command type of the command.

[0109] Step 207: If the instruction is a configuration instruction, obtain hardware resource parameters.

[0110] If the EM module determines that the instruction is a configuration instruction delivered by a configuration tool and used to instruct the system to obtain hardware resource parameters, the EM module may obtain the hardware resource parameters of the hardware resources included in the hardware layer in accordance with the configuration instruction.

[0111] Step 208: Send the hardware resource parameters to a configuration tool.

[0112] After obtaining the hardware resource parameters, the EM module may send the hardware resource parameters to the configuration tool via the communication interface.

[0113] Step 209: Detect whether a state switch has occurred.

[0114] After enabling the status listening function in step 204, the EM module may monitor the status of the embedded device in real time and determine whether the state of the embedded device has been switched. If the EM module determines that the state of the embedded device has been switched, step 210 may be performed. If the EM module determines that the state of the embedded device has not been switched, the EM module may continue to perform step 209, i.e., continue to monitor the status of the embedded device.

[0115] For example, upon detecting that a new process has been started or a process has been restarted, the EM module may determine that a state switch has occurred in the embedded device.

[0116] Step 210: Determine whether the state switch satisfies a hardware resource adjustment condition.

[0117] After determining that the state of the embedded device is switched, the EM module may further continue to determine whether the state switch satisfies a hardware resource adjustment condition, i.e., whether the state switch affects hardware resource scheduling. If the EM module determines that the state switch satisfies the hardware resource adjustment condition, step 211 may be performed. If the EM module determines that the state switch does not satisfy the hardware resource adjustment condition, step 209 may be continued. For the implementation process of step 210, please refer to step 1071. Details will not be described again here.

[0118] Step 211: Determine whether the operating status of a hardware resource needs to be adjusted based on the resource management policy in the configuration file.

[0119] If the EM module determines that the state switching affects the hardware resource scheduling, the EM module may determine whether the operation status of the hardware resource needs to be adjusted according to a second property in the resource management policy. If the EM module determines that the operation status of the hardware resource needs to be adjusted, step 212 may be performed. If the EM module determines that the operation status of the hardware resource does not need to be adjusted, step 209 may continue to be performed. For the implementation process of step 211, please refer to step 1072. Details will not be described again here.

[0120] Step 212: Adjust the operation status of the hardware resources included in the hardware layer.

[0121] If the EM module determines that the operation status of the hardware resource needs to be adjusted, the EM module may adjust the operation status of the hardware resource included in the hardware layer in a resource management manner indicated by the first property in the resource management policy. For the implementation process of step 212, please refer to step 1073. Details will not be described again here.

[0122] For example, the service layer may adjust the operating status of a processor based on resource management policies in a configuration file to achieve the following effects:

[0123] 1. When a process (e.g., an autonomous driving process) running on a processor core is detected to be in a zombie state, the processor core is disabled or the frequency of the processor core is reduced.

[0124] 2. When it is detected that the CPU utilization of a processor core is below a threshold or that the processor core is not executing a task, the processor core is disabled or the frequency of the processor core is reduced.

[0125] 3. When it is detected that the overall CPU utilization of the processor is lower than a threshold, some processor cores are disabled or the frequency of some processor cores is reduced. The processor cores whose frequencies are disabled or reduced may be high-performance processor cores in the CPU.

[0126] 4. When it is detected that the resource consumption of the tasks currently being executed by the embedded device is relatively low, for example when it is detected that the embedded device is executing an upgrade task or an automatic parking task, or when it is detected that the autonomous driving mode is not on, some processor cores may be disabled or the frequency of some processor cores may be reduced.

[0127] Based on the above example, it can be known that in the method provided in this embodiment of the present application, the CPU can be flexibly scheduled according to the status of the embedded device in the operation process of the embedded device. In other words, the method provided in this embodiment of the present application can implement CPU hot plug.

[0128] In conclusion, this embodiment of the present application provides a parameter configuration method. The service layer of the embedded device can directly obtain the hardware resource parameters of the hardware layer and send the hardware resource parameters to the AUTOSAR development tool. The developer does not need to manually input the hardware resource parameters into the development tool. Therefore, the parameter configuration efficiency can be effectively improved, and the application development efficiency can be further improved.

[0129] In addition, the service layer may further adjust the operating status of the hardware resources based on the resource management policy in the configuration file, so that flexible scheduling of the hardware resources can be implemented, which can ensure that the power consumption of the embedded device is effectively reduced without affecting the proper operation of the embedded device.

[0130] An embodiment of the present application further provides an embedded device. The embedded device may be applied to a vehicle, for example, an intelligent vehicle, a connected vehicle, or a new energy vehicle. The embedded device may use AUTOSAR, for example, the AUTOSAR AP architecture or the AUTOSAR CP architecture. As shown in FIG. 1, the embedded device may include a hardware layer 01, a service layer 03, and an application layer 04. As shown in FIG. 4 and FIG. 9, the service layer 03 may include: A resource management module 032 configured to obtain hardware resource parameters of the hardware layer (for the implementation of the functions of the resource management module 032, please refer to the relevant descriptions of step 102 and step 207 of the above method embodiment); A communication interface 031 (for the implementation of the functions of the communication interface 031, please refer to the relevant descriptions of step 103 and step 208 of the aforementioned method embodiment) configured to send hardware resource parameters to an AUTOSAR development tool, the hardware resource parameters being used by the AUTOSAR development tool to generate executable files and configuration files, and the executable files and configuration files can be stored in the hardware layer of the embedded device; an operating module 033 configured to operate the executable file based on the configuration file (for the implementation of the function of the operating module 033, please refer to the relevant description of step 106 of the above method embodiment); Includes.

[0131] Optionally, the configuration file includes a resource management policy. The resource management module 032 can be further configured to adjust the operation status of the hardware resource included in the hardware layer according to the resource management policy. For the implementation of the function of the resource management module 032, please refer to the relevant description of step 107 and step 212 of the above method embodiment.

[0132] Optionally, the resource management policy includes an identifier of the target hardware resource and a first property, the first property indicating a resource management scheme of the target hardware resource. The resource management module 032 may be configured to adjust an operation status of the target hardware resource indicated by the identifier based on the resource management scheme indicated by the first property.

[0133] For the implementation of the functions of the resource management module 032, please refer to the relevant description of step 1073 in the above method embodiment.

[0134] Optionally, the resource management policy further includes a second property, the second property indicating a startup condition for managing the target hardware resource. The resource management module 032 may be configured to adjust the operation status of the target hardware resource based on the resource management scheme indicated by the first property when the resource management module determines that the operation status of the target hardware resource indicated by the identifier satisfies the startup condition indicated by the second property.

[0135] For the implementation of the functions of the resource management module 032, please refer to the relevant description of step 1072 in the above method embodiment.

[0136] Optionally, the resource management scheme includes disabling the target hardware resource or reducing the operating frequency of the target hardware resource.

[0137] Optionally, the resource management module 032 may be configured to adjust the operational status of the hardware resource based on the resource management policy when the resource management module detects that a state switch occurs in the embedded device and the state switch satisfies a hardware resource adjustment condition.

[0138] For the implementation of the functions of the resource management module 032, please refer to the relevant descriptions of step 1071, step 209, and step 210 in the above method embodiment.

[0139] Optionally, the resource management module 032 is configured to receive a configuration command sent by an AUTOSAR development tool, and obtain hardware resource parameters of the hardware layer according to the configuration command. For the implementation of the functions of the resource management module 032, please refer to the relevant descriptions of step 102 and steps 205 to 207 of the above method embodiment.

[0140] Optionally, the hardware resource parameters obtained by the resource management module 032 may include machine parameters and system parameters.

[0141] In conclusion, this embodiment of the present application provides an embedded device. The service layer of the embedded device can directly obtain hardware resource parameters of the hardware layer and send the hardware resource parameters to an AUTOSAR development tool. Developers do not need to manually input the hardware resource parameters into the development tool. Therefore, the parameter configuration efficiency can be effectively improved, and the application development efficiency can be further improved.

[0142] In addition, the service layer may further adjust the operating status of the hardware resources based on the resource management policy in the configuration file, so that flexible scheduling of the hardware resources can be implemented, which can ensure that the power consumption of the embedded device is effectively reduced without affecting the proper operation of the embedded device.

[0143] For the sake of convenience, those skilled in the art can clearly understand that the detailed operation processes of the embedded devices and modules may refer to the corresponding processes in the above method embodiments, and the details will not be described again here.

[0144] It should be understood that the embedded device provided in this embodiment of the present application may be implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. Alternatively, the parameter configuration method provided in the aforementioned method embodiment may be implemented using software. When the parameter configuration method provided in the aforementioned method embodiment is implemented using software, the modules in the embedded device may instead be software modules.

[0145] Figure 10 is a schematic diagram of the structure of an embedded device according to an embodiment of the present application. As shown in Figure 10, the embedded device may include a processor 1001, a memory 1002, a network interface 1003, and a bus 1004. The bus 1004 is configured to connect the processor 1001, the memory 1002, and the network interface 1003. The communication connection to other devices may be implemented using the network interface 1003 (which may be wired or wireless). The memory 1002 stores a computer program 10021, which is used to implement various application functions.

[0146] It should be understood that in this embodiment of the application, the processor 1001 may be a CPU, or the processor 1001 may be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), GPUs, or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.

[0147] The memory 1002 may be volatile or nonvolatile memory, or may include both volatile and nonvolatile memory. Nonvolatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may be random access memory (RAM) used as an external cache. By way of example and not limitation, many forms of RAM may be used, such as static random access memory (static RAM, SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchlink dynamic random access memory (synchlink DRAM, SLDRAM), and direct rambus random access memory (direct rambus RAM, DR RAM).

[0148] In addition to a data bus, the bus 1004 may further include a power bus, a control bus, a status signal bus, etc. However, for clarity of illustration, various types of buses are illustrated as the bus 1004 in the figures.

[0149] The processor 1001 is configured to execute a computer program stored in the memory 1002, and the processor 1001 executes the computer program 10021 to perform steps in the aforementioned method embodiments.

[0150] An embodiment of the present application further provides a computer-readable storage medium, which stores instructions, which are executed by a processor to perform the steps in the aforementioned method embodiments.

[0151] An embodiment of the present application further provides a computer program product comprising instructions, which when run on a computer, enable the computer to perform the steps in the aforementioned method embodiments.

[0152] It should be understood that "and / or" referred to in the embodiments of the present application indicates that three relationships may exist. For example, A and / or B may indicate that only A is present, that both A and B are present, and that only B is present. The symbol " / " generally indicates an "or" relationship between associated objects.

[0153] The term "at least one" as used herein means one or more, and the term "plurality" as used herein means two or more than two. For example, "a plurality of properties" means two or more than two properties.

[0154] All or part of the above-mentioned embodiments may be implemented using software, hardware, firmware, or any combination thereof. When software is used in the implementation, all or part of the above-mentioned embodiments may be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded or executed on a computer, all or part of the process or function according to the embodiments of the present application is generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center in a wired (e.g., coaxial cable, optical fiber, or digital subscriber line (DSL)) or wireless (e.g., infrared, radio, or microwave) manner. The computer-readable storage medium may be any available medium accessible by a computer, or a data storage device, such as a server or data center, incorporating one or more available media. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, or a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium may be a solid state drive (SSD).

[0155] The above description is merely an optional embodiment of the present application, and the protection scope of the present application is not limited thereto. Any equivalent modifications or replacements that are easily conceived by those skilled in the art within the technical scope disclosed in the present application shall be within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims. [Explanation of symbols]

[0156] 01 Hardware Layer 001 Embedded Devices 02 OS interface 002 Embedded devices, AUTOSAR development tools 0021 Configuration Tool 0022 Generation Tool 03 Service Layer 031 Communication Interface 032 Resource Management Module 032a Analysis submodule 032b Management submodule 033 Operation Module 04 Application Layer 1001 Processor 1002 Memory 1003 Network Interface 1004 Bus 10021 Computer Programs

Claims

1. 1. A parameter configuration method applied to an embedded device using Automotive Open System Architecture (AUTOSAR), the embedded device including a hardware layer, a service layer, and an application layer, the method comprising: obtaining, by the service layer, hardware resource parameters of the hardware layer; sending, by the service layer, the hardware resource parameters to an AUTOSAR development tool, which uses the hardware resource parameters to generate executable files and configuration files, which are stored in the hardware layer; operating, by the service layer, the executable file based on the configuration file; A method for configuring parameters.

2. The configuration file includes a resource management policy, and the method further comprises: adjusting, by the service layer, the operation status of the hardware resources included in the hardware layer based on the resource management policy; The method of claim 1, further comprising:

3. The resource management policy includes an identifier of a target hardware resource and a first property, the first property indicating a resource management scheme of the target hardware resource; The step of adjusting the operation status of the hardware resources included in the hardware layer based on the resource management policy by the service layer includes: adjusting, by the service layer, an operational status of the target hardware resource indicated by the identifier based on the resource management scheme indicated by the first property.

3. The method of claim 2, comprising:

4. The resource management policy further includes a second property, the second property indicating a launch condition for managing the target hardware resource; adjusting, by the service layer, the operational status of the target hardware resource indicated by the identifier based on the resource management scheme indicated by the first property, adjusting, by the service layer, the operational status of the target hardware resource indicated by the identifier based on the resource management scheme indicated by the first property if the operational status of the target hardware resource indicated by the identifier satisfies the activation condition indicated by the second property.

4. The method of claim 3, comprising:

5. The method according to claim 3 or 4, wherein the resource management scheme comprises disabling the target hardware resource or reducing an operating frequency of the target hardware resource.

6. The step of adjusting the operation status of the hardware resources included in the hardware layer based on the resource management policy by the service layer includes: adjusting, by the service layer, the operation status of the hardware resource based on the resource management policy when a state transition occurs in the embedded device and the state transition satisfies a hardware resource adjustment condition.

6. The method according to any one of claims 2 to 5, comprising:

7. The step of obtaining hardware resource parameters of the hardware layer by the service layer includes: receiving, by the service layer, a configuration command sent by the AUTOSAR development tool; obtaining, by the service layer, the hardware resource parameters of the hardware layer according to the configuration command; 7. The method of claim 1 , comprising:

8. The method according to claim 1 , wherein the hardware resource parameters include machine parameters and system parameters.

9. An embedded device, the embedded device using Automotive Open Systems Architecture (AUTOSAR), the embedded device including a hardware layer, a service layer, and an application layer, the service layer comprising: a resource management module configured to obtain hardware resource parameters of the hardware layer; a communication interface configured to transmit the hardware resource parameters to an AUTOSAR development tool, the hardware resource parameters being used by the AUTOSAR development tool to generate executable files and configuration files, the executable files and the configuration files being stored in the hardware layer; an operation module configured to operate the executable file based on the configuration file; Embedded devices, including

10. The configuration file includes a resource management policy, and the resource management module comprises: Adjusting the operational status of the hardware resources included in the hardware layer based on the resource management policy. The device of claim 9, further configured to:

11. The resource management policy includes an identifier of a target hardware resource and a first property, the first property indicating a resource management scheme of the target hardware resource; The resource management module includes: adjusting an operational status of the target hardware resource indicated by the identifier based on the resource management scheme indicated by the first property The device of claim 10 configured to:

12. The resource management policy further includes a second property, the second property indicating a launch condition for managing the target hardware resource; The resource management module includes: If the operational status of the target hardware resource indicated by the identifier satisfies the activation condition indicated by the second property, adjust the operational status of the target hardware resource based on the resource management scheme indicated by the first property. The device of claim 11 configured to:

13. 13. The device of claim 11 or 12, wherein the resource management scheme comprises disabling the target hardware resource or reducing an operating frequency of the target hardware resource.

14. The resource management module includes: If a state change occurs in the embedded device and the state change satisfies a hardware resource adjustment condition, the operating status of the hardware resource is adjusted based on the resource management policy.

14. A device according to any one of claims 10 to 13, configured to:

15. The resource management module includes: receiving a configuration command sent by the AUTOSAR development tool; Obtain the hardware resource parameters of the hardware layer according to the configuration command 15. A device as claimed in any one of claims 9 to 14, configured to:

16. The device of claim 9 , wherein the hardware resource parameters include machine parameters and system parameters.

17. An embedded device, the embedded device using the Automotive Open Systems Architecture AUTOSAR, the embedded device including a memory and a processor; the memory is configured to store a computer program; The processor is configured to execute the computer program stored in the memory to enable the embedded device to perform the method according to any one of claims 1 to 8. Embedded devices.

18. A parameter configuration system, the system comprising an Automotive Open Systems Architecture (AUTOSAR) development tool and an embedded device according to any one of claims 9 to 17, The AUTOSAR development tool is configured to generate executable files and configuration files based on hardware resource parameters transmitted by a service layer of the embedded device. Parameter configuration system.

19. 9. A computer-readable storage medium having instructions stored thereon, the instructions being executable by a processor to perform the method of any one of claims 1 to 8.

20. A chip, the chip comprising programmable logic circuitry and / or program instructions, such that when operated the chip is configured to perform the method of any one of claims 1 to 8.

Citation Information

Patent Citations

  • Data management program and data management device

    JP2018018199A

  • File format converter and conversion method thereof

    JP2018036972A

  • Semiconductor device and information processing method

    JP2019213081A

  • Semiconductor device and information processing method

    US20190379556A1