Resource allocation method, apparatus and system, and vehicle

Through neural network configuration and resource allocation methods, the resource allocation of multi-processor domain controllers is optimized, and the resource waste and unreasonable adaptation problems of traditional manual allocation methods are solved, and efficient and scientific resource allocation and low-latency communication are achieved.

WO2024234720A1PCT designated stage expired Publication Date: 2024-11-21YINWANG INTELLIGENT TECHNOLOGIES CO LTD

Patent Information

Application Number
PCT/CN2024/073486
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-05-18
Filing Date
2024-01-22
Publication Date
2024-11-21

AI Technical Summary

Technical Problem

Multi-processor domain controllers face challenges in resource allocation and interaction between processors. The traditional manual allocation method consumes a lot of manpower and material resources and cannot be considered globally, resulting in waste of resources and unreasonable adaptation.

Method used

The neural network configuration and resource allocation methods are adopted to simulate the operation of business applications in different scenarios, optimize resource allocation strategies and neural network configuration, and realize automated resource allocation, and improve the efficiency and scientificity of resource allocation from an overall perspective.

Benefits of technology

It improves the efficiency and rationality of multi-processor resource allocation, ensures low latency and low power consumption of domain controllers in the business process, and reduces manpower and material consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024073486_21112024_PF_FP_ABST
    Figure CN2024073486_21112024_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of processors. Disclosed are a resource allocation method, apparatus and system, and a vehicle. In the present application, a topological relationship between a plurality of service applications for which a plurality of processors in a control unit are responsible, a communication protocol followed by the plurality of service applications, and a deployment policy are determined by means of simulation deployment; the resource allocation situation and the neural network configuration situation of the plurality of processors in the control unit are then determined by means of simulation running; a resource configuration policy and / or a neural network configuration for the control unit are then adjusted by means of deployment tuning, such that a better resource allocation scheme is obtained; and on the basis of a deployment tuning result, resources of the plurality of processors in the control unit are finally allocated to the plurality of service applications corresponding to the plurality of processors. On this basis, resource allocation can be automatically realized from the overall perspective of a control unit, the efficiency, rationality and scientificity during resource allocation or adjustment are improved, and low communication latency and low power consumption during the process of a domain control unit executing a corresponding service are guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Resource allocation method, device, system and vehicle

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on May 18, 2023, with application number 202310569681.2 and application name “Resource Allocation Method, Device, System and Vehicle,” the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of processor technology, and in particular to a resource allocation method, device, system, and vehicle. Background Art

[0003] With the continuous development of in-vehicle technologies such as intelligent driving, the data transmission throughput for related functions such as intelligent driving, cockpit, and chassis control is increasing, and the processing requirements and latency requirements are becoming increasingly higher. In this case, the processing power of a vehicle domain control unit (DCU) including a single processor, such as a single system on chip (SoC), is gradually unable to meet the requirements of related functions. To solve the above problems, domain controllers usually have multiple processors built in. They rely on the advantages of multiple processors (such as multiple SoCs) such as strong computing power, combinability, flexible scalability, and convenient redundancy backup to ensure the efficient and reliable implementation of related functions.

[0004] Domain controllers with multiple processors present greater challenges in resource allocation and inter-processor interaction than domain controllers with a single processor, as they involve the allocation of resources (such as computing power, memory, and bandwidth) across multiple processors, as well as communication between them. Traditional resource allocation for domain controllers with multiple processors still relies on manual allocation or adjustment, which consumes significant manpower and material resources. Furthermore, manually allocated or adjusted resources cannot be allocated from a holistic perspective across multiple processors, resulting in a certain degree of resource waste and often failing to properly adapt to the individual services of the multiple processors.

[0005] Summary of the Invention

[0006] The present application provides a resource allocation method, device, system and carrier, which can adaptively optimize resource deployment from the overall perspective of multiple processors and corresponding multiple business applications to ensure the rationality and scientificity of allocating resources of multiple processors to multiple business applications.

[0007] To achieve the above objectives, this application adopts the following technical solutions:

[0008] In a first aspect, a resource allocation method is provided. The method is applied to a first device, and the method includes:

[0009] First, the first device obtains a first resource allocation result and a first neural network configuration of the controller; wherein the controller includes multiple processors, and the multiple processors are used to run multiple business applications. The first resource allocation result includes one or more of the following: the load of the processing unit in each of the multiple processors, the memory load of each of the multiple processors, the processing unit corresponding to each business application in the multiple business applications, the quality of service (QoS) level corresponding to each business application in the multiple business applications, and the runtime delay corresponding to each business application in the multiple business applications. The first neural network configuration includes one or more of the following: the neural network type, the processing unit deployed by the neural network, and the acceleration operator. This step is mainly used to determine the current deployment status of the multiple processors in the controller.

[0010] Then, when the first resource allocation result does not meet the preset conditions, the first device simulates running the operation files (such as application codes) corresponding to the above-mentioned multiple business applications based on the acquired acceleration operator in N different scenarios, and obtains corresponding N acceleration results, wherein the acceleration result characterizes the time and resources required to run the acceleration operator in the corresponding scenario. This step is mainly used to simulate business operations in multiple different scenarios to obtain corresponding acceleration results in order to obtain the optimal scenario. Among them, the multiple different scenarios can be customized / automatically determined by the first device, or can be user-defined settings, such as user-defined selection of the interface to be accelerated, the acceleration operator used by the customized interface, the acceleration strategy of the customized acceleration interface, the customized selection of the processing unit, the customized time required to run the acceleration operator, the customized resources required to run the acceleration operator, etc.

[0011] The first device then adjusts the controller's first resource allocation strategy and / or first neural network configuration based on the N acceleration results to obtain an adjustment result, where the adjustment result includes a second resource allocation strategy and / or second neural network configuration. This step is primarily used to optimize the resource allocation strategy and / or neural network configuration based on the configuration corresponding to the optimal scenario, providing a basis for subsequent processor resource allocation.

[0012] Finally, the first device allocates resources of multiple processors to multiple business applications based on the obtained adjustment results. Exemplarily, the resources of the multiple processors include one or more of the following: computing resources, memory resources, and bandwidth resources. Among them, computing resources include central processing unit (CPU) resources, AI computing core (AIC) resources, AI vector acceleration core (AIV) resources, etc.

[0013] Exemplarily, the first device may be a controller or a resource allocation simulation device.

[0014] For example, the controller can be a domain controller, such as a domain controller on a vehicle. This domain controller can include, but is not limited to, any one or more of the following: an intelligent driving domain controller, a cockpit domain controller, a chassis domain controller, a powertrain domain controller, and a body domain controller. Taking the controller as an example, the multiple processors in the domain controller can be multiple systems on chips (SoCs).

[0015] In the solution provided by the first aspect above, the first device can simulate business operations in multiple different scenarios to obtain corresponding acceleration results, thereby obtaining the optimal scenario, and optimizing the controller's resource allocation strategy and / or neural network configuration based on the configuration corresponding to the optimal scenario. Finally, based on the results of the deployment optimization, the controller's current resource deployment is adjusted, such as adjusting the allocation of resources of multiple processors in the controller to multiple business applications based on the results of the deployment optimization. Based on this, resource allocation can be achieved automatically from the perspective of the controller as a whole, improving the efficiency, rationality, and scientificity of resource allocation or adjustment, and ensuring low communication latency and low power consumption when the domain controller executes the corresponding business.

[0016] As a possible implementation, before the first device obtains the first resource allocation result and the first neural network configuration of the controller, the method further includes: the first device obtains a first resource configuration policy, wherein the first resource configuration policy includes the topological relationship between the multiple business applications and application information of each of the multiple business applications, the application information includes the communication protocol and deployment policy of the corresponding business application, and the deployment policy represents one or more of the node, scheduling policy, priority policy, and lifecycle policy on which the business application is located when running in the controller, wherein the node can be a processor among multiple processors or a processing unit on a processor; based on this, the first device obtains the first resource allocation result and the first neural network configuration of the controller, including: the first device simulates running the operation files of the multiple business applications based on the first resource configuration policy to obtain the first resource allocation result and the first neural network configuration of the controller when the multiple business applications are running. Based on this, the first device can determine the topological relationship between the multiple business applications responsible for the multiple processors in the controller, the communication protocol and deployment policy followed by the multiple business applications through simulation deployment, understand the current resource deployment status of the controller, and provide a reference for subsequent deployment optimization.

[0017] As a possible implementation method, the first device obtains the first resource configuration policy, including: when the business application corresponding to the controller changes, the first device obtains the first resource configuration policy. Exemplarily, the business application corresponding to the controller changes, such as in an over the air (OTA) software upgrade scenario. Based on this, when the software of the business application corresponding to the controller needs to be upgraded or the software of the controller needs to be upgraded, the adjustment and allocation of resources can be automatically implemented from the overall perspective of the controller, thereby improving the efficiency, rationality and scientificity of resource adjustment, and ensuring low latency and low power consumption of communication when the domain controller executes the corresponding business process.

[0018] Of course, the first device can also obtain the first resource configuration strategy under other circumstances, such as when the controller is powered on or when preset conditions are met. This application does not make specific restrictions on the triggering conditions and timing for the first device to execute the resource allocation method.

[0019] As a possible implementation, the first device adjusts the first resource configuration strategy and / or first neural network configuration of the controller based on N acceleration results, including: the first device adjusts the first resource configuration strategy and / or first neural network configuration of the controller based on the N acceleration results based on a preset tuning method, wherein the preset tuning method includes one or more of the following: a tuning method based on historical experience, a tuning method based on an adaptive recommendation algorithm. Tuning based on the adaptive recommendation algorithm can reliably obtain the optimal solution among multiple acceleration results, so as to support subsequent deployment tuning based on the configuration corresponding to the optimal solution, thereby obtaining more scientific and reasonable adjustment results. Tuning based on historical experience can be combined with specific circumstances, such as processing unit functions, controller functions, usage scenarios, etc., to perform deployment tuning and obtain adjustment results that fit the actual equipment and usage conditions. Tuning based on historical experience and tuning based on the adaptive recommendation algorithm can not only improve the reliability of the adjustment results from an algorithmic perspective, but also make up for actual equipment and usage conditions such as processing unit functions, controller functions, usage scenarios, etc. that are not taken into account by the adaptive recommendation algorithm.

