Parameter configuration method, apparatus and system

By automatically acquiring and sending hardware resource parameters through the service layer of embedded devices, the problem of low efficiency in manual configuration during AUTOSAR development is solved, configuration efficiency is improved and the probability of errors is reduced, while flexible scheduling of hardware resources and power consumption optimization are achieved.

CN114564179BActive Publication Date: 2025-12-12YINWANG INTELLIGENT TECHNOLOGIES CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202011364749.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-27
Publication Date
2025-12-12
Estimated Expiration
2040-11-27

AI Technical Summary

Technical Problem

When developing applications based on AUTOSAR, users need to manually input hardware resource parameters, which leads to low efficiency in parameter configuration.

Method used

The service layer of the embedded device directly obtains the hardware resource parameters of the hardware layer and sends them to the AUTOSAR development tool to generate configuration files and executable files, avoiding manual input. The service layer also adjusts the running status of hardware resources based on resource management strategies.

Benefits of technology

It improves parameter configuration efficiency, reduces the probability of configuration errors, and reduces power consumption without affecting the normal operation of the device, thus enabling flexible scheduling of hardware resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114564179B_ABST
    Figure CN114564179B_ABST
Patent Text Reader

Abstract

The application provides a parameter configuration method, device and system, and belongs to the field of intelligent automobiles. In the scheme provided by the application, 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, so that the AUTOSAR development tool generates configuration files and executable files. Since the developer does not need to manually input the hardware resource parameters in the development tool, the parameter configuration efficiency can be effectively improved, the probability of parameter configuration errors can be reduced, and the development efficiency of the application can be improved. The embedded device can be applied to intelligent automobiles, network-connected automobiles or new energy automobiles.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of intelligent vehicles, and in particular, to a parameter configuration method, device and system. BACKGROUND

[0002] Automotive open system architecture (AUTOSAR) is an open and standardized software architecture developed for the automotive industry.

[0003] When developing an application based on AUTOSAR, a user can remotely connect a device through a remote terminal (Telnet) or a secure shell (ssh) protocol, and determine the hardware form of the device by inputting a command line. Alternatively, the user can determine the hardware form of the device by referring to a hardware manual. Then, the user can manually input hardware resource parameters in a configuration tool of AUTOSAR according to the hardware form. The configuration tool can generate a description file based on the hardware configuration parameters input by the user, and a generation tool of AUTOSAR can further generate a configuration file and an executable file based on the description file.

[0004] However, in the above development process, since the user needs to manually input the hardware resource parameters, the parameter configuration efficiency is low. SUMMARY

[0005] The present application provides a parameter configuration method, device and system, which can solve the problem of low parameter configuration efficiency caused by manual parameter configuration.

[0006] In one aspect, a parameter configuration method is provided, which is 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 acquires hardware resource parameters of the hardware layer, and sends the hardware resource parameters to an AUTOSAR development tool. The hardware resource parameters are used for the AUTOSAR development tool to generate an executable file and a configuration file. The executable file and the configuration file can be stored in the hardware layer. Then, the service layer can run the executable file based on the configuration file.

[0007] Since the service layer can directly acquire 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 in the development tool, thereby effectively improving the parameter configuration efficiency and reducing the probability of parameter configuration errors.

[0008] Optionally, the configuration file comprises a resource management policy; the method can further comprise: adjusting, by the service layer, a running state of a hardware resource comprised in the hardware layer based on the resource management policy.

[0009] The service layer can achieve flexible scheduling of the hardware resource based on the resource management policy in the configuration file.

[0010] Optionally, the resource management policy can comprise: an identification of a target hardware resource and a first attribute, the first attribute being used to indicate a resource management manner for the target hardware resource; the process of adjusting, by the service layer, the running state of the hardware resource comprised in the hardware layer based on the resource management policy can comprise: adjusting, by the service layer, the running state of the target hardware resource indicated by the identification according to the resource management manner indicated by the first attribute.

[0011] Different hardware resources can be configured with different resource management manners in the resource management policy, so that the service layer can adjust the running state of different hardware resources based on the resource management policy.

[0012] Optionally, the resource management policy can further comprise: a second attribute; the second attribute being used to indicate a starting condition for resource management of the target hardware resource; the process of adjusting, by the service layer, the running state of the target hardware resource indicated by the identification according to the resource management manner indicated by the first attribute can comprise: adjusting, by the service layer, the running state of the target hardware resource according to the resource management manner indicated by the first attribute if it is determined that the running state of the target hardware resource indicated by the identification meets the starting condition indicated by the second attribute.

[0013] That is, the service layer can adjust the running state of the target hardware resource after determining that the running state of the target hardware resource meets the starting condition. If the service layer determines that the running state of the target hardware resource does not meet the starting condition, the running state of the target hardware resource does not need to be adjusted. Thus, it can be avoided that the running state of the hardware resource is misadjusted to affect the performance of the embedded device, and the reliability of resource scheduling is ensured.

[0014] Optionally, the resource management manner comprises: shutting down the target hardware resource, or reducing a working frequency of the target hardware resource.

[0015] The service layer can effectively reduce the power consumption of the embedded device by shutting down the target hardware resource or reducing the working frequency of the target hardware resource.

[0016] Optionally, the process in which the service layer adjusts the running state of the hardware resource included in the hardware layer based on the resource management policy can comprise: if the service layer detects that the embedded device has a state switching, and the state switching meets the adjustment condition of the hardware resource, the service layer adjusts the running state of the hardware resource based on the resource management policy.