[0020] As a possible implementation method, the above-mentioned first device simulates running the operation files corresponding to multiple business applications based on the acceleration operator in N different scenarios to obtain corresponding N acceleration results, including: the first device obtains the intermediate data generated when running the operation files corresponding to the multiple business applications based on the acceleration operator in each of the N different scenarios; the first device generates N acceleration results corresponding to N different scenarios based on the above-mentioned intermediate data. Exemplarily, the acceleration result characterizes the time and resources required to run the acceleration operator in the corresponding scenario. Based on this, the acceleration results such as the time and resources required to run the acceleration operator in the corresponding scenario are obtained based on the intermediate data at the key operation nodes, which can ensure that the information referenced during subsequent deployment and optimization is obtainable, and ensure the referenceability and reliability of the referenced information.

[0021] Exemplarily, the manner in which the first device acquires the intermediate data may include but is not limited to inserting a plug and / or setting an intermediate data acquisition model.

[0022] As a possible implementation, the first device acquires the first resource allocation policy by: displaying a first interface, wherein the first interface includes a first input channel; and receiving the first resource allocation policy input by a user via the first input channel. This solution can improve operational convenience by providing a user-friendly interface for inputting relevant data.

[0023] For example, the first interface can be an existing tool development interface or tool optimization interface, such as the AUTOSAR platform interface, the autonomous driving service framework initiative (ADSFI) platform interface, the MDC manifest configuration (MMC) interface, etc. Of course, the first interface can also be other interfaces with a resource configuration policy input channel.

[0024] Of course, the solution provided in this application can also support the first device to directly obtain the current resource configuration policy of the controller, so as to evaluate the current resource deployment status of the controller and further optimize the deployment.

[0025] As a possible implementation, after obtaining the adjustment results, the adjustment results are also displayed on the first interface. Based on this, it is convenient for users to intuitively understand the current resource configuration and facilitate subsequent related operations such as tuning, resource allocation, and solution export.

[0026] In a second aspect, a controller is provided, which includes multiple processors, and the multiple processors are used to support the controller to implement functions corresponding to multiple business applications; the controller is used to implement the method in any possible implementation of the first aspect.

[0027] In a third aspect, a resource allocation simulation device is provided, which includes: a communication interface for communication between devices; a memory for storing computer program instructions; and a processor for executing the computer program instructions to support the resource allocation simulation device to implement a method as in any possible implementation of the first aspect.

[0028] In a fourth aspect, an electronic device is provided, comprising a controller including multiple processors configured to support the controller in implementing functions corresponding to multiple business applications; the controller is configured to implement the method described in any possible implementation of the first aspect. Exemplarily, the electronic device may be a terminal device such as a smartphone, a netbook, or a tablet computer, or an embedded device such as a switch, an industrial computer, or a drone, although this application does not impose specific limitations thereon.

[0029] In a fifth aspect, a control system is provided, which includes the controller as described in the second aspect.

[0030] In a sixth aspect, a vehicle is provided, comprising the controller described in the second aspect, the resource allocation device described in the third aspect, the electronic device described in the fourth aspect, or the control system described in the fifth aspect, and configured to implement the method described in any possible implementation of the first aspect. Exemplarily, the vehicle may include, but is not limited to, a vehicle.

[0031] In a seventh aspect, a computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method in any possible implementation of the first aspect is implemented.

[0032] In an eighth aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to implement the method in any possible implementation of the first aspect.

[0033] In a ninth aspect, a chip system is provided, comprising a processing circuit and a storage medium storing computer program instructions; when the computer program instructions are executed by the processor, the method according to any possible implementation of the first aspect is implemented. The chip system may be composed of a chip alone or may include a chip and other discrete components. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] FIG1 is a diagram illustrating an example of domain controller deployment on a vehicle provided by an embodiment of the present application;

[0035] FIG2 is a schematic diagram of a domain controller architecture provided by an embodiment of the present application;

[0036] FIG3 is a schematic diagram of an Ethernet protocol architecture provided in an embodiment of the present application;

[0037] FIG4 is a schematic diagram of the structure of a controller provided in an embodiment of the present application;

[0038] FIG5 is a schematic diagram of a resource allocation architecture provided in an embodiment of the present application;

[0039] FIG6 is a schematic diagram of a topological relationship of multiple business applications provided in an embodiment of the present application;

[0040] FIG7 is a schematic diagram of a user experience (UX) interface provided in an embodiment of the present application;

[0041] FIG8 is a schematic diagram of several deployment optimization methods provided in an embodiment of the present application;

[0042] FIG9 is a flow chart of a resource allocation method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0043] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings in the embodiments of the present application. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships can exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.

[0044] Hereinafter, the terms "first," "second," and so on are used solely to distinguish different descriptive objects and have no limiting effect on the position, order, priority, quantity, or content of the described objects. For example, if the described object is a "field," the ordinal number preceding the "field" in "first field" and "second field" does not define the position or order of the "fields." "First" and "second" do not define whether the modified "fields" are in the same message, nor do they restrict the order of the "first field" and "second field." For another example, if the described object is a "level," the ordinal number preceding the "level" in "first level" and "second level" does not define the priority of the "levels." For another example, the number of described objects is not limited by the ordinal number and can be one or more. For example, in the case of "first device," the number of "devices" can be one or more. Furthermore, the objects modified by different prefixes can be the same or different. For example, if the described object is a "device," the "first device" and "second device" can be the same type of device or different types of devices. For another example, if the described object is "information," the "first information" and "second information" can be information of the same content or different contents. In short, the use of prefixes such as ordinal numbers to distinguish the described objects in the embodiments of the present application does not constitute a restriction on the described objects. For the statement of the described objects, please refer to the description in the context of the claims or embodiments, and no unnecessary restrictions should be constituted due to the use of such prefixes.

[0045] Furthermore, in the embodiments of the present application, "connection" may be a direct connection or an indirect connection; in addition, it may refer to an electrical connection or a communication connection; for example, the connection between two electrical components A and B may refer to a direct connection between A and B, or may refer to an indirect connection between A and B through other electrical components or connection media, or may refer to an indirect connection between A and B through other communication devices or communication media, as long as communication between A and B can be achieved.

[0046] For ease of understanding, the relevant technical terms involved in the embodiments of this application are first explained below.

[0047] 1. Vehicles

[0048] The vehicles described in the embodiments of the present application may include land vehicles, water vehicles, air vehicles, industrial equipment, agricultural equipment, or entertainment equipment. For example, the vehicle can be a vehicle, which is a vehicle in the broad sense and can be a transportation vehicle (such as a car, bus, subway, high-speed rail, motorcycle, flying car, train, etc.), an industrial vehicle (such as a forklift, trailer, tractor, etc.), an engineering vehicle (such as an excavator, bulldozer, crane, etc.), agricultural equipment (such as a mower, harvester, etc.), amusement equipment, a toy vehicle, a boat, an air cushion vehicle, a submarine, an airplane, a helicopter, etc. The embodiments of the present application do not limit the specific type, form, and function of the vehicle.

[0049] 2. Automotive open system architecture (AUTOSAR)

[0050] AUTOSAR is a software architecture system jointly established by global automakers, component suppliers, and other electronics, semiconductor, and software systems companies. The members maintain a development partnership. AUTOSAR is committed to developing an open, standardized software architecture for the automotive industry.

[0051] In some examples, the in-vehicle system can implement vehicle control based on AUTOSAR to ensure vehicle safety, or implement functions such as entertainment and communication.

[0052] In some examples, the vehicle-mounted system of the automotive electronic and electrical architecture (E / E architecture) can implement vehicle control based on AUTOSAR to ensure vehicle safety, or realize entertainment, communication and other functions. Among them, the E / E architecture integrates electronic hardware, network communication, software applications and wiring harnesses into the design architecture of a complete system. For example, the E / E architecture is composed of multiple electronic control units (ECUs) distributed in multiple locations of the vehicle. The multiple ECUs are used to control the electrical system, electronic system and embedded systems of the automotive subsystems to achieve the above-mentioned multiple functions. The AUTOSAR software platform is deployed in the ECU. ECUs can communicate with each other through the controller area network (CAN) bus, local interconnect network (LIN) bus, etc.

[0053] 3. Domain Controller Architecture

[0054] With the continuous development of in-vehicle technologies such as intelligent driving, vehicle functions are becoming more powerful and technology-intensive. Data on related functions such as intelligent driving, cockpit, and chassis control are increasing exponentially. In this case, in order to ensure the real-time, safe, and reliable implementation of various functions of intelligent vehicles, the architecture of the in-vehicle system tends to develop towards a domain controller architecture or a more centralized control architecture.

[0055] The hardware of a domain controller-based vehicle system utilizes a centralized, high-computing domain controller (DCU) and multiple corresponding ECUs. The software of this system utilizes a fusion of the AUTOSAR adaptive platform (AP) (referred to as "AUTOSAR AP") and the AUTOSAR classic platform (CP) (referred to as "AUTOSAR CP"). Based on AUTOSAR, this system provides various basic services and hardware capability abstraction services for upper-layer applications.

[0056] AUTOSAR AP is generally used in scenarios with certain requirements for real-time performance, functional safety, and high computing power, such as those for future smart car applications, such as autonomous driving and advanced driver assistance. For example, AUTOSAR AP can be used in smart car scenarios for sensor fusion processing, runtime dynamic updates, communication with transportation infrastructure / cloud servers during autonomous driving, over-the-air (OTA), and cross-domain computing, ensuring the real-time, secure, and reliable implementation of various functions of intelligent vehicles. AUTOSAR CP is generally used in scenarios with high requirements for real-time performance, functional safety, and low computing power, such as engine control and braking systems.

[0057] For example, please refer to Figure 1, which shows an example diagram of a domain controller deployment on a vehicle, as provided in an embodiment of the present application. As shown in Figure 1, the domain controller includes a high-computing domain controller (DCU) and ECUs distributed across multiple locations in the vehicle. The DCU and ECUs are connected in communication.

[0058] Among them, the DCU shown in Figure 1 can be deployed with an AUTOSAR AP to ensure its high computing power; the ECU shown in Figure 1 can be deployed with an AUTOSAR CP.

[0059] 4. Multi-domain controller (MDC) architecture

[0060] With the development of the automotive industry, the signals that vehicles need to receive, analyze, and process are becoming more complex and increasing in number. The traditional model of mapping functions one by one to ECUs, or a single domain controller, is no longer sufficient. In this situation, by dividing the domain controller into several domains (also called "functional domains") according to the functions of various vehicle components, it is possible to achieve relatively centralized integration of the in-vehicle computing required for multiple functions, such as in-cabin human-computer interaction, screen interconnection, and data management.

[0061] As an example, as shown in Figure 2, a domain controller (such as a DCU) can be divided into several domains (also called "functional domains") according to the functions of various parts of the vehicle, such as the intelligent driving domain, the cockpit domain, the chassis domain, the power domain, the body domain, etc. However, different manufacturers may divide the domains based on their own concepts differently. In addition, multiple domains can also be integrated across domains to obtain a fused domain, which is not specifically limited in this application.

[0062] The intelligent driving domain primarily provides autonomous driving perception and decision-making services, such as image reception, image processing and judgment, data processing and calculation, navigation and route planning, and rapid real-time situation judgment and decision-making. The intelligent driving domain requires processing algorithms at the three levels of perception, decision-making, and control, placing the highest demands on the domain controller's hardware and software. The cockpit domain primarily controls the various electronic information systems within the vehicle's intelligent cockpit, including the central control system, in-vehicle infotainment system, head-up display, seating system, instrumentation system, rearview mirror system, driver behavior monitoring system, and navigation system. The chassis domain primarily controls the vehicle's driving behavior and posture. Its functions include, but are not limited to, brake system management, transmission system management, driving system management, steering system management, vehicle speed sensor management, body posture sensor management, air suspension system management, and airbag system management. The powertrain domain primarily controls the vehicle's powertrain, optimizing its performance and ensuring safety, including engine management, transmission management, battery management, power distribution management, emissions management, speed limit management, and fuel and power conservation management. The body domain is mainly used to control various body functions, including but not limited to the control of headlights, taillights, interior lights, door locks, windows, sunroof, wipers, electric trunk, smart keys, air conditioning, antennas, gateway communications, etc.

[0063] As shown in Figure 2, each functional domain can be composed of a corresponding domain controller and multiple ECUs. For example, the ECU can be a single-chip microcomputer. The ECU can integrate a computer's central processing unit (CPU), read-only memory (ROM), random access memory (RAM), timer, analog-to-digital conversion (A / D) circuit, programmable logic controller (PLC), and input / output (I / O) interfaces (such as universal serial bus (USB) interfaces and universal asynchronous receiver / transmitter (UART) interfaces) on a single chip to form a chip-level computer, providing different control combinations for different applications.

[0064] It should be noted that the embodiments of this application use a domain controller architecture as an example only. The solutions provided in these embodiments are also applicable to other in-vehicle communication architectures that can meet the exponentially increasing demand for communication data transmission, such as future central controller architectures. For example, central controller architectures include vehicle centralized electrical and electronic architectures such as vehicle computers and zone concept architectures.

[0065] In addition, this application does not limit the specific structure of the high-computing power unit and the distributed units distributed at multiple locations in the vehicle in the domain controller architecture. For example, the distributed units distributed at multiple locations in the vehicle can also be MCUs or regional control units. Optionally, the distributed units distributed at multiple locations in the vehicle can be low-computing power units.

[0066] 5. Ethernet

[0067] As a mature and open standard and continuously updateable technology, Ethernet can meet the communication needs of intelligent vehicles and even autonomous vehicles. For example, Ethernet can be 10M Ethernet, 100M Ethernet, Gigabit Ethernet (GE) (also known as Gigabit Ethernet), 10 Gigabit Ethernet (10GE) (also known as 10 Gigabit Ethernet), 25GE, 100GE, etc.

[0068] In embodiments of the present application, the domain controller architecture may communicate over Ethernet (e.g., switched Ethernet). For example, multiple processors in the domain controller may communicate with each other over Ethernet; or, for another example, a processor in the domain controller may communicate with an ECU over Ethernet.

[0069] As an example, the Ethernet protocol hierarchy can be based on the hierarchical division method proposed by the Open Systems Interconnection (OSI) model. As shown in Figure 3, the automotive Ethernet protocol architecture can be divided into seven layers. Among them, layers 5-7 are the application layer, layer 4 is the transport layer, layer 3 is the network layer, layer 2 is the data link layer, and layer 1 is the physical layer.

[0070] The physical layer (e.g., BroadR-Reach) is primarily used to implement Ethernet communications, such as 100Mbps Ethernet communications. The data link layer (e.g., standard Ethernet MAC + virtual local area network (VLAN)) supports determinism, reliability, and safety mechanisms in vehicles.

[0071] As shown in Figure 3, layers 3-7 may include IEEE 1722, IEEE 802.1AS gPTP, transmission control protocol (TCP) / internet protocol (IP) protocol suite, scalable service-oriented middleware over IP (SOME / IP), and data distribution service (DDS).

[0072] Among them, IEEE 802.1AS gPTP is mainly used to achieve clock synchronization. IEEE 1722 is mainly responsible for streaming media transmission. The TCP / IP protocol suite is mainly used to provide support for upper-layer protocols. For example, the TCP / IP protocol suite can serve as a bridge between high-level application requirements and network layer protocols, providing services to enable high-level software applications to be used on the Internet. The TCP / IP protocol suite may include, but is not limited to, Internet Protocol version 4 (IPv4), Transmission Control Protocol (TCP), User Datagram Protocol (UDP), Internet Control Messages Protocol (ICMP), Address Resolution Protocol (ARP), Dynamic Host Configuration Protocol (DHCP), Universal Measurement and Calibration Protocol (XCP), Unified Diagnostic Services (UDS) protocol, etc., as shown in Figure 3.

[0073] SOME / IP and DDS serve as middleware for in-vehicle Ethernet communication and are mainly responsible for transmitting application data.

[0074] In the embodiment of the present application, SOME / IP can also be used to provide time information related to message sending and receiving, such as the packet sending time corresponding to application data.

[0075] DDS provides a QoS mechanism. Based on this mechanism, DDS allocates bandwidth to individual services based on their QoS levels within limited bandwidth resources, providing end-to-end quality of service. For example, voice, video, and critical data applications can be prioritized and allocated larger bandwidth on network devices by configuring higher QoS levels to ensure service quality.

[0076] 6. System on chip (SoC) (also known as single-chip system)

[0077] As an example, the domain controller (such as DCU) may include a system-on-chip (SoC) or the like.

[0078] A SoC integrates an entire information processing system on a single chip. Simply put, an SoC is a very large-scale integrated circuit that expands upon a CPU with audio and video capabilities and dedicated interfaces. With its high performance, low power consumption, and high flexibility, a SoC enables a single chip to perform the functions of a complete electronic system. For example, it implements the logic processing, image processing, storage processing, and artificial intelligence (AI) processing capabilities typically performed by individual modules, such as the CPU, graphics processing unit (GPU), microprocessor (MPU), RAM, analog-to-digital converter (ADC), digital-to-analog converter (DAC), modem, and digital signal processor (DSP). Some SoCs also integrate power management modules and control modules for various external devices. Furthermore, the distributed utilization of various buses must be considered.

[0079] In an embodiment of the present application, a domain controller may include multiple SoCs to meet the exponentially increasing amount of vehicle-related data. As an example, the SoC can process 8GB of vehicle-related data per second.

[0080] Multiple SoCs can be used for different services or work together to complete the same service. These multiple SoCs can be connected via a high-speed serial computer expansion bus (Peripheral Component Interconnect Express, PCIE) or Ethernet to form a dual-host or host-device architecture to complete the same or different services.

[0081] In some examples, an SoC can be a multi-core SoC, referred to as a "multi-core SoC." The core of an SoC ("SoC core") is the core circuitry responsible for control and information processing functions, excluding packaging and auxiliary circuits (such as pin interface circuits, power supply circuits, and clock circuits). An SoC core is essentially a completely independent processing unit that can read instructions from internal memory and execute the control and computing tasks specified by the instructions.

[0082] 7. OTA

[0083] OTA refers to the technology used to remotely manage firmware, data, and applications on a device via a communication network. OTA implementation typically involves three steps: first, uploading the software to be updated to a tool development platform or tool optimization platform; then, the platform transmits the updated software to the device; and finally, the device automatically updates the software.

[0084] Generally, OTA can be divided into two categories. One is firmware over the air (FOTA), which means upgrading devices with network functions by writing new firmware programs, such as the firmware programs of the control systems corresponding to the vehicle's engine, motor, gearbox, chassis, etc., without changing the original accessories on the terminal side. The other is software over the air (SOTA), which means upgrading applications based on the operating system, such as upgrading the in-vehicle map, human-computer interaction interface, entertainment audio and video system, etc. The embodiments of this application mainly involve software upgrades.

[0085] We know that compared to controllers that only include a single processor, controllers that include multiple processors have stronger computing power, higher flexibility, and are easier to combine and expand. Therefore, they can implement corresponding functions more efficiently and reliably. However, controllers that include multiple processors also face difficulties. Taking the domain control that includes N*SoC+ECU (N is a positive integer and N>1) as an example, the main difficulties include 1-3:

[0086] Difficulty 1: The domain controller is relatively complex, whether it is communication between SoCs, communication between SoCs and ECUs, or hardware design, so there may be some compatibility and adaptability issues. This results in a certain communication delay although SoCs or SoCs and ECUs can communicate through Ethernet or PCIE.

[0087] Difficulty 2: Because this domain controller involves allocating the computing power, memory, bandwidth, and other resources of multiple SoCs across multiple business applications, resource allocation presents a greater challenge than for domain controllers using a single SoC. Traditional resource allocation methods require manual allocation and adjustment, which consumes significant manpower and material resources. Furthermore, manually allocated or adjusted resources fail to account for the overall situation, resulting in low resource utilization and waste.