[0017] The adjustment condition can be pre-configured in the service layer or can be carried in the configuration file. By adjusting the running state of the hardware resource when the state switching meets the adjustment condition, the situation that the running state of the hardware resource is frequently adjusted to cause the state of the embedded device to be unstable can be avoided.

[0018] Optionally, the process in which the service layer obtains the hardware resource parameter of the hardware layer can comprise: the service layer receives a configuration command sent by the AUTOSAR development tool; and the service layer obtains the hardware resource parameter of the hardware layer based on the configuration command.

[0019] Optionally, the hardware resource parameter can comprise machine parameters and system parameters. The machine parameters can at least comprise related parameters of a processor, related parameters of a memory, and related parameters of a hard disk. The system parameters can comprise network parameters, such as related parameters of a network card.

[0020] On the other hand, an embedded device is provided, which adopts AUTOSAR, and comprises a hardware layer, a service layer, and an application layer. The service layer can comprise a communication interface and at least one module, which can be used to implement the parameter configuration method provided in the above aspect.

[0021] On the other hand, an embedded device is provided, which adopts AUTOSAR, and comprises a hardware layer, a service layer, and an application layer. The service layer can comprise a communication interface and at least one module, which can be used to implement the parameter configuration method provided in the above aspect.

[0022] On the other hand, an embedded device is provided, which adopts AUTOSAR, and comprises a hardware layer, a service layer, and an application layer. The service layer can comprise a communication interface and at least one module, which can be used to implement the parameter configuration method provided in the above aspect.

[0023] On the other hand, an embedded device is provided, which adopts AUTOSAR, and comprises a hardware layer, a service layer, and an application layer. The service layer can comprise a communication interface and at least one module, which can be used to implement the parameter configuration method provided in the above aspect.

[0024] In still another aspect, a computer program product containing instructions, which, when the computer program product is executed on a computer, cause the computer to perform the parameter configuration method provided in the above aspect, is provided.

[0025] In still another aspect, a chip is provided, which comprises programmable logic circuit and / or program instructions, and is used to implement the parameter configuration method provided in the above aspect when the chip is executed.

[0026] The technical solutions provided in the present application have at least the following beneficial effects:

[0027] The present application provides a parameter configuration method, device and system. 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, so that the AUTOSAR development tool generates configuration files and executable files. Since the developer does not need to manually input the hardware resource parameters in the development tool, the parameter configuration efficiency can be effectively improved, the probability of parameter configuration error can be reduced, and the development efficiency of the application can be improved. BRIEF DESCRIPTION OF DRAWINGS

[0028] Figure 1 is an architecture diagram of an AUTOSAR AP provided by an embodiment of the present application;

[0029] Figure 2 is a schematic diagram of an application scenario of a parameter configuration method provided by an embodiment of the present application;

[0030] Figure 3 is a flowchart of a parameter configuration method provided by an embodiment of the present application;

[0031] Figure 4 is a structural schematic diagram of a target service module in a service layer provided by an embodiment of the present application;

[0032] Figure 5 is a schematic diagram of a configuration interface of a configuration tool provided by an embodiment of the present application;

[0033] Figure 6 is a schematic diagram of a configuration interface of another configuration tool provided by an embodiment of the present application;

[0034] Figure 7 is a flowchart of a method for adjusting the running state of a hardware resource provided by an embodiment of the present application;

[0035] Figure 8 is a flowchart of another parameter configuration method provided by an embodiment of the present application;

[0036] Figure 9 is a structural schematic diagram of a service layer provided by an embodiment of the present application;

[0037] Figure 10 is a structural schematic diagram of an embedded device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0038] The parameter configuration method, device and system provided by the embodiment of the present application are described in detail below with reference to the drawings.

[0039] The basic software (BSW) layer in the AUTOSAR layered software architecture can be applied to vehicles produced by different manufacturers and electronic components provided by different suppliers, thereby reducing the development cost and being able to adapt to the increasingly complex automobile electrical and software architecture. AUTOSAR mainly includes two different types of platforms:

[0040] 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 the AUTOSAR CP includes an application layer, a runtime environment (RTE) layer and a BSW layer running on a microcontroller. The application layer is basically independent of hardware, the software components of the application layer communicate through the RTE layer, and the software components access the BSW also need to pass through the RTE.

[0041] 2. AUTOSAR adaptive platform (AP). AUTOSAR AP can use two types of interfaces: services and application programming interfaces (APIs). The AUTOSAR AP is composed of a functional cluster distributed in the service layer and an AUTOSAR AP base.

[0042] Figure 1 is an architecture diagram of an AUTOSAR AP provided by an embodiment of the present application, as Figure 1As shown, the architecture of the AUTOSAR AP can include: a hardware layer 01, an operating system (OS) interface 02, a service layer 03, and an application layer 04. The OS interface 02 can be a portable operating system interface (POSIX). The service layer 03 can include a plurality of middlewares, which can also be referred to as service modules.

[0043] For example, with reference to Figure 1 The service layer 03 can 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 cryptography module, a state management (SM) module, a network management (NM) module, and an update and configuration management module, etc. The RESTful is a development method based on representational state transfer (REST).

[0044] With the advent of intelligent and electrification of automobiles, the electronic computing power of automobiles is getting higher and higher, the memory is getting larger and larger, and the electronic and electrical structure is getting more and more complex. As a result, the configuration item of AUTOSAR is large in scale, complex in structure, and high in learning threshold. For example, with the complication of the hardware structure of the device, the number of hardware resource parameters that need to be manually input by the user increases, which leads to errors in the parameter configuration process and low configuration efficiency.