[0088] Difficulty 3: The services of each SoC in the domain controller may be related. Therefore, when upgrading, it is necessary to consider the consistency of the software versions corresponding to each SoC, or the upgrade order of each SoC. Inconsistent software versions may cause compatibility or adaptability issues between the updated SoCs. If the upgrade order of each SoC is incorrect, the domain controller system may crash. In addition, if each SoC needs to be upgraded synchronously, the domain controller must support this upgrade method.

[0089] To address the above-mentioned issues, embodiments of the present application provide a resource allocation method that automatically implements resource deployment from the perspective of the controller as a whole. This method can improve the efficiency of resource allocation or adjustment by multiple processors to multiple business applications, improve the rationality and scientific nature of resource allocation or adjustment, and ensure low communication latency and low power consumption when the domain controller executes the corresponding business. Furthermore, based on the resource allocation method provided in embodiments of the present application, resource configuration strategies can also be adaptively tuned to further improve the rationality and scientific nature of resource allocation or adjustment, and further reduce communication latency when the domain controller executes the corresponding business.

[0090] The resource allocation method provided in the embodiment of the present application will be described in detail below with reference to the accompanying drawings.

[0091] Among them, the controller described in the embodiment of the present application can be a domain controller on a vehicle (such as a vehicle), or a controller in a terminal device, or a controller in other embedded devices, or other devices with a controller including multiple processors. The embodiment of the present application does not make specific limitations.

[0092] For example, the terminal devices described in the embodiments of the present application may include but are not limited to smartphones (including foldable screen phones and non-foldable screen phones), netbooks, tablet computers, smart watches, smart bracelets, phone watches, smart cameras, PDAs, personal computers (PCs), robots, personal digital assistants (PDAs), portable multimedia players (PMPs), augmented reality (AR) / virtual reality (VR) devices, smart home devices, televisions, projection devices, or somatosensory game consoles in human-computer interaction scenarios. The embedded devices described in the embodiments of the present application may include but are not limited to printers, copiers, fax machines, biochemical analyzers, blood analyzers, switches, routers, industrial computers, drones, automated teller machines (ATMs), etc. The embodiments of the present application do not specifically limit the specific functions and types of the devices including the controller.

[0093] For example, please refer to FIG4 , which takes a domain controller including multiple SoCs as an example and shows a schematic structural diagram of a controller provided in an embodiment of the present application.

[0094] As shown in FIG4 , domain controller 400 may include a DCU 410 and corresponding multiple ECUs 420, wherein DCU 410 includes multiple high-computing processors (where FIG4 illustrates the processors as SoCs as an example). There is a communication connection between DCU 410 and ECU 420. Multiple SoCs in DCU 410 may also be communicated with each other.

[0095] Among them, SoC is a circuit with information processing capabilities. In one implementation, SoC can be a circuit with instruction reading and operation capabilities, such as a CPU, MPU, GPU, DSP, ADC, DAC, modulation and demodulation processor, etc.; in another implementation, SoC can implement certain functions through the logical relationship of a hardware circuit, and the logical relationship of the hardware circuit is fixed or reconfigurable, such as a hardware circuit implemented by an application-specific integrated circuit (ASIC) or a programmable logic device (PLD) of SoC, such as a field-programmable gate array (FPGA). In a reconfigurable hardware circuit, the process of SoC loading a configuration document and implementing the hardware circuit configuration can be understood as the process of SoC loading instructions to implement the functions of some or all of the above units. In addition, it can also be a hardware circuit designed for artificial intelligence, which can be understood as an ASIC, such as a neural network processing unit (NPU), a tensor processing unit (TPU), a deep learning processing unit (DPU), etc.

[0096] Among them, different SoCs can be independent devices or integrated together, which is not limited in the embodiments of the present application.

[0097] The SoC may also include memory for storing instructions and data. In some embodiments, the memory in the SoC is a high-speed cache memory. This memory can store instructions or data that have just been used or are recycled by the SoC. If the SoC needs to use the same instruction or data again, it can directly call it from the memory. This avoids repeated accesses, reduces SoC latency, and thus improves system efficiency.

[0098] In some embodiments, the SoC may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.

[0099] It should be understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is merely illustrative and does not constitute a structural limitation on the domain controller. In other embodiments of the present application, the domain controller may also adopt a different interface connection method from the above embodiments, or a combination of multiple interface connection methods.

[0100] The CPU is the computing and control core of the SoC. It consists of an arithmetic unit (ALU), a controller, registers, and a data, control, and status bus that connects them. The CPU's operating principle can be divided into four stages: fetch, decode, execute, and writeback. For example, the CPU can fetch instructions from memory or cache, place them in the instruction register, decode the instructions, and execute them.

[0101] MPU can be understood as a small CPU that can perform the functions that a CPU can perform.

[0102] A GPU is a microprocessor that processes graphics and is used for rendering images. A SoC may include one or more GPUs that execute program instructions to generate or change display information.

[0103] DSPs are used to process digital signals, not only digital image signals but also other digital signals. For example, using a computer or dedicated processing equipment, DSPs can collect, transform, filter, evaluate, enhance, compress, and identify digital signals to produce the desired signal format.

[0104] ADCs are primarily used to convert analog signals from the real world, such as temperature, pressure, sound, fingerprints, or images, into digital form that is easier to process. The DAC performs the opposite function of the ADC, modulating digital signals into analog signals.

[0105] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium- or high-frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. In some embodiments, the modem processor may be a standalone device. In other embodiments, the modem processor may be independent of the SoC and housed in the same device as other functional modules.

[0106] The NPU is a neural network (NN) computing processor. Drawing on the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it rapidly processes input information and can continuously self-learn. The NPU enables intelligent cognitive applications in domain controllers, such as image recognition, face recognition, speech recognition, and text comprehension.

[0107] TPU is used to accelerate the calculation of neural networks.

[0108] The DPU is a programmable engine specifically designed for convolutional neural networks (CNNs). The DPU can include a register configuration module, a data controller module, and a convolutional computation module. Convolutional neural networks deployed in the DPU can include, but are not limited to, visual geometry group (VGG), residual neural network (ResNet), YOLO (you only look once), single-shot multiBox detector (SSD), lightweight neural networks (such as MobileNet), and feature pyramid network (FPN).

[0109] ECU 420 is used to appropriately reduce the frequency and specifications of DCU 410, and integrates peripheral interfaces such as memory, counters, USB, A / D conversion, UART, PLC, direct memory access (DMA), and even display driver circuits on a single chip, forming a chip-level computer that provides different control combinations for different applications.

[0110] It should be understood that the structure illustrated in the embodiments of the present invention does not constitute a specific limitation on the domain controller. In other embodiments of the present application, the domain controller may include more or fewer components than shown, or may combine or separate certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0111] In addition, the DCU described in the embodiments of the present application is merely an example of a domain controller. The embodiments of the present application do not limit the specific naming and function of the domain controller. For example, the domain controller may also include a DCM (domain control module) or an MDC (multi-domain controller). The ECU described in the embodiments of the present application is merely an example of a control unit. The embodiments of the present application do not limit the specific naming and function of the control unit. For example, the control unit may also include a microcontroller unit (MCU).

[0112] The resource allocation method provided in the embodiment of the present application will be described in detail below with reference to the accompanying drawings.

[0113] As an example, the resource allocation method provided in the embodiment of the present application can be executed after the controller is powered on.

[0114] As an example, the resource allocation method provided in the embodiments of the present application can be executed when the business application corresponding to the controller changes. Exemplarily, the change in the business application corresponding to the controller can be in an OTA scenario, and the change in the business application can include but is not limited to an increase in business applications, a decrease in business applications, a business change, etc.

[0115] As an example, the resource allocation method provided in the embodiment of the present application can be executed when a preset condition is met. For example, the preset condition may include but is not limited to being at a preset time, meeting a preset period, receiving a preset user operation, etc.

[0116] The embodiment of the present application does not limit the execution timing of the resource allocation method, which may depend on the specific settings.

[0117] In some embodiments, the resource allocation method provided in the embodiments of the present application can be directly applied to a controller, such as but not limited to a domain controller (such as a domain controller on a vehicle or other means of transport), a terminal device, or a controller in another embedded device. For example, terminal devices include smartphones, tablet computers, PCs, robots, smart home devices, etc.; embedded devices include switches, industrial computers, etc., which are not limited in the embodiments of the present application. Based on this method, the resources of multiple processors in the controller can be efficiently and reasonably allocated or adjusted for multiple business applications of a domain controller, a terminal device, or another embedded device.

[0118] In some embodiments, the resource allocation method provided in the embodiments of the present application can be applied to a resource allocation simulation device. The resource allocation simulation device can obtain a resource configuration policy for a controller, such as a domain controller, a terminal device, or a controller in another embedded device, based on the resource allocation method provided in the embodiments of the present application, and act on the controller, ultimately achieving efficient and reasonable allocation or adjustment of resources of multiple processors in the controller for multiple business applications of the domain controller, terminal device, or other embedded device.

[0119] Taking resource allocation based on a resource allocation simulation device as an example, please refer to Figure 5(a), which shows a diagram of a resource configuration system architecture. The architecture shown in Figure 5(a) consists of a resource allocation simulation device and a controller. The resource allocation simulation device is used to determine resource configuration plans for multiple processors in the controller based on resource allocation or adjustment instructions from a person responsible for resource adjustment (e.g., person A) and resource configuration-related information for the controller, and then apply the plan to the controller.

[0120] Whether directly applied to the controller or based on a resource allocation simulation device to perform controller resource allocation / adjustment, the resource allocation scheme for allocating multiple processors in the controller to multiple business applications based on controller resource configuration-related information may mainly include stages 1 to 4 shown in (b) of Figure 5:

[0121] Phase 1: Simulation Deployment

[0122] Phase 1 is used to determine the topological relationship between multiple business applications that multiple processors in the controller are responsible for, the communication protocols followed by multiple business applications, and the deployment strategies of multiple business applications based on resource configuration related information for the controller (such as the first resource configuration strategy).

[0123] Among them, the topological relationship between multiple business applications is used to represent the association relationship (or "transmission and reception relationship") between multiple business applications and the communication interface between multiple applications. For example, Figure 6 shows a schematic diagram of the topological relationship of multiple business applications. Among them, there is a business association between APP1 and APP4, for example, the function of APP1 depends on the relevant data of APP4, and the communication interface between APP1 and APP4 is i3; there is a business association between APP2 and both APP1 and APP4, for example, the function of APP2 depends on the relevant data of APP1 and APP4, the communication interface between APP2 and APP1 is i1, and the communication interface between APP2 and APP4 is i4; there is a business association between APP3 and both APP2 and APP4, for example, the function of APP3 depends on the relevant data of APP2 and APP4, the communication interface between APP3 and APP2 is i2, and the communication interface between APP3 and APP4 is i5.

[0124] The communication protocols followed by multiple business applications, such as TCP, shared memory (SHM) protocol, distributed shared memory (DSHM) protocol, etc., are not specifically limited in the embodiments of this application.

[0125] The deployment policies of the multiple business applications represent one or more of the nodes, scheduling policies, priority policies, and lifecycle policies where the business applications are located when running in the controller.

[0126] Among them, the node where the business application is running in the controller is such as which processor it is running on, or, for a multi-core processor, the node where the business application is running in the controller is such as which core of which processor it is running on. Among them, "core" can also be understood as "processing unit". The scheduling policy of the business application when running in the controller may include but is not limited to the completely fair scheduler (CFS) policy, the round robin (RR) policy, etc., which is not limited in the embodiments of the present application, and specific reference can be made to conventional technology. The priority policy of the business application when running in the controller represents the order in which multiple business applications are called when running in the controller. The life cycle policy of the business application when running in the controller represents the task running / sleeping time policy of the business application. Among them, when the task of the business application is running, the business application needs to use the resources allocated to it by the controller; when the task of the business application is dormant, the business application will release the resources allocated to it by the controller. The task running / sleeping time of the business application may be periodic or based on event triggering. As an example, the lifecycle policy may generally be related to the function of the business application, the current controller operation scenario, the preset cycle, etc., and the embodiments of this application do not make specific limitations, and specific reference may be made to conventional technologies.

[0127] For example, the first resource configuration policy may be a file that complies with an AP specification protocol, such as an ARXML file. The ARXML file includes, but is not limited to, the topological relationships between multiple business applications that are run by multiple processors in the controller, the communication protocols followed by the multiple business applications, and the deployment strategies of the multiple business applications.

[0128] As a possible implementation method, when the resource allocation simulation device executes the resource allocation method described in the embodiment of the present application, the resource allocation simulation device can directly obtain the first resource configuration policy from the controller to evaluate the current resource deployment status of the controller and further optimize the deployment.

[0129] As a possible implementation method, in stage 1, the first resource configuration strategy can be analyzed through developed tools / platforms / models to obtain the topological relationship between multiple business applications that are responsible for multiple processors in the controller, the communication protocols followed by multiple business applications, and the deployment strategies of multiple business applications.

[0130] For example, as shown in FIG7 , after receiving the first resource configuration policy input by person A through the first input channel provided by the resource allocation or adjustment function on the first interface, the resource allocation simulation device or controller can determine the topological relationship between the multiple business applications that the multiple processors in the controller are responsible for, the communication protocol followed by the multiple business applications, and the deployment strategy of the multiple business applications according to the first resource configuration policy. As an example, the first interface can be an existing tool development interface or tool optimization interface, such as the AUTOSAR platform interface, the ADSFI platform interface, the MMC interface, etc. Of course, the embodiment of the present application does not limit the input interface and input method of the first resource configuration policy. For example, the first interface can also be other interfaces with a resource configuration policy input channel. For example, person A can use drag and drop to input the first resource configuration policy to the first interface.

[0131] Among them, after determining the topological relationship between the multiple business applications that the multiple processors in the controller are responsible for, the communication protocols followed by the multiple business applications, and the deployment strategies of the multiple business applications, the resource allocation simulation device or controller can also display the above results so that person A can intuitively understand the current resource configuration situation and facilitate person A to perform subsequent related operations, such as tuning, resource allocation, solution export, etc. Exemplarily, the resource allocation simulation device or controller can draw the topological relationship between the multiple processors of the controller and the business applications that the multiple processors are responsible for on a first interface according to a first resource configuration strategy, and match other resource configuration situations, such as the communication protocols followed by the multiple business applications and the deployment strategies of the multiple business applications, to corresponding processing units or business application nodes according to the first resource configuration strategy.

[0132] Phase 2: Simulation Run

[0133] Phase 2 is used to determine the current deployment status of multiple processors in the controller according to the first resource configuration strategy, such as resource allocation status and neural network configuration status.

[0134] The resource allocation includes, but is not limited to, one or more of the following: the load of the processing unit in each of the multiple processors, the memory load of each of the multiple processors, the processing unit corresponding to each of the multiple business applications, the QoS level corresponding to each of the multiple business applications, and the runtime latency corresponding to each of the multiple business applications. The neural network configuration includes, but is not limited to, one or more of the following: the type of neural network, the processing unit deployed by the neural network, and the acceleration operator.

[0135] As a possible implementation, in Phase 2, the execution files of multiple business applications can be simulated based on the first resource allocation policy to obtain the current deployment status, such as the resource allocation status of multiple processors in the controller and the neural network configuration status. The execution files of the business applications can include the application code of the business applications.

[0136] For example, a specific method for obtaining the current deployment status, such as resource allocation status and neural network configuration status, of multiple processors in the controller may be as follows:

[0137] In some examples, when simulating the execution of multiple business application execution files based on the first resource allocation policy, the receiving ports and sending ports of the multiple business applications can be determined based on the topological relationships between the multiple business applications and the code generated during their execution. Based on the receiving ports and sending ports of the multiple business applications, the corresponding processing unit of each business application can be determined.

[0138] In some examples, when simulating the operation files of multiple business applications based on the first resource configuration strategy, the load of the processing unit in each of the multiple processors can be obtained based on the data processing volume and / or the frequency of data processing of the processing unit in each of the multiple processors, the memory load of each of the multiple processors can be obtained based on the amount of data stored in the memory of each of the multiple processors, the memory occupancy rate, etc., and the QoS level corresponding to each business application in the multiple business applications can be obtained based on the communication quality between the multiple processors and / or the communication quality between the multiple processing units in the processor. The embodiments of this application do not limit the basis and specific method for determining the QoS level based on the communication quality.

[0139] In some examples, when simulating the operation of multiple business application execution files based on the first resource configuration policy, the runtime latency corresponding to each of the multiple business applications can be obtained based on pre-set rules. For example, the runtime latency corresponding to each business application can be obtained based on the runtime latency of the processor processing the same business and / or the runtime latency of the processing unit processing the same business. The runtime latency can be global latency or local latency. The calculation basis and specific method of the runtime latency are not specifically limited in the embodiments of this application and depend on specific needs and configuration policies.

[0140] In some examples, when simulating the operation files of multiple business applications based on the first resource configuration strategy, the processing unit deployed by the neural network can be determined based on the processing unit corresponding to each business application in the multiple business applications and its business type. It can be understood that the business that the controller is responsible for running can generally be divided into two categories, one is ordinary CPU business, and the other is neural network analysis business. For the neural network analysis business, when the controller is running, it is usually necessary to perform related resource initialization, resource management, and resource loading through a dedicated port. Based on this, the processing unit deployed by the neural network can be determined based on the interface used by the controller when running the business.

[0141] In some examples, when simulating the operation files of multiple business applications based on the first resource allocation strategy, if it is determined that the business is a neural network analysis business, a deep neural network model can be imported, such as the open neural network exchange (ONNX) model, and the neural network configuration can be obtained by parsing the ONNX model, such as one or more of the following: neural network type, processing unit deployed by the neural network, and acceleration operator. Among them, the neural network type may include but is not limited to VGG, ResNet, YOLO, SSD, MobileNet, and FPN. The processing unit deployed by the neural network may include AI computing core (AI core, AIC), AI vector acceleration core (AI vector core, AIV), etc. The acceleration operator refers to the acceleration operator supported by the acceleration interface of the controller supporting the acceleration operator, such as the Turbo application programming interface (API). Among them, the Turbo API is a series of interface sets for realizing computing acceleration. The acceleration operator can rely on the NPU to implement matrix acceleration operations, or can rely on the CPU to run the operating system or perform complex logical calculations. The acceleration operator may include but is not limited to the sin function, cos function, SortIdx function, etc.

[0142] In some examples, when simulating the running of multiple business application running files based on the first resource configuration strategy, the load of the corresponding processing unit can also be further updated based on the resource usage such as resource consumption and resource preemption of the processing unit deployed by the neural network when processing the neural network analysis business.

[0143] Phase 3: Deployment and Tuning

[0144] Phase 3 is used to adjust the controller's resource allocation strategy and / or neural network configuration to obtain a more optimal resource allocation solution.

[0145] For example, when the resource allocation situation is not satisfactory after the simulation is run (eg, does not meet the preset conditions), deployment tuning may be triggered.

[0146] As a possible implementation method, deployment optimization can be achieved mainly through the following S3.1-S3.2:

[0147] S3.1: Simulate running the corresponding operation files of multiple business applications based on the obtained acceleration operators in N different scenarios to obtain N corresponding acceleration results.

[0148] Each acceleration result represents the time consumption (i.e., the duration required) and the resources required to run the acceleration operator in the corresponding scenario.

[0149] As a possible implementation, S3.1 may specifically include: first, performing a self-search based on the application code of the business application to identify the processing units corresponding to the interfaces supporting the acceleration operators and the acceleration operators they support. Then, based on the specific conditions of the processing units supporting the acceleration operators and the acceleration operators they support, simulate running the corresponding operation files of multiple business applications based on the acceleration operators in N different scenarios to obtain N corresponding acceleration results.

[0150] The N different scenarios may be customized / automatically determined by the resource allocation simulation device, or may be obtained by the resource allocation simulation device according to a customized operation of a user.