[0045] The embodiment of the present application provides a parameter configuration method, which can solve the problem of low hardware resource parameter configuration efficiency. Figure 2 is a schematic diagram of an application scenario of a parameter configuration method provided by the embodiment of the present application. AsFigure 2 As shown, this application scenario may include an embedded device 001 employing 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 used to generate a description file based on the obtained configuration parameters (including hardware resource parameters and functional configuration parameters). The generation tool 0022 is used to generate a configuration file and an executable (executable, .exe) file based on the description file. For example, the generation tool 0022 can generate a code file based on the description file, and then compile the code file to obtain an executable file.

[0046] The description file can be in AUTOSAR extensible markup language (arxml) format. The configuration file can be in JavaScript object notation (JSON) format.

[0047] Figure 3 This is a flowchart of a parameter configuration method provided in an embodiment of this application. This method can be applied to, for example... Figure 2 In the application scenarios shown. For example, this Figure 2 The embedded device 002 shown can use an AUTOSAR AP, and as Figure 1 As shown, the embedded device 002 may include a hardware layer 01, a service layer 03, and an application layer 04. (Reference) Figure 2 The method includes:

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

[0049] In this embodiment, when a configuration tool needs to obtain hardware resource parameters of the hardware layer in an embedded device to generate a description file, the configuration tool can send a configuration instruction to the service layer. This configuration instruction instructs the service layer to obtain the hardware resource parameters of the hardware layer.

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

[0051] Figure 4 This is a schematic diagram of the structure of a target service module in a service layer provided in an embodiment of this application. For example... Figure 4As shown, the target service module can include a communication interface 031 and a resource management module 032. The communication interface 031 is configured to communicate with the configuration tool. Accordingly, the configuration tool can send the configuration instruction to the communication interface 031 of the target service module in the service layer. The resource management module 032 includes a parsing sub-module 032a and a management sub-module 032b. The parsing sub-module 032a is configured to parse and obtain the hardware resource parameters of the hardware layer, and the management sub-module 032b is configured to schedule and manage the hardware resources included in the hardware layer.

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

[0053] In step 102, the service layer obtains the hardware resource parameters of the hardware layer based on the configuration instruction.

[0054] After the service layer of the embedded device receives the configuration instruction, the hardware resource parameters of the hardware layer can be obtained in response to the configuration instruction. In the embodiments of the present application, the hardware resource parameters can include machine parameters and system parameters. The machine parameters can at least include related parameters of a processor, related parameters of a memory, and related parameters of a hard disk. The system parameters can include network parameters, for example, can include related parameters of a network card. The processor can include a central processing unit (CPU), etc., and the processor can include multiple processor cores.

[0055] Optionally, in addition to the machine parameters and the system parameters, the hardware resource parameters can also include other types of parameters, which can include related parameters of an electronic control unit (ECU), related parameters of a micro-controller unit (MCU), and related parameters of peripherals (such as sensors such as cameras and laser radars).

[0056] Reference Figure 4After receiving the configuration command, the communication interface 031 of the target service module in this service layer can send the configuration command to the resource management module 032. The parsing submodule 032a in the resource management module 032 can then respond to the configuration command and obtain the hardware resource parameters of the hardware layer.

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

[0058] Once the service layer obtains the hardware resource parameters, it can send these parameters to the configuration tool within the AUTOSAR development tool. These hardware resource parameters are used by the configuration tool to generate a description file, which in turn allows the generation tool to generate an executable file and configuration files based on this description file.

[0059] Example, reference Figure 4 The target service module in this service layer can send the obtained hardware resource parameters to the configuration tool through communication interface 031.

[0060] Figure 5 This is a schematic diagram of the configuration interface of a configuration tool provided in an embodiment of this application, as shown below. Figure 5 As shown, the machine parameters received by the configuration tool from the service layer may include CPU-related parameters, which may include parameters for each core of the CPU. For example, refer to... Figure 5 The relevant parameters of this CPU can include the parameters of cores 0 to 3 in CPU0, and the parameters of cores 0 and 1 in CPU1. Among them, the parameters of each core can include the following attributes: category, checksum, core ID, short name, timestamp, and universally unique identifier (UUID).

[0061] Figure 6 This is a schematic diagram of the configuration interface of another configuration tool provided in this application embodiment, such as... Figure 6 As shown, the system parameters received by this configuration tool from the service layer may include Ethernet-related parameters. (Reference) Figure 6The related parameters of the Ethernet can include at least one of the following properties: baud rate, checksum, coupling port switch off delay, protocol name, protocol version, speed, and timestamp.

[0062] The related parameters of the Ethernet can further include configuration parameters of Internet protocol version 4 (IPv4), which can 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). 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 means dynamic host configuration protocol (DHCP) used to configure the IP address required by the IPv4 host.

[0063] In step 104, the configuration tool generates a description file based on the hardware resource parameters.

[0064] In the embodiments of the present application, the AUTOSAR meta model is preconfigured in the configuration tool. After receiving the hardware resource parameters sent by the service layer, the configuration tool can generate an AUTOSAR model based on the hardware resource parameters and the meta model. This process can also be referred to as mapping the hardware resource parameters into the AUTOSAR model. Then, the AUTOSAR model is exported from the memory of the configuration tool to the hard disk of the configuration tool, and the description file is obtained. The description file can be an.arxml format file.

[0065] The AUTOSAR meta-model is a unified modeling language (UML) model of a language used to define descriptions of AUTOSAR systems, which is a graphical representation of a template (the template defines structures such as software components and ECUs to create an AUTOSAR software and hardware system). The AUTOSAR model is an instance of the AUTOSAR meta-model.