[0151] For example, a user can customize N different scenarios through one or more of the following methods: custom selection of the interface to be accelerated, custom selection of the acceleration operator used by the interface, custom selection of the acceleration strategy for the acceleration interface, custom selection of the processing unit, custom selection of the duration required to run the acceleration operator, custom selection of the resources required to run the acceleration operator, etc. For example, a user can customize the N different scenarios described above through a second interface, which can be an existing tool development interface or tool optimization interface, such as an AUTOSAR platform interface, an ADSFI platform interface, an MMC interface, etc., which is not limited in the embodiments of this application.

[0152] As an example, when running APP1, APP2 and APP3, the specific situations of the processor supporting acceleration operators and the situations of the supported acceleration operators are shown in the following Table 1. There are a maximum of 3 acceleration scenarios when running APP1, a maximum of 3 acceleration scenarios when running APP1, and a maximum of 3 acceleration scenarios when running APP3.

[0153] Table 1

[0154] Based on the situation shown in Table 1, the user can set up to 3×3×3=27 acceleration scenarios when running APP1, APP2 and APP3.

[0155] For example, when a user runs the execution files corresponding to multiple business applications based on the acquired acceleration operators in the scenario shown in Table 1, the obtained acceleration results may be as shown in the following Table 2:

[0156] Table 2

[0157] As shown in Table 2 above, when SoC 1 is used to run the runtime file of APP1 based on the acceleration operator Sin, the CPU duration cost (or "time cost") is 10.5 and the resource cost is 5, the duration cost for AIC is 8.5 and the resource cost is 10, and the duration cost for AIV is 6 and the resource cost is 6. Similarly, as shown in Table 2 above, when SoC 1 is used to run the runtime file of APP2 based on the acceleration operator Cos, the CPU duration cost is 10.5 and the resource cost is 7, the duration cost for AIC is 6 and the resource cost is 8, and the duration cost for AIV is 7 and the resource cost is 9. When SoC 1 is used to run the runtime file of APP3 based on the acceleration operator Cos, the CPU duration cost is 5.5 and the resource cost is 1, the duration cost for AIC is 20.5 and the resource cost is 4, and the duration cost for AIV is 18 and the resource cost is 3.

[0158] The duration cost shown in Table 2 represents the required duration. A larger duration cost value indicates a longer duration, while a smaller duration cost value indicates a shorter duration. The resource cost represents the required resources, such as computing resources (e.g., CPU resources, AIC resources, AIV resources, etc.), storage resources, and bandwidth resources. A larger resource cost value indicates more resources are required, while a smaller resource cost value indicates fewer resources are required.

[0159] For example, the duration cost or resource cost shown in Table 2 can be obtained based on a predefined evaluation basis, evaluation method, or calculation formula. For example, the duration cost can be a global duration cost or a local duration cost; the resource cost can be calculated based on the weighted load of multiple types of resources (such as CPU, memory, bandwidth, AIC, and AIV), such that the greater the load on the CPU / memory / bandwidth / AIC / AIV, the greater the resource cost, and the smaller the load on the CPU / memory / bandwidth / AIC / AIV, the smaller the resource cost.

[0160] As an example, when running the running file corresponding to a business application (such as APP1) based on the acquired acceleration operator in the scenario shown in Table 1, the resource load may be as shown in the following Table 3:

[0161] Table 3

[0162] That is to say, when SoC 1 is used to run the running file of APP1, the CPU load is 45%, the memory load is 75%, the bandwidth load is 55%, the AIC load is 50%, and the AIV load is 55%; when SoC 2 is used to run the running file of APP1, the CPU load is 60%, the memory load is 80%, the bandwidth load is 45%, the AIC load is 15%, and the AIV load is 75%; when SoC 3 is used to run the running file of APP1, the CPU load is 55%, the memory load is 30%, the bandwidth load is 30%, the AIC load is 73%, and the AIV load is 49%.

[0163] It should be noted that the embodiments of this application do not specifically limit the specific calculation method of the duration cost and resource cost.

[0164] S3.2: Adjust the resource configuration strategy and / or neural network configuration of the controller according to the N acceleration results obtained to obtain an adjustment result.

[0165] As an example, S3.2 may include: first, determining an optimal acceleration result based on the N obtained acceleration results; then, adjusting a resource configuration strategy (e.g., a first resource configuration strategy) and / or a neural network configuration (e.g., a first neural network configuration) of the controller based on the determined optimal acceleration result to obtain an adjustment result. The adjustment result includes an adjusted resource configuration strategy (e.g., a second resource configuration strategy) and / or an adjusted neural network configuration (e.g., a second neural network configuration).

[0166] As an example, the first resource configuration strategy and / or the first neural network configuration of the controller can be adjusted according to the N acceleration results based on a preset tuning method.

[0167] For example, the preset tuning method may be a tuning method based on an adaptive recommendation algorithm. The adaptive recommendation algorithm may include, but is not limited to, an algorithm for solving the knapsack problem. The knapsack problem can be described as: given a set of items, each item has its own weight and price. Within the total weight limit of the backpack, how do we choose to maximize the total price of the items? For example, there are N (N is a positive integer greater than 1) items and a backpack with a load-bearing capacity of V. The weight of the i-th item is w[i] and the value is v[i]. We need to solve which of the N items can be put into the backpack so that the total weight of these items does not exceed the load-bearing capacity of the backpack and the total value is the largest. The characteristics of the knapsack problem are: there is only one of each item, and you can choose to put it in or not.

[0168] For example, if f[i][v] represents the maximum value that can be obtained by putting the first i items into a backpack with a capacity of v, if we only consider the strategy of putting the i-th item (putting it in or not), then it can be transformed into a problem involving only the first i-1 items. Specifically, if the i-th item is not put in, then the problem is transformed into "putting the first i-1 items into a backpack with a capacity of v", with a value of f[i-1][v]. If the i-th item is put in, then the problem is transformed into "putting the first i-1 items into the backpack with a remaining capacity of vw[i]. The maximum value that can be obtained at this time is f[i-1][vw[i]] plus the value v[i] obtained by putting the i-th item in.

[0169] For example, the overall state transition equation is as follows:

[0170] f[i][v]=max{f[i-1][v],f[i-1][vw[i]]+v[i]}.

[0171] It should be noted that the above state transition equation only provides a solution to the knapsack problem. If each item has multiple different attributes (such as the time cost and resource cost shown in Table 2), a similar solution algorithm can also be used to obtain the optimal solution.

[0172] For example, for the examples shown in Table 2, multiple first preferred scenarios can be determined based on the duration costs under multiple scenarios, multiple second preferred scenarios can be determined based on the resource costs under multiple scenarios, and then the optimal scenario can be determined based on the multiple first preferred scenarios and the multiple second preferred scenarios, such as being in multiple first preferred scenarios and multiple second preferred scenarios at the same time. The specific algorithm is not limited in the embodiments of this application. For another example, for the examples shown in Table 2, the optimal scenario can be determined based on the duration costs and resource costs under multiple scenarios according to the knapsack problem of two-dimensional costs. Among them, the knapsack problem of two-dimensional costs means: for each item, there are two different costs; choosing this item requires paying both costs (such as the duration cost and resource cost described in Table 1) at the same time; for each cost, there is a maximum value that can be paid (knapsack capacity), and how we choose the item can get the greatest value. Regarding the knapsack problem of two-dimensional costs and the specific solution algorithm, you can refer to conventional technology, and the embodiments of this application do not limit it.

[0173] For another example, when each item has K (K is an integer greater than 2) different attributes, the optimal solution can also be obtained by using the corresponding K-dimensional cost knapsack problem solution algorithm.

[0174] In addition, it should be noted that Table 2 above only shows an example of an acceleration result, and the present embodiment does not limit the attributes corresponding to the specific scenario represented by the acceleration result. For example, the acceleration result can also represent other related costs.

[0175] Also, it should be noted that the embodiments of the present application do not limit the specific data on which the acceleration results are obtained and the method of obtaining the specific data. For example, the specific data on which the acceleration results are obtained may include the intermediate data generated when the running files corresponding to multiple business applications are run based on the acceleration operator in each scenario. Among them, the intermediate data can be obtained by, but not limited to, one or more of the following methods: inserting piles, setting an intermediate data acquisition model. Inserting piles refers to inserting corresponding code "piles" at the corresponding positions of the running files of the business application to print or collect the data we need. Setting an intermediate data acquisition model refers to setting an intermediate data acquisition model to realize printing or collecting the data at the corresponding positions when running the running files of the business application we need. Regarding the specific methods and processes for obtaining intermediate data, please refer to the introduction of conventional technology.

[0176] It should be noted that the above-mentioned deployment tuning stage only takes the tuning based on the adaptive recommendation algorithm as an example, and the embodiments of the present application do not specifically limit the deployment tuning method. For example, in some embodiments, manual tuning can also be used to adjust the resource configuration strategy and / or neural network configuration of the controller to obtain an adjustment result. For example, in other embodiments, the resource configuration strategy and / or neural network configuration of the controller can also be adjusted based on a tuning method based on historical experience to obtain an adjustment result. Alternatively, in other embodiments, the resource configuration strategy and / or neural network configuration of the controller can be adjusted in combination with any multiple of manual tuning, tuning based on historical experience, and tuning based on an adaptive recommendation algorithm to obtain an adjustment result.

[0177] In addition, the deployment tuning stage described in the embodiment of the present application may be achieved through a single tuning, or may be achieved through multiple cycles of tuning and evaluation of the tuning results to optimize the tuning results. The embodiment of the present application does not make any specific limitations on this.

[0178] As an example, please refer to Figure 8, which shows a schematic diagram of several deployment tuning methods provided in an embodiment of the present application. Deployment tuning can be achieved through one or more of manual tuning, tuning based on historical experience, and tuning based on an adaptive recommendation algorithm, as shown in Figure 8.

[0179] For example, manual tuning can be used to optimize resource configuration strategies, neural network configurations, or resource allocation. Resource configuration strategies include topology relationships, communication protocols, and deployment strategies; neural network configurations include neural network types, processing units deployed within the neural network, and accelerators; and resource allocations include computing resource deployment, memory resource deployment, and bandwidth resource deployment. Tuning based on historical experience can include, but is not limited to, deployment adjustments based on controller functionality, processing unit functionality, and usage scenarios.

[0180] As mentioned above, traditional resource allocation methods such as manual tuning or historical experience-based tuning require manual allocation or adjustment, which consumes a lot of manpower and material resources, and the manually allocated or adjusted resources cannot be considered globally, so the resource utilization rate is not high, which will cause resource waste. As shown in Figure 8, the method based on adaptive recommendation algorithm tuning provided by the embodiment of the present application can adjust the resource allocation strategy and / or neural network configuration based on multiple acceleration results obtained when simulating the operation of application files of business applications in various scenarios, such as adjusting the topology relationship, communication protocol, deployment strategy, neural network type, processing unit deployed by the neural network, acceleration operator, etc. Based on the method based on adaptive recommendation algorithm tuning provided by the embodiment of the present application, the optimal scenario that can achieve high efficiency, low latency and high resource utilization from a global perspective can be obtained by simulating the operation and result evaluation of business applications in multiple scenarios, and the risks and advantages and disadvantages of various deployment scenarios can be identified in advance, so that scientific and reasonable resource allocation strategy and / or neural network configuration adjustment can be made according to one or more of the interface selection, acceleration operator selection, acceleration strategy selection, processing unit selection, etc. corresponding to the optimal scenario, as well as further resource allocation solution tuning.

[0181] Furthermore, in some examples, in order to make the performance of the neural network better, the embodiments of the present application can also optimize the neural network model according to the configuration of the neural network when simulating the operation of the neural network analysis business based on the first resource allocation strategy. Exemplarily, the optimization method may include but is not limited to hyperparameter optimization, quantization optimization, pruning optimization, etc. Among them, hyperparameter optimization refers to the manual adjustment of hyperparameters in the neural network model, such as the adjustment of the learning rate and batch size (batch_size). Quantization optimization refers to adjusting the accuracy of data calculation and access memory technology, such as INT4 quantization. Pruning tuning refers to building the number of model parameters to achieve the use of smaller memory, smaller processors and fewer hardware resources to deploy the model without affecting the neural network model.

[0182] As an example, after adjusting the resource configuration strategy and / or neural network configuration, the second resource configuration strategy in the adjustment result represents the topological relationship between multiple business applications and the application information of each business application in the multiple business applications, where the application information includes the communication strategy and deployment strategy of the corresponding business application.

[0183] For example, in an OTA scenario, the increase, decrease, or change of business applications may lead to topological relationships between multiple business applications. In this case, the topological relationships between multiple business applications can be modified according to the changes in business applications, such as deleting a business application, adding a business application, or modifying the association relationship between business applications.

[0184] The communication strategy represents the communication interface used by the business application when running in the controller, as well as the communication protocol, message structure (Struct) and callback type (CallType) corresponding to the communication interface. For example, the communication protocol may include but is not limited to TCP, SHM, DSHM protocols, etc. The message structure can be represented by the information type / information name carried by the message, etc. For example, the information type / information name may include but is not limited to navigation information (navigationinfo), chassis information (chassis), positioning information (locationinfo), etc. The callback type may include but is not limited to mixed callback (Field), event callback (Event), remote call callback (Method), etc., where Field means that both Event and Method are supported.

[0185] The deployment strategy represents one or more of the node, scheduling strategy, priority strategy, and lifecycle strategy where the business application is running in the controller; the second neural network configuration in the obtained adjustment result includes one or more of the following: neural network type, processing unit where the neural network is deployed, and acceleration operator.

[0186] As an example, after adjusting the communication strategy of the service application, the communication strategy shown in Table 4 may be obtained:

[0187] Table 4

[0188] As an example, after adjusting the deployment strategy of the business application, the deployment strategy shown in Table 5 may be obtained:

[0189] Table 5

[0190] Alternatively, for a multi-core SoC including multiple processing units, as shown in Table 6 below, the node where the business application is running in the obtained deployment strategy can also be specified to the core number.

[0191] Table 6

[0192] As an example, after adjusting the neural network configuration, the neural network configuration shown in Table 7 may be obtained:

[0193] Table 7

[0194] In some embodiments, after adjusting the resource configuration strategy and / or neural network configuration of the controller according to the N acceleration results obtained and obtaining the adjustment result (such as the second resource configuration strategy and / or the second neural network configuration), the adjustment result may also be displayed on the first interface to notify user A of the adjustment of the resource configuration strategy and / or the neural network configuration, so that user A can know the relevant situation, or so that user A can manually modify or take further measures (such as re-executing stage 2 and stage 3, etc.) when he is not satisfied with the resource configuration strategy and / or the neural network configuration adjustment. The embodiments of the present application are not specifically limited. For example, after adjusting the resource configuration strategy and / or neural network configuration of the controller according to the N acceleration results obtained and obtaining the adjustment result (such as the second resource configuration strategy and / or the second neural network configuration), one or more adjustment results similar to those in Tables 4 to 7 may also be displayed on the first interface.

[0195] Phase 4: Resource Allocation

[0196] Phase 4 is used to allocate or adjust the resources of multiple processors in the controller for multiple business applications.

[0197] For example, as shown in FIG8 , after adjusting the resource allocation strategy and / or neural network configuration based on multiple acceleration results obtained when simulating the runtime of application files of business applications in various scenarios, the resources of multiple processors of the controller can be allocated to multiple business applications based on the adjusted resource allocation strategy (e.g., the second resource allocation strategy) and / or the adjusted neural network configuration (e.g., the second neural network configuration), such as computing resource deployment, memory resource deployment, bandwidth resource deployment, etc. Computing resources include CPU resources, AIC resources, AIV resources, etc.

[0198] As an example, corresponding SoCs, or corresponding SoCs and more specific core numbers, may be allocated to multiple business applications according to the adjusted deployment strategy.

[0199] As an example, corresponding processing units, such as CPU resources or parallel computing resources (such as AIC or AIV), can be allocated to multiple business applications based on the adjusted neural network configuration.

[0200] In some embodiments, after allocating or adjusting the resources of multiple processors in the controller for multiple business applications according to the second resource allocation policy and / or the second neural network configuration, the first interface may also display resource allocation evaluation results for the multiple processes of the controller after resource allocation. The resource allocation evaluation results may include, but are not limited to, resource load evaluation results and / or latency evaluation results. For example, the resource allocation evaluation results may be as shown in Table 8 below:

[0201] Table 8

[0202] It can be understood that based on the resource allocation method provided in the embodiment of the present application, when the controller is powered on, the preset conditions are met, or the business application corresponding to the controller changes, the resource allocation simulation device or the controller itself can determine the topological relationship between the multiple business applications that the multiple processors in the controller are responsible for, the communication protocol followed by the multiple business applications, and the deployment strategy of the multiple business applications through simulation deployment, and then determine the current deployment status of the multiple processors in the controller (such as resource allocation status and neural network configuration status) through simulation operation, and then adjust the resource configuration strategy and / or neural network configuration of the controller through deployment tuning to obtain a better resource allocation solution, and finally allocate the resources of the multiple processors in the controller to their corresponding multiple business applications based on the results of deployment tuning. Based on this, resource allocation can be realized automatically from the overall perspective of the controller, the efficiency of resource allocation or adjustment to multiple processors can be improved, the rationality and scientificity of resource allocation or adjustment can be improved, and the low latency and low power consumption of communication in the process of the domain controller executing the corresponding business can be ensured.

[0203] It should be noted that Tables 1 to 8 above are only examples. In actual applications, they do not limit the specific circumstances of the acceleration operators supported by the processor, the specific circumstances of the acceleration results obtained, the specific circumstances of the resource load when running the running files corresponding to multiple business applications based on the obtained acceleration operators, and the communication strategy, deployment strategy, neural network configuration of the business applications adjusted after deployment and tuning, as well as the resource allocation evaluation results after resource allocation based on the tuning results.

[0204] In addition, the methods provided in the embodiments of the present application are applicable to any controller (such as a domain controller, a controller in a terminal device, a controller in an embedded device, etc.), and are not limited to the number of processors included in the controller, the number of business applications corresponding to the controller, etc. For example, the methods provided in the embodiments of the present application are also applicable to multiple virtual machines on a single SoC. Furthermore, the methods provided in the embodiments of the present application can also be applied to resource allocation in scenarios such as multi-hardware separation.

[0205] As an example, please refer to Figure 9, which shows a flow chart of the resource allocation method provided in an embodiment of the present application. As shown in Figure 9, the resource allocation method provided in an embodiment of the present application may mainly include S901-S904:

[0206] S901: The first device obtains a first resource allocation result and a first neural network configuration of the controller. The first resource allocation result indicates resource allocation of multiple processors among multiple business applications when the multiple processors of the controller run multiple business applications. The first neural network configuration indicates the neural network configuration when the multiple processors of the controller run multiple business applications.

[0207] The first device may be a controller or a resource allocation simulation device. The controller may be a domain controller on a vehicle, such as an intelligent driving domain controller, a cockpit domain controller, a chassis domain controller, a power domain controller, or a body domain controller. The controller may be DCU 410 as shown in FIG4 ; the controller may include multiple processors (e.g., multiple SoCs as shown in FIG4 ), which are used to run multiple business applications.

[0208] As an example, the first resource allocation result includes one or more of the following: a load of a processing unit in each of the multiple processors, a memory load of each of the multiple processors, a processing unit corresponding to each of the multiple business applications, a QoS level corresponding to each of the multiple business applications, and a runtime latency corresponding to each of the multiple business applications. The first neural network configuration includes one or more of the following: a neural network type, a processing unit where the neural network is deployed, and an acceleration operator.

[0209] As an example, the first device may first obtain a first resource configuration policy, and then simulate running the operation files of multiple business applications based on the first resource configuration policy to obtain the first resource allocation results and the first neural network configuration of the runtime controllers of the multiple business applications.

[0210] As an example, the first device obtains the first resource configuration policy when the controller is powered on, a preset condition is met, or a business application corresponding to the controller changes.

[0211] As an example, the first device may display a first interface including a first input channel, wherein the first input channel allows a user to input a resource configuration policy, and the first device may receive the first resource configuration policy input by the user through the first input channel. For example, the first interface may be a tool development interface or a tool optimization interface corresponding to the controller.