[0066] In step 105, the generation tool generates an executable file and a configuration file based on the description file.

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

[0068] In step 106, the service layer runs the executable file based on the configuration file.

[0069] In the embodiment of the present application, the service layer can read the configuration file in the hardware layer and run the executable file based on the configuration file.

[0070] In step 107, the service layer adjusts the running state of the hardware resource included in the hardware layer based on the resource management strategy in the configuration file.

[0071] The configuration file can include a resource management strategy, and the service layer can adjust the running state of the hardware resource included in the hardware layer based on the resource management strategy during the running of the embedded device. In this way, flexible scheduling and management of the hardware resource can be achieved, and the power consumption of the embedded device can be effectively reduced without affecting the normal running of the embedded device.

[0072] Optionally, the resource management strategy in the configuration file can include at least one strategy configuration item, and each strategy configuration item is used to indicate a management strategy for a hardware resource in the hardware layer. Taking a target hardware resource in the hardware layer as an example, the strategy configuration item of the target hardware resource can include an identifier of the target hardware resource and a first attribute. The first attribute is used to indicate a resource management mode for the target hardware resource, and the resource management mode can include turning off the target hardware resource or reducing the working frequency of the target hardware resource.

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

[0074] It can be understood that, in the resource management strategy, different hardware resources can be configured with different resource management manners, so that the service layer can adjust the running state of different hardware resources based on the resource management strategy.

[0075] In the embodiment of the present application, the policy configuration item of the target hardware resource can further include a second attribute, which is used to indicate a starting condition for resource management of the target hardware resource. That is, the service layer can adjust the running state of the target hardware resource after determining that the running state of the target hardware resource meets the starting condition. In this way, it can be avoided that the running state of the resource is adjusted by mistake to affect the performance of the embedded device, and the reliability of resource scheduling is ensured.

[0076] Taking the policy configuration item of the target hardware resource as an example, the implementation process of step 107 is introduced. Referring to Figure 7 Step 107 can include the following steps.

[0077] Step 1071, the service layer detects that the embedded device has a state switching, and determines whether the state switching meets the adjustment condition of the hardware resource.

[0078] In the embodiment of the present application, the service layer can monitor the state of the embedded device (which can also be referred to as the state of the machine) in real time during the running of the embedded device. When the service layer detects that the embedded device has a state switching, the service layer can further detect whether the state switching meets the adjustment condition of the hardware resource. If the service layer determines that the state switching meets the adjustment condition of the hardware resource, step 1072 can be performed. If the service layer determines that the state switching does not meet the adjustment condition of the hardware resource, the operation can be ended, that is, the running state of the hardware resource is not adjusted. Moreover, the service layer can continue to monitor the state of the embedded device.

[0079] The adjustment condition can be pre-configured in the service layer or can be carried in the configuration file. For example, the adjustment condition can include one or more of the following conditions: the change amount of the usage rate (for example, CPU occupancy rate) of the hardware resource before and after the state switching is greater than a change amount threshold; the usage rate of the hardware resource after the state switching is less than a usage rate threshold; some processes are in a dead state after the state switching; and the task performed by the embedded device after the state switching is a task with a performance consumption lower than a consumption threshold.

[0080] The method provided by the embodiments of the present application can avoid frequent adjustment of the running state of the hardware resource, thereby avoiding the instability of the state of the embedded device.

[0081] In step 1072, the service layer detects whether the running state of the target hardware resource in the hardware layer meets the start condition indicated by the second attribute.

[0082] The service layer can adjust the running state of the hardware resource included in the hardware layer when detecting that the state of the embedded device changes, i.e., when the state of the embedded device switches. If the resource management policy in the configuration file includes a policy configuration item of the target hardware resource, the service layer can determine the target hardware resource in the hardware layer according to the identifier in the policy configuration item, and detect whether the target hardware resource meets the start condition indicated by the second attribute.

[0083] If the service layer determines that the running state of the target hardware resource meets the start condition indicated by the second attribute, the method can continue to step 1073. If the service layer determines that the running state of the target hardware resource does not meet the start condition indicated by the second attribute, the method can end, i.e., the running state of the target hardware resource is not adjusted. In this way, the performance of the embedded device can be affected by the false adjustment of the running state of the hardware resource, and the reliability of resource scheduling is ensured.

[0084] In step 1073, the service layer adjusts the running state of the target hardware resource according to the resource management mode indicated by the first attribute.

[0085] If the service layer determines that the running state of the target hardware resource meets the start condition indicated by the second attribute, the running state of the target hardware resource can be adjusted according to the resource management mode indicated by the first attribute.

[0086] For example, it is assumed that the target hardware resource is a processor core in the hardware layer, and the resource configuration item of the processor core indicates that the resource management mode indicated by the first attribute is to close the processor core, and the start condition indicated by the second attribute is that the occupancy rate of the processor core is less than 10%. The service layer can close the processor core when detecting that the occupancy rate of the processor core is less than 10%.

[0087] It should be understood that, since the hardware layer can include a plurality of hardware resources, for example, can include processors, memories, network cards, ECUs, MCUs and peripherals, etc., and the processors can further include a plurality of different processor cores. Therefore, the resource management strategy can include a plurality of policy configuration items of different hardware resources. Correspondingly, the service layer can adjust the running state of the corresponding hardware resource based on each policy configuration item, thereby realizing flexible scheduling of the hardware resources in the hardware layer.

[0088] In the embodiments of the present application, for at least one hardware resource (such as a processor, a memory, a network card, an ECU, an MCU and a peripheral, etc.) in the hardware layer, a strategy configuration (strategy config) item for resource management of the hardware resource can be newly added in the meta-model stored by the configuration tool. After the configuration tool generates the configuration file based on the meta-model, the strategy configuration item of the hardware resource can be included in the configuration file.

[0089] For example, taking the processor in the hardware layer as a CPU as an example, for the processor core in the CPU, the newly added strategy configuration item in the meta-model can be as shown in Table 1, and the base type of the strategy configuration item is the AR object class. As can be seen from Table 1, the strategy configuration item includes a plurality of attributes (attribute, attr). Among them, the type of the attribute with the attribute name of Shortname can be a string (String), the configurable number of the attribute is 1, and the attribute can be used to identify the name of the strategy configuration item. For example, the name of the strategy configuration item of the CPU can be CPUStrategy Config.

[0090] The type of the attribute with the attribute name of CpuId can be a non-negative integer, the configurable number of the attribute is 1, the attribute can 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 attribute can be greater than or equal to 0.

[0091] The type of the attribute with the attribute name of CoreId can be a non-negative integer, the configurable number of the attribute is 1, the attribute can be used to identify the processor core (corresponding to the Processor Core in the machine parameter), and the value range of the attribute can be greater than or equal to 0.

[0092] The type of the attribute with the attribute name of Method can be an enumeration (enum) class, the configurable number of the attribute is 1, the attribute can be used to indicate the resource management method, and the value of the attribute can be reduce or close.

[0093] The type of the attribute with the attribute name Threshold can be a non-negative integer, and the configurable number thereof is 0 or 1. The attribute can be used to indicate a lower limit value required to be reached by the occupancy ratio when starting resource management, and the value range thereof can be [0, 100]. That is, when the occupancy ratio of the processor core is greater than the value of the attribute with the attribute name Threshold, the service layer can adjust the running state of the processor core according to the resource management manner indicated by the attribute with the attribute name Method.

[0094] The configurable number of the attribute in Table 1 refers to whether the attribute needs to be included in the policy configuration item. If the configurable number is 1, it indicates that the attribute should be included in the policy configuration item. If the configurable number is 0 or 1, it indicates that the attribute can be included in the policy configuration item or can not be included in the policy configuration item. For example, the policy configuration item of the processor core shown in Table 1 can not need to include the attribute with the attribute name Threshold.

[0095] Table 1

[0096]

[0097] It can be understood that after the configuration tool generates the configuration file based on the above-mentioned meta-model, the identifier of the processor core in the policy configuration item of the processor core in the configuration file includes the value of the attribute with the attribute name CpuId and the value of the attribute with the attribute name CoreId. The first attribute is the value of the attribute with the attribute name Method, and the second attribute is the value of the attribute with the attribute name Threshold. It can also be understood that the policy configuration items of the ECU and the MCU and other hardware resources in the hardware layer can refer to Table 1.

[0098] For the peripheral in the hardware layer, the newly added policy configuration item in the meta-model can be as shown in Table 2. As can be seen from Table 2, the policy configuration item can also include multiple attributes. Among them, the type of the attribute with the attribute name Shortname can be a string, the configurable number of the attribute is 1, and the attribute can be used to identify the name of the policy configuration item. For example, the name can be Device Power Config.

[0099] The type of the attribute with the attribute name DeviceID can be a non-negative integer, the configurable number of the attribute is 1, and the attribute can be used to identify the identifier of the peripheral that needs to be managed.

[0100] The type of the attribute with the attribute name Method can be an enumeration class, the configurable number thereof is 1, and the attribute can be used to indicate the resource management manner. For example, the value of the attribute can be to reduce the working frequency or to shut down.

[0101] Table 2

[0102]

[0103] In the embodiments of the present application, if the resource configuration item of a certain hardware resource is included in the configuration file, the target service module can perform resource management on the hardware resource according to the device state during the running process of the embedded device. For example, assuming that the resource configuration item of the laser radar is included in the configuration file, and the value of the attribute with the attribute name of Method in the resource configuration item is off, the target service module can turn off the power supply of the laser radar in the parking state. If the resource configuration item of the front camera is included in the configuration file, and the value of the attribute with the attribute name of Method in the resource configuration item is off, the target service module can turn off the power supply of the front camera when reversing.

[0104] It can also be understood that the order of the steps of the above-mentioned parameter configuration method provided by the embodiments of the present application can be adjusted appropriately, and the steps can also be increased or decreased accordingly according to the circumstances. For example, the above-mentioned step 101 can be deleted according to the circumstances. Or, the above-mentioned step 1071 can be deleted according to the circumstances, that is, the service layer can directly adjust the running state of the hardware resource according to the resource management strategy when detecting that the state of the embedded device is switched, without the need to judge whether the state switching meets the adjustment condition. Or, the above-mentioned step 1072 can also be deleted according to the circumstances, that is, the second attribute can also not be included in the strategy configuration item. Correspondingly, the service layer does not need to judge whether the running state of the target hardware resource meets the starting condition, but can directly adjust the running state of the target hardware resource according to the resource management mode indicated by the first attribute.

[0105] Hereinafter, the parameter configuration method provided by the embodiments of the present application will be introduced by taking the EM module in the service layer as an example. Referring to Figure 8 , the method can include:

[0106] Step 201, reading a configuration file.

[0107] In the embodiments of the present application, after the EM module is started, it can first read the configuration file stored in the hardware layer. Then, the EM module can perform the following steps 202, 203 and 204.