[0212] S902: When the first resource allocation result does not meet the preset condition, the first device simulates running the operation files corresponding to the multiple business applications based on the acquired acceleration operator in N different scenarios, and obtains corresponding N acceleration results. Each acceleration result represents the time and resources required to run the acceleration operator in the corresponding scenario.

[0213] As a possible implementation method, the first device can first perform self-search in combination with the application code of the business application to identify the processing unit corresponding to the interface that supports the acceleration operator and the acceleration operator it supports, and then simulate the running files corresponding to multiple business applications based on the acceleration operator in N different scenarios based on the specific circumstances of the processing unit that supports the acceleration operator and the acceleration operator it supports, and obtain corresponding N acceleration results.

[0214] The N different scenarios may be customized / automatically determined by the resource allocation simulation device, or may be obtained by the resource allocation simulation device according to a customized operation of a user.

[0215] As an example, the first device can simulate running the operation files corresponding to multiple business applications based on the acquired acceleration operator in N different scenarios, and obtain the intermediate data generated when running the operation files corresponding to multiple business applications based on the acceleration operator in each of the N different scenarios, and then generate N acceleration results corresponding to the N different scenarios based on the intermediate data.

[0216] Exemplarily, the manner in which the first device obtains the intermediate data may include but is not limited to inserting and / or setting the intermediate data.

[0217] S903: The first device adjusts the first resource configuration strategy and / or the first neural network configuration of the controller according to the N acceleration results obtained to obtain an adjustment result, where the adjustment result includes a second resource configuration strategy and / or a second neural network configuration.

[0218] As an example, the first device may adjust the controller's first resource allocation strategy and / or first neural network configuration based on the N acceleration results obtained based on a preset tuning method. Exemplarily, the preset tuning method includes one or more of the following: manual tuning, tuning based on historical experience, and tuning based on an adaptive recommendation algorithm. The adaptive recommendation algorithm may include, but is not limited to, an algorithm for solving the knapsack problem.

[0219] S904: The first device allocates resources of multiple processors to multiple business applications according to the adjustment result.

[0220] The resources of the multiple processors may include, but are not limited to, one or more of the following: computing resources, memory resources, and bandwidth resources. For example, computing resources include CPU resources, AIC resources, and AIV resources.

[0221] For specific implementation details of each step in FIG9 , reference may be made to the introduction of each stage in (b) in FIG5 in the above embodiment, which will not be described in detail here.

[0222] It should be understood that the various schemes of the embodiments of the present application can be reasonably combined and used, and the explanations or descriptions of the various terms appearing in the embodiments can be referenced or explained with each other in the various embodiments, without limitation to this.

[0223] It should also be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0224] It is understandable that, in order to implement the functions of any of the above-mentioned embodiments, the controller or resource allocation simulation device includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0225] The embodiments of the present application can divide the functional modules of a controller or resource allocation simulation device with controller resource allocation capabilities. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0226] It should also be understood that the various modules in the controller or resource allocation simulation device can be implemented in software and / or hardware, without specific limitation. In other words, the electronic device is presented in the form of functional modules. The "module" here can refer to an application-specific integrated circuit (ASIC), a circuit, a processor and memory that executes one or more software or firmware programs, an integrated logic circuit, and / or other devices that can provide the above-mentioned functions.

[0227] In an optional manner, when data transmission is implemented using software, it 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 and executed on a computer, the process or function described in the embodiment of the present application is implemented in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. 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 via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. 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 or data center that includes one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disk (DVD)), or a semiconductor medium (e.g., a solid state disk (SSD)).

[0228] The steps of the method or algorithm described in conjunction with the embodiments of the present application can be implemented in hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, which can be stored in RAM, flash memory, ROM, EPROM, EEPROM, registers, hard disk, mobile hard disk, CD-ROM or any other form of storage medium well known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and storage medium can be located in an ASIC. In addition, the ASIC can be located in a controller or a resource allocation simulation device. Of course, the processor and storage medium can also exist as discrete components.

[0229] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

Claims

1. A resource allocation method, It is characterized in that Applied to a first device, the method comprises: The first device obtains a first resource allocation result and a first neural network configuration of a controller, wherein the controller includes a plurality of processors, and the plurality of processors are used to run a plurality of business applications, and the first resource allocation result includes one or more of the following: a load of a processing unit in each of the plurality of processors, a memory load of each of the plurality of processors, a processing unit corresponding to each of the plurality of business applications, a quality of service QoS level corresponding to each of the plurality of business applications, and a runtime delay corresponding to each of the plurality of business applications, and the first neural network configuration includes one or more of the following: a neural network type, a processing unit deployed by the neural network, and an acceleration operator; When the first resource allocation result does not meet the preset condition, the first device simulates running the operation files corresponding to the multiple business applications based on the acceleration operator in N different scenarios to obtain corresponding N acceleration results, each acceleration result representing the time and resources required to run the acceleration operator in the corresponding scenario; The first device adjusts the first resource configuration strategy and / or the first neural network configuration of the controller according to the N acceleration results to obtain an adjustment result, wherein the adjustment result includes a second resource configuration strategy and / or a second neural network configuration; The first device allocates resources of the multiple processors to the multiple business applications according to the adjustment result.

2. The method according to claim 1, It is characterized in that Before the first device obtains the first resource allocation result and the first neural network configuration of the controller, the method further includes: The first device acquires the first resource configuration policy, the first resource configuration policy including the topological relationship between the multiple business applications and application information of each business application among the multiple business applications, the application information including the communication protocol and deployment policy of the corresponding business application, the deployment policy indicating one or more of the node, scheduling policy, priority policy and life cycle policy where the business application is located when running in the controller, the node being a processor among the multiple processors or a processing unit on the processor; The first device acquires a first resource allocation result and a first neural network configuration of the controller, including: The first device simulates running the operation files of the multiple business applications based on the first resource configuration strategy, and obtains the first resource allocation results and the first neural network configuration of the controller when the multiple business applications are running.

3. The method according to claim 2, It is characterized in that The first device acquires the first resource configuration strategy, including: When the business application corresponding to the controller changes, the first device obtains the first resource configuration policy.

4. The method according to any one of claims 1 to 3, It is characterized in that The first device adjusts the first resource configuration strategy of the controller and / or the first neural network configuration according to the N acceleration results, including: The first device adjusts the first resource configuration strategy of the controller and / or the first neural network configuration according to the N acceleration results based on a preset tuning method, and the preset tuning method includes one or more of the following: a tuning method based on historical experience, and a tuning method based on an adaptive recommendation algorithm.

5. The method according to claim 4, It is characterized in that The first device simulates running the operation files corresponding to the multiple business applications based on the acceleration operator in N different scenarios to obtain corresponding N acceleration results, including: The first device obtains intermediate data generated when the operation files corresponding to the multiple business applications are executed based on the acceleration operator in each of the N different scenarios; The first device generates N acceleration results corresponding to the N different scenarios based on the intermediate data.

6. The method according to claim 5, It is characterized in that The first device obtains intermediate data generated when the operation files corresponding to the multiple business applications are run based on the acceleration operator in each of the N different scenarios, including: The first device obtains the intermediate data generated when the running files corresponding to the multiple business applications are run based on the acceleration operator in each of the N different scenarios by inserting a stake and / or setting an intermediate data acquisition model.

7. The method according to any one of claims 1 to 6, It is characterized in that The resources of the multiple processors include one or more of the following: computing resources, memory resources, and bandwidth resources.

8. The method according to any one of claims 2 to 7, It is characterized in that The first device acquires a first resource configuration strategy, including: The first device displays a first interface, wherein the first interface includes a first input channel; The first device receives the first resource configuration policy input by a user through the first input channel.

9. The method according to claim 8, It is characterized in that After the adjustment result is obtained, the adjustment result is also displayed on the first interface.

10. The method according to claim 8 or 9, It is characterized in that The first interface is a tool development interface or a tool optimization interface corresponding to the controller.

11. The method according to any one of claims 1 to 10, It is characterized in that The first device is the controller or a resource allocation simulation device.

12. The method according to any one of claims 1 to 11, It is characterized in that The controller is a domain controller, which can be divided into one or more of the following domains according to its function: intelligent driving domain, cockpit domain, chassis domain, power domain, and body domain.

13. The method according to any one of claims 1 to 12, It is characterized in that The processor is a system on chip (SoC).

14. The method according to any one of claims 1 to 13, It is characterized in that The controller is located on the vehicle.

15. A controller, It is characterized in that The controller includes multiple processors, and the multiple processors are used to support the controller to implement functions corresponding to multiple business applications; the controller is used to implement the method described in any one of claims 1-10 and 12-14.

16. A resource allocation simulation device, It is characterized in that The resource allocation simulation device comprises: Communication interface, used for communication between devices; a memory for storing computer program instructions; A processor is used to execute the computer program instructions to support the vehicle-mounted system to implement the method as described in any one of claims 1-10, 13-14.

17. An electronic device, It is characterized in that The electronic device includes a controller, the controller includes multiple processors, and the multiple processors are used to support the controller to implement functions corresponding to multiple business applications; the controller is used to implement the method described in any one of claims 1-10, 12-14.

18. A control system, It is characterized in that The control system includes the controller of claim 15 .

19. A vehicle, It is characterized in that The vehicle includes the controller of claim 15.

20. A readable storage medium, It is characterized in that The readable storage medium stores program instructions, and when the program instructions are executed by the device, the method according to any one of claims 1 to 14 is implemented.

21. A chip system, It is characterized in that The chip system includes a processing circuit and a storage medium, wherein the storage medium stores program instructions; when the program instructions are executed by the processing circuit, the method according to any one of claims 1 to 14 is implemented.

Citation Information

Patent Citations

  • Resource allocation method, device and system and carrying tool

    CN119025251A

  • Management system and method for automatic-driving vehicle-mounted computing resources

    CN108594819A

  • Multi-core real-time task scheduling analysis and simulation system and method

    CN114327829A

  • Parameter configuration method, device and system

    CN114564179A

  • Slice-oriented low-delay wireless resource scheduling method and system

    CN114980324A

Cited By

  • Multi-channel high-speed data routing method based on FPGA

    CN119583428A

  • Computing box carried by carrier, processing method and computer readable storage medium

    CN119872590A