[0108] Step 202, starting other service modules in the service layer and starting applications in the application layer based on the configuration file.

[0109] The EM can start other service modules (such as CM modules and SM modules, etc.) in the service layer and start applications in the application layer based on the configuration parameters in the configuration file.

[0110] Step 203, start the instruction monitoring function.

[0111] The EM module can start the instruction monitoring function based on the configuration file and perform step 205.

[0112] Step 204, start the state monitoring function.

[0113] In the embodiments of the present application, the EM module can also start the state monitoring function based on the configuration file and perform step 209.

[0114] Step 205, detect whether an instruction is received.

[0115] After the EM module starts the instruction monitoring function, it can detect in real time whether an instruction sent by other devices (such as a configuration tool) is received. If the EM module receives an instruction, step 206 can be performed; if the EM module does not receive an instruction, step 205 can be continued, that is, whether an instruction is received is detected.

[0116] Step 206, parse the instruction type.

[0117] After the EM module receives an instruction, the instruction can be parsed to determine the instruction type of the instruction.

[0118] Step 207, if the instruction is a configuration instruction, obtain the hardware resource parameter.

[0119] If the EM module determines that the instruction is a configuration instruction issued by the configuration tool to indicate that the hardware resource parameter is obtained, the EM module can obtain the hardware resource parameter of the hardware resource included in the hardware layer based on the configuration instruction.

[0120] Step 208, send the hardware resource parameter to the configuration tool.

[0121] After the EM module obtains the hardware resource parameter, the hardware resource parameter can be sent to the configuration tool through the communication interface.

[0122] Step 209, detect whether there is a state switch.

[0123] In step 204 described above, after the EM module starts the state monitoring function, the state of the embedded device can be monitored in real time, and it can be determined whether the state of the embedded device is switched. If the EM module determines that the state of the embedded device is switched, step 210 can be performed; if the EM module determines that the state of the embedded device is not switched, step 209 can be continued, that is, the state of the embedded device is continuously monitored.

[0124] For example, the EM module can determine that there is a state switch of the embedded device when it is detected that a new process is pulled up or a process is restarted.

[0125] Step 210, determining whether the state switching meets the adjustment condition of the hardware resource.

[0126] After determining that the state of the embedded device is switched, the EM module can further determine whether the state switching meets the adjustment condition of the hardware resource, i.e., determining whether the state switching affects the scheduling of the hardware resource. If the EM module determines that the state switching meets the adjustment condition of the hardware resource, step 211 can be executed; if the EM module determines that the state switching does not meet the adjustment condition of the hardware resource, step 209 can be continued. The implementation process of step 210 can refer to step 1071 described above, and will not be repeated here.

[0127] Step 211, determining whether the running state of the hardware resource needs to be adjusted according to the resource management strategy in the configuration file.

[0128] If the EM module determines that the state switching affects the scheduling of the hardware resource, the running state of the hardware resource can be determined whether it needs to be adjusted according to the second attribute in the resource management strategy. If the EM module determines that the running state of the hardware resource needs to be adjusted, step 212 can be executed; if the EM module determines that the running state of the hardware resource does not need to be adjusted, step 209 can be continued. The implementation process of step 211 can refer to step 1072 described above, and will not be repeated here.

[0129] Step 212, adjusting the running state of the hardware resource included in the hardware layer.

[0130] If the EM module determines that the running state of the hardware resource needs to be adjusted, the running state of the hardware resource included in the hardware layer can be adjusted according to the resource management mode indicated by the first attribute in the resource management strategy. The implementation process of step 212 can refer to step 1073 described above, and will not be repeated here.

[0131] In an example, the service layer adjusts the running state of the processor based on the resource management strategy in the configuration file, which can achieve the following effects:

[0132] 1. When it is detected that a process (such as an automatic driving process) running in a certain processor core is in a dead state, the processor core is closed or the frequency of the processor core is reduced.

[0133] 2. When it is detected that the CPU occupancy of a certain processor core is lower than a threshold or no task is executed, the processor core is closed or the frequency of the processor core is reduced.

[0134] 3. When detecting that the overall CPU occupancy of the processor is lower than a threshold, some processor cores are closed or the frequency of some processor cores is reduced. The processor cores that are closed or have their frequency reduced can be high-performance processor cores in the CPU.

[0135] 4. When detecting that the resource consumption of the task currently executed by the embedded device is low, for example, when detecting that the embedded device is executing an upgrade task, an automatic parking task, or is not in an automatic driving state, some processor cores can be closed or the frequency of some processor cores is reduced.

[0136] Based on the above examples, it can be seen that the method provided in the embodiments of the present application can flexibly schedule the CPU based on the state of the embedded device during the running process of the embedded device, that is, the method provided in the embodiments of the present application can realize hot plugging of the CPU.

[0137] In summary, the embodiments of the present application provide a parameter configuration method, and the service layer in the embedded device can directly obtain the hardware resource parameter of the hardware layer and send the hardware resource parameter to the AUTOSAR development tool. Since the developer does not need to manually input the hardware resource parameter in the development tool, the parameter configuration efficiency can be effectively improved, and the development efficiency of the application can be improved.

[0138] Moreover, since the service layer can also adjust the running state of the hardware resource based on the resource management strategy in the configuration file, flexible scheduling of the hardware resource can be realized, and the power consumption of the embedded device can be effectively reduced without affecting the normal running of the embedded device.

[0139] The embodiments of the present application also provide an embedded device, which can be applied to a vehicle, for example, can be applied to a smart car, a connected car, or a new energy vehicle. The embedded device adopts AUTOSAR, for example, can adopt an AUTOSAR AP architecture or an AUTOSAR CP architecture. Moreover, as shown in the figure, the embedded device can include a hardware layer 01, a service layer 03, and an application layer 04. As shown in the figure, Figure 1 As shown in the figure, Figure 4 and Figure 9 The service layer 03 includes:

[0140] A resource management module 032 is configured to obtain a hardware resource parameter of the hardware layer. The function implementation of the resource management module 032 can refer to the related description of steps 102 and 207 in the above method embodiments.

[0141] The communication interface 031 is configured to send the hardware resource parameter to an AUTOSAR development tool, and the hardware resource parameter is used for the AUTOSAR development tool to generate an executable file and a configuration file, and the executable file and the configuration file can be stored in a hardware layer of the embedded device. The function implementation of the communication interface 031 can refer to the related description of steps 103 and 208 in the method embodiments.

[0142] The running module 033 is configured to run the executable file based on the configuration file. The function implementation of the running module 033 can refer to the related description of step 106 in the method embodiments.

[0143] Optionally, the configuration file includes a resource management strategy; and the resource management module 032 is further configured to adjust the running state of the hardware resource included in the hardware layer based on the resource management strategy. The function implementation of the resource management module 032 can also refer to the related description of steps 107 and 212 in the method embodiments.

[0144] Optionally, the resource management strategy includes an identifier of a target hardware resource and a first attribute, and the first attribute is used to indicate a resource management manner for the target hardware resource; and the resource management module 032 is configured to adjust the running state of the target hardware resource indicated by the identifier according to the resource management manner indicated by the first attribute.

[0145] The function implementation of the resource management module 032 can also refer to the related description of step 1073 in the method embodiments.

[0146] Optionally, the resource management strategy further includes a second attribute; the second attribute is used to indicate a starting condition for performing resource management on the target hardware resource; and the resource management module 032 is configured to, if it is determined that the running state of the target hardware resource indicated by the identifier meets the starting condition indicated by the second attribute, adjust the running state of the target hardware resource according to the resource management manner indicated by the first attribute.

[0147] The function implementation of the resource management module 032 can also refer to the related description of step 1072 in the method embodiments.

[0148] Optionally, the resource management manner includes turning off the target hardware resource, or reducing the working frequency of the target hardware resource.

[0149] Optionally, the resource management module 032 is configured to, if it is detected that the embedded device has a state switching, and the state switching meets an adjustment condition of a hardware resource, adjust the running state of the hardware resource based on the resource management strategy.

[0150] The function implementation of the resource management module 032 can also refer to the related descriptions of steps 1071, step 209 and step 210 in the foregoing method embodiments.

[0151] Optionally, the resource management module 032 can be configured to receive a configuration command sent by the AUTOSAR development tool, and obtain the hardware resource parameter of the hardware layer based on the configuration command. The function implementation of the resource management module 032 can also refer to the related descriptions of steps 102, and 205 to 207 in the foregoing method embodiments.

[0152] Optionally, the hardware resource parameter obtained by the resource management module 032 can include machine parameters and system parameters.

[0153] In summary, the embodiments of the present application provide an embedded device. The service layer in the embedded device can directly obtain the hardware resource parameter of the hardware layer, and send the hardware resource parameter to the AUTOSAR development tool. Since the developer does not need to manually input the hardware resource parameter in the development tool, the parameter configuration efficiency can be effectively improved, and the application development efficiency can be improved.

[0154] In addition, since the service layer can also adjust the running state of the hardware resource based on the resource management strategy in the configuration file, the hardware resource can be flexibly scheduled, and the power consumption of the embedded device can be effectively reduced without affecting the normal operation of the embedded device.

[0155] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the embedded device and each module described above can refer to the corresponding processes in the foregoing method embodiments, which will not be described herein.

[0156] It should be understood that the embedded device provided by the embodiments of the present application can also be implemented by an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD can be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof. The parameter configuration method provided by the foregoing method embodiments can also be implemented by software. When the parameter configuration method provided by the foregoing method embodiments is implemented by software, each module in the embedded device can also be a software module.

[0157] Figure 10 is a structural schematic diagram of an embedded device provided by an embodiment of the present application, referring to Figure 10 The embedded device can include a processor 1001, a memory 1002, a network interface 1003 and a bus 1004. The bus 1004 is used to connect the processor 1001, the memory 1002 and the network interface 1003. The communication connection between other devices can be realized through the network interface 1003 (which can be wired or wireless). The memory 1002 stores a computer program 10021, which is used to realize various application functions.

[0158] It should be understood that in the embodiments of the present application, the processor 1001 can be a CPU, and the processor 1001 can also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA), GPUs or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc.

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

[0160] Bus 1004 can include a data bus, a power bus, a control bus, and a state signal bus, etc. in addition to the data bus. However, for the sake of clarity, all the buses are marked as bus 1004 in the figure.

[0161] The processor 1001 is configured to execute the computer program stored in the memory 1002, and the processor 1001 implements the steps in the above method embodiments by executing the computer program 10021.

[0162] The embodiments of the present application also provide a computer readable storage medium, the computer readable storage medium stores instructions, and the instructions are executed by a processor to implement the steps in the above method embodiments.

[0163] The embodiments of the present application also provide a computer program product containing instructions, when the computer program product is run on a computer, the computer program product causes the computer to execute the steps in the above method embodiments.

[0164] It should be understood that, in the embodiments of the present application, the "and / or" mentioned refers to three possible relationships, for example, A and / or B can represent: A exists alone, A and B exist together, and B exists alone. The character " / " generally represents that the front and rear associated objects are in an "or" relationship.

[0165] In the present application, the term "at least one" means one or more, and in the present application, the term "multiple" means two or more, for example, multiple attributes means two or more attributes.

[0166] The above-described embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented by software, the above-described embodiments can be implemented in whole or in part 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, the processes or functions described in the embodiments of the present application are wholly or partially generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. containing one or more available medium sets. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium. The semiconductor medium can be a solid state drive (SSD).

[0167] The above-described embodiments are only optional embodiments of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A method of parameter configuration, characterized by, The method is applied to an embedded device using an automotive open system architecture (AUTOSAR), the embedded device including a hardware layer, a service layer, and an application layer; the method includes: The service layer acquires hardware resource parameters of the hardware layer; The service layer sends 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; The service layer runs the executable files based on the configuration files.

2. The method of claim 1, wherein, The configuration files include a resource management strategy; the method further includes: The service layer adjusts a running state of a hardware resource included in the hardware layer based on the resource management strategy.

3. The method of claim 2, wherein, The resource management strategy includes an identification of a target hardware resource and a first attribute, the first attribute being used to indicate a resource management mode for the target hardware resource; The service layer adjusts a running state of a hardware resource included in the hardware layer based on the resource management strategy, including: The service layer adjusts the running state of the target hardware resource indicated by the identification according to the resource management mode indicated by the first attribute.

4. The method of claim 3, wherein, The resource management strategy further includes a second attribute, the second attribute being used to indicate a starting condition for resource management of the target hardware resource; The service layer adjusts a running state of a hardware resource included in the hardware layer based on the resource management strategy, including: The service layer adjusts the running state of the target hardware resource according to the resource management mode indicated by the first attribute if it is determined that the running state of the target hardware resource indicated by the identification meets the starting condition indicated by the second attribute.

5. The method of claim 3, wherein, The resource management mode includes shutting down the target hardware resource or reducing a working frequency of the target hardware resource.

6. The method according to any one of claims 2 to 5, characterized in that, The service layer adjusts a running state of a hardware resource included in the hardware layer based on the resource management strategy, including: The service layer adjusts the running state of the hardware resource based on the resource management strategy if it is detected that the embedded device has a state switching and the state switching meets an adjustment condition of the hardware resource.

7. The method according to any one of claims 1 to 5, characterized in that, The service layer acquires hardware resource parameters of the hardware layer, including: The service layer receives a configuration command sent by the AUTOSAR development tool; The service layer acquires the hardware resource parameters of the hardware layer based on the configuration command.

8. The method according to any one of claims 1 to 5, characterized in that, The hardware resource parameters include machine parameters and system parameters.

9. An embedded device, characterized by The embedded device uses an automotive open system architecture (AUTOSAR), and the embedded device includes a hardware layer, a service layer, and an application layer; the service layer includes: A resource management module, configured to acquire hardware resource parameters of the hardware layer; A communication interface, configured to send 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; and The service layer runs the executable files based on the configuration files. The running module is configured to run the executable file based on the configuration file.

10. The apparatus of claim 9, wherein, The configuration file comprises a resource management policy; and the resource management module is further configured to: adjust a running state of a hardware resource comprised in the hardware layer based on the resource management policy.

11. The apparatus of claim 10, wherein, The resource management policy comprises: an identification of a target hardware resource and a first attribute, the first attribute being used to indicate a resource management manner for the target hardware resource. The resource management module is configured to: adjust the running state of the target hardware resource indicated by the identification according to the resource management manner indicated by the first attribute.

12. The apparatus of claim 11, wherein, The resource management policy further comprises a second attribute, the second attribute being used to indicate a starting condition for performing resource management on the target hardware resource. The resource management module is configured to: if it is determined that the running state of the target hardware resource indicated by the identification meets the starting condition indicated by the second attribute, adjust the running state of the target hardware resource according to the resource management manner indicated by the first attribute.

13. The apparatus of claim 11, wherein, The resource management manner comprises: shutting down the target hardware resource, or reducing a working frequency of the target hardware resource.

14. The apparatus of any one of claims 10 to 13, wherein, The resource management module is configured to: if it is detected that the embedded device has a state switching, and the state switching meets an adjustment condition of a hardware resource, adjust the running state of the hardware resource based on the resource management policy.

15. The apparatus of any one of claims 9 to 13, wherein, The resource management module is configured to: receive a configuration command sent by the AUTOSAR development tool; obtain a hardware resource parameter of the hardware layer based on the configuration command.

16. The apparatus of any one of claims 9 to 13, wherein, The hardware resource parameter comprises: a machine parameter and a system parameter.

17. An embedded device, comprising: The embedded device adopts an automotive open system architecture (AUTOSAR), and the embedded device comprises 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.

18. A parameter configuration system, characterized by The system comprises: an AUTOSAR development tool and the embedded device according to any one of claims 9 to 17. The AUTOSAR development tool is configured to generate an executable file and a configuration file based on a hardware resource parameter sent by a service layer of the embedded device.

19. A computer-readable storage medium, characterized in that, The computer readable storage medium stores instructions, and the instructions are executed by the processor to implement the method according to any one of claims 1 to 8.

20. A chip, characterized by The chip comprises a programmable logic circuit and / or program instructions, and the chip is configured to implement the method according to any one of claims 1 to 8 when running.

Citation Information

Patent Citations

  • Computer and hardware parameter configuring method thereof

    CN103714037A