Resource scheduling method and device, chip system, electronic equipment and carrier
By identifying the user scenarios of the operating system in intelligent connected cars and formulating resource scheduling strategies, cross-system resource sharing is achieved, the problem of resource isolation between operating systems is solved, and resource utilization and system stability are improved.
Patent Information
- Application Number
- CN202411146879.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2024-12-03
AI Technical Summary
The resource scheduling of each operating system in intelligent connected vehicles is isolated, resulting in unreasonable resource allocation and low utilization rate, and the inability to share resources between different systems.
By determining the user scenarios of each operating system, formulating resource scheduling strategies, cross-system resource scheduling can enable different operating systems to share resources in different user scenarios.
It improves resource utilization, ensures that the operating system meets resource requirements in different user scenarios, and enhances the system's operating stability and rationality of resource allocation.
Smart Images

Figure CN119065813A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of intelligent driving technology, and in particular to a resource scheduling method, device, chip system, electronic device and vehicle. Background Art
[0002] There are multiple operating systems running in intelligent connected cars, such as the intelligent driving system and the cockpit system. Among them, the intelligent driving system is mainly responsible for the vehicle's autonomous driving and safety, including environmental perception, path planning, decision-making and control. The cockpit system is mainly responsible for the driving experience and human-computer interaction inside the vehicle, including infotainment, instrument display, media playback and environmental control.
[0003] At present, the resource scheduling of each operating system is isolated, which leads to problems such as unreasonable resource allocation and resource utilization. For example, when the intelligent driving system needs more resources for complex path planning, the cockpit system may have idle resources, but these idle resources cannot be used by the intelligent driving system, reducing the system resource utilization. Summary of the invention
[0004] In order to improve resource utilization among multiple operating systems, embodiments of the present disclosure provide a resource scheduling method, apparatus, chip system, electronic device, and carrier.
[0005] A first aspect of the present disclosure provides a resource scheduling method, which can be used in an integrated circuit, wherein the integrated circuit runs at least a first operating system and a second operating system, and the method includes: determining a first user scenario of the first operating system; based on the first user scenario, determining a resource scheduling strategy for scheduling a first resource between the first operating system and the second operating system, wherein the first resource includes a resource shared by the first operating system and the second operating system.
[0006] Exemplarily, the first operating system is a cockpit system and the second operating system is an intelligent driving system, or the first operating system is an intelligent driving system and the second operating system is a cockpit system.
[0007] A second aspect of the present disclosure provides a resource scheduling device, which can be used in an integrated circuit, wherein the integrated circuit runs at least a first operating system and a second operating system, and the device includes: a scenario recognition unit, configured to determine a first user scenario of the first operating system; a scheduling management unit, configured to determine a resource scheduling strategy for scheduling a first resource between the first operating system and the second operating system based on the first user scenario; wherein the first resource includes resources shared by the first operating system and the second operating system.
[0008] The third aspect of the present disclosure provides a chip system, which includes a processor and a memory, wherein the memory stores computer program instructions. When the computer program instructions are executed by the processor, the chip system executes the steps of the resource scheduling method provided by the first aspect of the present disclosure and its various implementation methods.
[0009] A fourth aspect of the present disclosure provides an electronic device, which may include the chip system provided by the third aspect of the present disclosure.
[0010] The fifth aspect of the present disclosure provides a carrier, which may include the chip system provided by the third aspect of the present disclosure or the electronic device provided by the fourth aspect of the present disclosure.
[0011] The technical solution provided by the embodiments of the present disclosure can perform resource scheduling between different operating systems based on the user scenarios of each operating system. In other words, it implements cross-system resource scheduling based on user scenarios, which not only meets the resource requirements of each operating system in different user scenarios and improves the operating stability of the operating system, but also makes resource allocation more reasonable and improves resource utilization. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The above and other purposes, features and advantages of the present disclosure will become more apparent by describing the embodiments of the present disclosure in more detail in conjunction with the accompanying drawings. The accompanying drawings are used to provide a further understanding of the embodiments of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the present disclosure and do not constitute a limitation of the present disclosure. In the drawings, the same reference numerals generally represent the same components or steps.
[0013] Figure 1 It is a software and hardware architecture diagram of a cabin-and-cockpit integrated system provided by an exemplary embodiment of the present disclosure.
[0014] Figure 2 It is a flowchart of a resource scheduling method provided by an exemplary embodiment of the present disclosure.
[0015] Figure 3 It is a flowchart of step S200 of a resource scheduling method provided by an exemplary embodiment of the present disclosure.
[0016] Figure 4 is another flow chart of a resource scheduling method provided by an exemplary embodiment of the present disclosure.
[0017] Figure 5 It is a flowchart of step S250 of the resource scheduling method provided by an exemplary embodiment of the present disclosure.
[0018] Figure 6 It is a decision flow chart of a first scheduling strategy provided by an exemplary embodiment of the present disclosure.
[0019] Figure 7 It is a schematic diagram of executing a first scheduling strategy provided by an exemplary embodiment of the present disclosure.
[0020] Figure 8 is another schematic diagram of executing the first scheduling strategy provided by an exemplary embodiment of the present disclosure.
[0021] Fig. 9 It is a schematic diagram of executing the second scheduling strategy provided by an exemplary embodiment of the present disclosure.
[0022] Fig.10 It is a structural block diagram of a resource scheduling device provided by an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0023] Below, the exemplary embodiments according to the present disclosure will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all the embodiments of the present disclosure, and it should be understood that the present disclosure is not limited to the exemplary embodiments described here.
[0024] It should be noted that the relative arrangement of components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless specifically stated otherwise.
[0025] Application Overview
[0026] Intelligent connected cars are cars that integrate advanced sensors, controllers, actuators and communication systems, and can achieve functions such as autonomous driving, vehicle networking, and in-car entertainment. They collect and analyze large amounts of data to achieve a safe, efficient, comfortable and entertaining driving experience.
[0027] Smart connected cars include a wealth of driving and entertainment functions. In order to achieve these functions, multiple operating systems run in smart connected cars, such as intelligent driving systems and cockpit systems.
[0028] Among them, the intelligent driving system can realize the functions related to the automatic driving and safety of the vehicle (such as a vehicle). The functions of the intelligent driving system include but are not limited to: environmental perception, path planning and / or decision control, etc., to realize the vehicle's automatic driving related functions, such as urban / highway automatic driving, urban / highway navigation assisted driving (navigate on autopilot, NOA), valet parking, automatic parking, adaptive cruise control (adaptive cruise control, ACC), lane centering control (lane centering control, LCC), etc., as well as the realization of the automatic emergency braking system (autonomous emergency braking, AEB) related functions.
[0029] The cockpit system can realize the driving experience and human-computer interaction related functions inside the vehicle. The functions of the cockpit system include but are not limited to: infotainment, instrument display and / or human-computer interaction.
[0030] In some implementations, the intelligent driving system and the cockpit system can run in different chip systems respectively. For example, an intelligent connected car may include two chip systems, one of which runs the intelligent driving system and the other runs the cockpit system. Each operating system runs independently and can schedule the resources provided by its chip system separately. In other words, the system scheduling of the intelligent driving system and the cockpit system is isolated from each other, and resources cannot be shared between the operating systems. In other words, cross-system scheduling of resources cannot be achieved, resulting in unreasonable resource allocation and low utilization. For example, when the intelligent driving system needs more resources for complex path planning, the cockpit system may have idle resources, but these idle resources cannot be used by the intelligent driving system, which reduces resource utilization.
[0031] Exemplary Systems
[0032] An embodiment of the present disclosure provides a cabin-and-cockpit integrated system.
[0033] Figure 1 It is a software and hardware architecture diagram of a cabin-and-cockpit integrated system provided by an exemplary embodiment of the present disclosure.
[0034] In the disclosed embodiment, the cabin-driver integrated system can be applied to vehicles, which may include land vehicles, air vehicles, water vehicles, underwater vehicles, space vehicles, etc.
[0035] Among them, land vehicles may include, for example, motor vehicles (such as intelligent connected cars, trolleybuses, buses, etc.), rail vehicles (such as trains, subways, trams, etc.), various types of movable robots (such as service robots, transport robots, automated guided vehicles (AGV), unmanned ground vehicles (UGV), bionic robots (such as robot dogs), etc.), various engineering machinery and other movable land devices. Aerial vehicles may include, for example, airplanes, low-altitude aircraft, high-altitude aircraft, flying cars, drones, etc. Water vehicles may include ships, speedboats, etc. Underwater vehicles may include submarines, submersibles, underwater detectors, etc. Space vehicles may include spacecraft, space shuttles, artificial satellites, etc.
[0036] In some examples, the vehicle can be a manned vehicle, i.e., a manned vehicle, or an unmanned vehicle, i.e., an unmanned vehicle.
[0037] In the disclosed embodiment, the cockpit-driver integrated system is a comprehensive system that integrates the cockpit system and the intelligent driving system. Compared with independent cockpit systems and intelligent driving systems, the cockpit-driver integrated system has a higher degree of integration and intelligence, which is conducive to improving the driving safety, comfort and driving experience of mobile vehicles. In one embodiment, the cockpit-driver integrated system may include a hardware layer, a resource management layer and a system layer.
[0038] Among them, the hardware layer includes the hardware part of the cabin-drive integrated system, for example, an integrated circuit, which can be a chip system, such as a system on chip (SoC) 110. Exemplarily, SoC 110 may include one or more central processing units (CPU), and / or one or more graphics processing units (GPU), and / or one or more neural processing units (NPU), digital signal processors (DSP), and image signal processors (ISP). These processors can be used to provide resources to the system layer, such as providing computing power resources to the cockpit system and the intelligent driving system to support the cockpit system and the intelligent driving system to realize their functions.
[0039] In the embodiments of the present disclosure, resources refer to a general term for various hardware on an integrated circuit (e.g., SoC) used to execute tasks, run programs, and provide computing power. Exemplarily, resources may include processor resources (e.g., CPU resources, GPU resources), memory resources, storage resources, network resources, input / output (I / O) resources, etc.
[0040] In one implementation, each processor, such as a CPU, a GPU, an NPU, etc., may also be an independent device. That is, different processors may be located on different chips. Alternatively, at least one processor may be integrated on one chip, and at least one other processor may be integrated on another chip, which is not limited in the embodiments of the present disclosure.
[0041] In addition to the SoC 110 , the hardware layer may also include other hardware, such as a memory 120 and a communication interface 130 .
[0042] Among them, the memory 120 can be used for system files, application files, data files (such as cache data, high-precision map data), etc. of the intelligent driving system and the cockpit system. Exemplarily, the memory 120 may include, for example, volatile memory, such as dynamic random access memory (DRAM), static random access memory (SRAM), etc.; it may also include non-volatile memory (NVM), such as read-only memory (ROM), flash memory, etc. In some examples, the memory 120 can be a discrete device, or it can be integrated with at least part of the device of the chip system (such as at least part of the processor), such as integrated on an SoC. Some memories 120 (such as cache) can also be integrated inside the processor and become part of the processor.
[0043] In the embodiment of the present disclosure, the memory 120 also stores computer program instructions. When the computer program instructions are executed by the processor, the chip system executes the steps of the resource scheduling method provided in the embodiment of the present disclosure.
[0044] The communication interface 130 is used for communication between hardware components at the hardware layer and between the hardware layer and other components of the vehicle, such as sensors, display screens, microphones, speakers, etc. Exemplarily, the communication interface 130 may include, for example, a controller area network (CAN) interface, an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a digital video port (DVP), a peripheral component interconnect express (PCI-E) interface, a serial peripheral interface bus (SPI), a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a local interconnect network (LIN) interface, a FlexRay interface, a media oriented systems transport (MOST) interface, an Ethernet interface, etc. In one implementation, the communication interface 130 may be integrated on the SoC and become a part of the SoC to improve the system integration.
[0045] The system layer may include multiple operating systems, for example, operating system 1, operating system 2, ... operating system N. Different operating systems may be used to implement different functions of the cabin-pilot integrated system. Multiple operating systems may run in an integrated circuit, or in other words, multiple operating systems may run in a chip system.
[0046] Among them, multiple operating systems can be operating systems built based on the same system kernel, which is conducive to data interaction and sharing between multiple operating systems. Of course, multiple operating systems can also be operating systems built based on different system kernels, so as to select a more suitable operating system for implementing functions according to actual needs, wherein the system kernel can be, for example, a microkernel, a macrokernel, a hybrid kernel, an exokernel, etc. Exemplarily, taking the system layer including operating system 1 and operating system 2 as an example, operating system 1 and operating system 2 can be, for example, a real-time operating system (RTOS), a Unix real-time operating system (Quick Unix, QUX), a Linux operating system (Linux operating system), and an Android operating system. Same or different operating systems. For example: operating system 1 is a Linux operating system, and operating system 2 is an Android operating system.
[0047] In one implementation, operating system 1 may be a cockpit system for realizing the driving experience and human-computer interaction related functions inside the vehicle. Operating system 2 may be an intelligent driving system for realizing the vehicle's automatic driving and safety related functions. Alternatively, operating system 1 may be an intelligent driving system, and operating system 2 may be a cockpit system. That is, when the system layer includes multiple operating systems, the embodiments of the present disclosure do not limit the implementation of each operating system.
[0048] In one implementation, at least two operating systems may further include an interconnection interface, such as an inter-process communication (IPC) interface. In this way, different operating systems may communicate through the IPC interface to send and receive messages, share information, etc. Exemplarily, different operating systems may share load information, temperature information, computing power requirements, etc. through the IPC interface, which is not specifically limited in the embodiments of the present disclosure.
[0049] In one implementation, at least one operating system may include multiple subsystems. Taking the cockpit system as an example, the cockpit system may include multiple subsystems, and the number and functions of the subsystems in the cockpit system may be determined based on the configuration of the cockpit. Exemplarily, taking the cockpit including an instrument panel, a central control screen and a co-pilot screen as an example, the cockpit system may include an instrument panel subsystem, a central control screen subsystem and a co-pilot screen subsystem. The instrument panel subsystem can be used to display key information of the vehicle on the vehicle's instrument panel, such as speed, rotation speed, fuel consumption, power consumption, temperature, warning information, navigation instructions, driving assistance system status, vehicle fault warning and other information. The central control screen subsystem can be used to provide the vehicle's infotainment functions, such as audio playback, video playback, navigation system, Bluetooth connection, mobile phone screen projection, etc.; and provide vehicle setting functions, such as adjusting air conditioning, seats, lights, driving mode, power output configuration, etc.; and provide vehicle driving assistance related functions, such as displaying reversing images, displaying 360-degree panoramic images, displaying relevant information obtained from other operating systems (such as intelligent driving systems), etc.; and provide vehicle human-computer interaction functions, such as voice control, gesture control, etc. The co-pilot screen subsystem can be used to provide entertainment or information services for the co-pilot occupants, such as playing music, videos, providing game content, displaying navigation information, etc.
[0050] In some examples, the cockpit system can allocate the resources it obtains to each subsystem for use, and can schedule the resources of each subsystem based on the task operation status of each subsystem, the load and / or resource requirements of each subsystem, etc. For example, if the cockpit system detects that the driver is using the dashboard to view navigation information, more resources can be allocated to the dashboard subsystem. For another example, if the cockpit system detects that the co-pilot passenger is using the co-pilot screen to watch a video, more resources can be allocated to the co-pilot screen subsystem.
[0051] The resource management layer is an intermediate layer between the hardware layer and the system layer. The resource management layer can be implemented by software, hardware, or a combination of software and hardware. The resource management layer is used to allocate resources of the hardware layer to the system layer. For example, some resources are allocated to operating system 1 and other resources are allocated to operating system 2.
[0052] In one implementation, at least part of the resources of the hardware layer can be allocated to operating system 1 or operating system 2, that is, at least part of the resources of the hardware layer can be resources shared by operating system 1 and operating system 2, and this part of the shared resources can be scheduled between operating system 2 and operating system 2. For ease of description, the resources shared by operating system 1 and operating system 2 may be referred to as first resources hereinafter.
[0053] In an example, the first resource may include all resources of the hardware layer, for example, all CPU resources, all GPU resources, all NPU resources, all I / O resources, etc. In other words, all resources of the hardware layer are resources shared by operating system 1 and operating system 2. Taking the CPU resources in the SoC as an example, assuming that the CPU includes 8 cores, these 8 cores can be allocated to both operating system 1 and operating system 2.
[0054] In another example, the first resource may include some resources of the hardware layer, such as some CPU resources, some GPU resources, some NPU resources, some I / O resources, etc. That is, some resources of the hardware layer are non-shared resources and can only be allocated to operating system 1, or can only be allocated to operating system 2, and the other resources are shared resources and can be allocated to both operating system 1 and operating system 2.
[0055] Taking the CPU resources in the SoC as an example, assume that the CPU includes 8 cores, such as core 1 to core 8. Among them, core 1 and core 2 are non-shared resources, core 1 can be allocated to operating system 1, and core 2 can be allocated to operating system 2; core 3 to core 8 are shared resources, that is, first resources, which can be allocated to both operating system 1 and operating system 2. Among them, the first resource can be fixed or dynamically adjusted. For example, core 1 to core 4 can be adjusted to non-shared resources, and core 5 to core 8 can be adjusted to shared resources.
[0056] Alternatively, 20% of the CPU resources are non-shared resources, of which 10% of the CPU resources can only be allocated to operating system 1, and the other 10% of the CPU resources can only be allocated to operating system 2. The remaining 80% of the CPU resources are shared resources, i.e., first resources, which can be allocated to both operating system 1 and operating system 2. Among them, 80% of the CPU resources can be virtualized CPU resources, that is, these 80% of the CPU resources do not correspond to one or some cores of the CPU. Of course, 80% of the CPU resources can also be resources provided by designated cores of the CPU, such as resources provided by cores 3 to 8.
[0057] In one implementation, the resource management layer can virtualize the resources of the hardware layer and dispatch the virtualized resources to the system layer for use. In other words, the resource management layer can establish and manage multiple virtual machine instances based on the resources of the hardware layer, allocate the resources of the hardware layer to each virtual machine instance, and run multiple operating systems on different virtual machine instances.
[0058] Exemplarily, the resource management layer may include a virtual machine manager hypervisor 210, which can manage the resources of the hardware layer, such as processors, memory, network resources, etc., and allocate these resources to multiple virtual machine instances, so that the operating systems running in each virtual machine instance can share these resources and run in a mutually isolated virtual environment, ensuring that the various operating systems do not interfere with each other, thereby improving the safety and reliability of the cabin-pilot integrated system. In addition, hypervisor 210 can also coordinate the requests of each operating system, map these requests to the physical hardware in the hardware layer, and return the processing results to the corresponding operating system. In addition, hypervisor 210 can also schedule resources between various virtual machine instances to ensure efficient resource utilization.
[0059] It is understood that the structure shown in the embodiment of the present disclosure does not constitute a specific limitation on the cabin-driver integrated system. Figure 1 More or fewer components, or combining some components, or splitting some components, or different arrangements of components. Figure 1 The components may be implemented in hardware, software or a combination of software and hardware.
[0060] Exemplary Methods
[0061] The present disclosure provides a resource scheduling method. Figure 1 The method is implemented in the cabin-driver integrated system shown, and can also be implemented in other software and hardware systems. For example, the method is used in an integrated circuit, and the integrated circuit runs at least a first operating system and a second operating system.
[0062] In the following embodiments, a first operating system and a second operating system are involved. The first operating system and the second operating system may be any two systems in the cabin-cockpit integrated system. For example, the first operating system may be a cockpit system, and the second operating system may be an intelligent driving system, or the first operating system may be an intelligent driving system, and the second operating system may be a cockpit system.
[0063] Accordingly, the first operating system, the second operating system and / or the resource management layer may call the processor to execute the various method steps provided in the embodiments of the present disclosure. For example, part of the method steps are executed by the first operating system calling the processor, part of the method steps are executed by the second operating system calling the processor, and part of the method steps are executed by the resource management layer calling the processor. This can be flexibly designed during specific implementation, and the embodiments of the present disclosure do not limit this.
[0064] Among them, the first operating system, the second operating system and / or the resource management layer calling the processor to execute the various method steps provided by the embodiments of the present disclosure can also be described as the first operating system, the second operating system and / or the resource management layer executing the various method steps provided by the embodiments of the present disclosure.
[0065] Figure 2 It is a flowchart of a resource scheduling method provided by an exemplary embodiment of the present disclosure.
[0066] like Figure 2 As shown, in some embodiments, the resource scheduling method may include the steps of:
[0067] Step S100: determining a first user scenario of a first operating system.
[0068] The first user scenario may be a current user scenario of the first operating system.
[0069] In the embodiments of the present disclosure, there are many ways to set the user scenario.
[0070] In a first implementation, a user scenario may be set based on the state of the vehicle, where the state of the vehicle may include, for example, a driving state, a parking state, etc. Exemplarily, the user scenario may include, but is not limited to, at least one of the following:
[0071] Driving scene: the vehicle is in driving state;
[0072] Parking scene: the vehicle is in parking state;
[0073] Intelligent driving scenario: The vehicle is moving and the intelligent driving function is turned on.
[0074] Human driving scenario: The vehicle is moving and the intelligent driving function is turned off.
[0075] In a second implementation, user scenarios may be divided based on the system state of the operating system, where the system state may include, for example, a standby state, a screen-on state, a screen-off state, an active state, a charging state, etc. Exemplarily, the user scenarios include but are not limited to at least one of the following:
[0076] Standby scenario: the operating system is in standby mode;
[0077] Screen-on scenario: the operating system is in standby + screen-on state;
[0078] Screen off scenario: the operating system is in standby + screen off state;
[0079] Activity scenario: The operating system is playing music, playing videos, running game applications, etc.
[0080] In a third implementation, user scenarios may be divided based on the input state of the operating system, where the input state may include, for example, a touch input state, a voice input state, a visual input state, etc. Exemplarily, the user scenario includes but is not limited to at least one of the following:
[0081] Touch scenario: The user is performing a touch operation on the user interface of the operating system.
[0082] Voice scenario: The operating system is performing voice recognition;
[0083] Visual scene: The operating system is performing visual recognition.
[0084] In a fourth implementation, user scenarios may be divided based on the application state of the operating system. Exemplarily, the user scenarios of the operating system include but are not limited to at least one of the following:
[0085] Game scenario: the operating system is running a game application;
[0086] Video scenario: The operating system is running a video application;
[0087] Music scenario: the operating system is running a music application;
[0088] Navigation scenario: the operating system is running a map application;
[0089] Download scenario: The operating system application is downloading content.
[0090] In other implementations, the above-mentioned methods of dividing user scenarios can also be used in combination to form richer user scenarios. For example, the above-mentioned division methods in the first implementation and the fourth implementation are combined, then the user scenarios can also include smart driving + video scenarios, parking + game scenarios, etc.
[0091] In other implementations, the user scenarios can be further split to obtain more user scenarios. For example, the smart driving scenario can be further split into a high-speed smart driving scenario, a city smart driving scenario, an automatic parking scenario, and the like.
[0092] In other implementations, multiple user scenarios can be aggregated to simplify the number of user scenarios. For example, touch scenarios, voice scenarios, and visual scenarios can be aggregated into interactive scenarios; smart driving scenarios and human driving scenarios can be aggregated into driving scenarios; game scenarios, video scenarios, music scenarios, navigation scenarios, and download scenarios can be aggregated into activity scenarios, etc.
[0093] The embodiments of the present disclosure do not specifically limit the manner of dividing user scenarios.
[0094] The above is an exemplary description of the setting method of the user scenario. It can be understood that due to the different functions of different operating systems, the user scenarios contained in different operating systems may also be different. In addition, the operating system may include more user scenarios, or fewer user scenarios, or other methods may be used to divide user scenarios. Of course, users can also personalize user scenarios, and the operating system can also update user scenarios through over-the-air (OTA) and other methods, thereby continuously enriching user scenarios, all of which do not exceed the protection scope of the embodiments of the present disclosure.
[0095] In one embodiment, step S100 may be executed by the first operating system calling the processor.
[0096] The first operating system may determine the first user scenario in multiple ways.
[0097] In one implementation, application information currently running in the first operating system may be obtained, and the first user scenario may be determined based on the obtained application information.
[0098] The application information may include the name, package name, and / or process name of the application currently running in the first operating system, so that the first operating system can determine which applications are currently running based on the acquired application information, and further determine the first user scenario. The application name can be "WeChat", the package name can be "com.tencent.xin", and the process name can be "WeChat.exe".
[0099] Exemplarily, if the application information of the intelligent driving application is obtained, it can be determined that the intelligent driving application is running, and then, it can be determined that the first application scenario is the intelligent driving scenario.
[0100] Generally speaking, the running applications may include applications running in the foreground and applications running in the background. Among them, the application running in the foreground may be referred to as the foreground application, and "running in the foreground" here means that the application is running and displaying content on the display screen. In an example, the foreground application may specifically include a foreground focus application and a foreground non-focus application, wherein the foreground focus application includes an application that displays content on the display screen and is being operated by the user, and the foreground non-focus application includes an application that is displayed on the display screen but is not operated by the user. Correspondingly, the application running in the background may be referred to as the background application, and "running in the background" here means that the application is running but does not display content on the display screen.
[0101] When an application is running in the foreground, it usually means that the application is currently being used by the user. For example, when the user is watching a video (such as a video scene), the video application can be run in the foreground to play the video content, etc. When an application is running in the background, it usually means that the application is not currently being used by the user. For example, when the user is not watching a video, the video application can be switched to the background, and when the user is not using navigation, the map application can be switched to the background.
[0102] It can be seen that the foreground application is more helpful to accurately determine the first user scenario of the first operating system. Then, in one implementation, the foreground application information in the first operating system can be obtained, and the first user scenario is determined based on the obtained foreground application information.
[0103] In addition, the first operating system can allow multiple applications to run in the foreground. For example, the first operating system can simultaneously display the interfaces of multiple applications on the display screen by means of split screen, card window or floating window, for example, simultaneously displaying the interface of the map application and the interface of the music application. In this case, the foreground application information acquired by the first operating system may include application information of multiple applications. For example, it includes application information of the map application and music information of the music application. In this case, the first user scenario determined by the first operating system may include multiple, for example, the first user scenario may include a navigation scenario and a music scenario.
[0104] In one implementation, the first user scenario may be determined based on the vehicle state. For example, if the vehicle is in a driving state, such as the vehicle is in gear D, the first user scenario may be determined to be a driving scenario. If the vehicle is in a parking state, such as the vehicle is in gear P, the first user scenario may be determined to be a parking scenario.
[0105] In one implementation, the first user scenario may be determined based on the system state of the first operating system. For example, if the first operating system is in a standby state, the first user scenario may be determined to be a standby scenario. If the first operating system is in a screen-on state, the first user scenario may be determined to be a screen-on scenario.
[0106] In one implementation, the first user scenario may be determined based on the input state of the first operating system. For example, if the first operating system is in a touch input state, such as responding to a user's touch operation, the first user scenario may be determined to be a touch scenario. If the first operating system is in a voice input state, such as receiving or recognizing a user's voice, the first user scenario may be determined to be a voice scenario.
[0107] In one implementation, the above-mentioned methods of determining the first user scenario can also be used in combination, so that the first user scenario can be further subdivided to perform resource scheduling at a finer granularity. Exemplarily, the first user scenario can be determined based on the state of the vehicle and the state of the application. For example, if the vehicle is in a driving state and the intelligent driving application is running, it can be determined that the first user scenario is an intelligent driving scenario. For another example, if the vehicle is in a driving state and the intelligent driving application is not running, it can be determined that the first user scenario is a human driving scenario.
[0108] The above is an illustrative description of the method for determining the first user scenario. It can be understood that the above examples are only partial examples of determining the first user scenario, rather than all examples. In actual applications, other methods of determining the first user scenario can be set based on the application scenarios of the embodiments of the present disclosure, the division method of user scenarios, the functions of the operating system, etc., and these do not exceed the protection scope of the embodiments of the present disclosure.
[0109] Step S200: determining a resource scheduling strategy for scheduling a first resource between a first operating system and a second operating system based on a first user scenario.
[0110] In one embodiment, step S200 may be executed by the first operating system calling the processor.
[0111] The first resource includes resources shared by the first operating system and the second operating system.
[0112] Generally speaking, when the chip system is initially running, for example, when the chip system is powered on, the resource management layer may initially allocate the first resource to the first operating system and / or the second operating system. During the historical operation of the chip system, the first resource may also be scheduled, thereby changing the allocation state of the first resource. Therefore, before executing step S200, the first resource may have multiple allocation states, which are exemplarily described below:
[0113] The first allocation state: the first resource has been fully allocated to the first operating system and / or the second operating system. For example, 50% of the first resource is allocated to the first operating system, and the other 50% of the first resource is allocated to the second operating system. Alternatively, 40% of the first resource is allocated to the first operating system, and the other 60% of the first resource is allocated to the second operating system. Alternatively, the first resource has been fully allocated to the first operating system, and the second operating system has not obtained the first resource. Alternatively, the first resource has been fully allocated to the second operating system, and the first operating system has not obtained the first resource.
[0114] In the second allocation situation, only part of the first resources are allocated to the first operating system and / or the second operating system. For example, 40% of the first resources are allocated to the first operating system, another 50% of the first resources are allocated to the second operating system, and the remaining 10% of the first resources are unallocated.
[0115] Based on various allocation states of the first resource, there may be multiple resource scheduling strategies. Taking the scheduling of the first resource between the cockpit system and the intelligent driving system as an example, the resource scheduling strategy may include:
[0116] Strategy 1: Schedule at least part of the first resource allocated to the cockpit system to the intelligent driving system.
[0117] Strategy 2: Dispatch at least part of the first resource allocated to the intelligent driving system to the cockpit system.
[0118] Strategy 3: Scheduling at least part of the unallocated first resource to the cockpit system.
[0119] Strategy 4: Schedule at least part of the unallocated first resources to the intelligent driving system.
[0120] Taking into account that the resource demands of the cockpit system and the intelligent driving system will be different in different user scenarios, a resource scheduling strategy can be determined based on the first user scenario, and the resource scheduling strategy can be used to schedule the first resource between the cockpit system and the intelligent driving system, thereby meeting the resource demands of the cockpit system and the intelligent driving system in different user scenarios.
[0121] The following is an exemplary description of a method for determining a resource scheduling strategy based on the first user scenario:
[0122] When the first user scenario is a driving scenario, an intelligent driving scenario, or a human driving scenario, it is necessary to prioritize the intelligent driving system to obtain more resources to ensure that the intelligent driving system can stably provide intelligent driving or vehicle safety-related functions, such as automatic driving, adaptive cruise control, lane centering (lane keeping) control, automatic emergency braking, etc. In this case, the first resource can be dispatched from the cockpit system to the intelligent driving system. Therefore, strategy 1 and / or strategy 4 can be selected.
[0123] When the first user scenario is a parking scenario, the intelligent driving system will turn off the intelligent driving related functions and enter the standby state or other non-intelligent driving state, with low demand for resources. In this case, the first resource can be dispatched from the intelligent driving system to the cockpit system. Therefore, strategy 2 and / or strategy 3 can be selected.
[0124] The resource scheduling method of the embodiment of the present disclosure provides a cross-system resource scheduling mechanism, which can implement cross-system resource scheduling between a first operating system and a second operating system based on a first user scenario, not only making the resources obtained by each operating system meet the needs of the first user scenario, but also making resource allocation more reasonable, improving resource utilization, and improving the efficiency and stability of operating system operation.
[0125] Figure 3 It is a flowchart of step S200 of a resource scheduling method provided by an exemplary embodiment of the present disclosure.
[0126] like Figure 3 As shown, in one embodiment, step S200 can be implemented by the following steps:
[0127] Step S210: determining a first resource state of a first operating system.
[0128] Wherein, step S210 may be executed by the first operating system calling a processor. After determining the first resource state, the first operating system may send the first resource state to the second operating system through an IPC interface.
[0129] In one implementation, the first resource state includes the load state of the first operating system, such as the current load. In a specific implementation, a performance management tool or a load monitoring tool may be run in the first operating system to monitor and obtain the load state of the first operating system through the performance management tool or the load monitoring tool. Exemplarily, the load state of the first operating system may include the utilization rate of the resources obtained by the first operating system, such as CPU utilization rate, GPU utilization rate, NPU utilization rate, etc.
[0130] In one implementation, the first resource state may further include a load change of the first operating system in a future period of time. The future period of time may be, for example, a few seconds or minutes in the future, and the embodiments of the present disclosure do not limit this. In a specific implementation, the load change of the first operating system may be estimated based on the first user scenario to predict the load change of the first operating system in the future period of time.
[0131] Taking the cockpit system as the first operating system and the video scene as the first user scenario as an example, when the video application plays a video at a certain resolution, frame rate, and bit rate, the resources consumed by the video application are predictable. Based on this, the load change of the cockpit system in the future (for example, the remaining time before the end of the video playback) can be predicted. Among them, the resources expected to be consumed by playing videos with different resolutions, frame rates, and bit rates can be obtained through local or cloud historical data statistics, which are not specifically limited here.
[0132] Taking the first operating system as the intelligent driving system and the first user scenario as the intelligent driving scenario as an example, when the intelligent driving application is executing a high-speed intelligent driving task, the resources consumed by the intelligent driving application are predictable. Based on this, the load changes of the intelligent driving system in the future (for example, the remaining time before the end of this intelligent driving) can be predicted. Among them, the resources expected to be consumed by the high-speed intelligent driving task can be obtained through historical data statistics locally or in the cloud, and no specific limitation is made here.
[0133] Taking the first operating system as the intelligent driving system and the first user scenario as the intelligent driving scenario as an example, when the intelligent driving application is performing an urban intelligent driving task, the resources consumed by the intelligent driving application may fluctuate. For example, in sections / time periods with fewer vehicles and simple road conditions, such as urban elevated roads / non-peak hours in the morning and evening, the intelligent driving application consumes fewer resources. In sections / time periods with more vehicles and complex road conditions, such as intersections / peak hours in the morning and evening, the intelligent driving application consumes more resources. Based on this, the time period when the vehicle passes through each section can be estimated based on the intelligent driving route, so as to predict the resource consumption of the intelligent driving application in each time period, and then predict the load changes of the intelligent driving system in the future (for example, in the remaining time before the end of this intelligent driving). Among them, the resources expected to be consumed by urban intelligent driving tasks can be obtained through historical data statistics locally or in the cloud, and no specific limitation is made here.
[0134] In this way, based on the first resource state, the first operating system can determine the proportion of its own idle resources and the proportion of its used resources, thereby providing a basis for determining a resource scheduling strategy.
[0135] Step S220: determining a resource scheduling strategy based on the first user scenario and the first resource state.
[0136] Wherein, step S220 may be executed by the first operating system calling the processor.
[0137] Exemplarily, the resource scheduling strategy may include scheduling the first resource from the first operating system to the second operating system, or scheduling the first resource from the second operating system to the first operating system.
[0138] Take the cockpit system as the first operating system and the intelligent driving system as the second operating system as an example:
[0139] When the first user scenario is a driving scenario, it is necessary to give priority to the resource supply of the second operating system. In this case, it can be determined whether resource scheduling needs to be performed based on the first resource state. If resource scheduling needs to be performed, the resource scheduling strategy may include: scheduling the first resource from the first operating system to the second operating system.
[0140] When the first user scenario is a parking scenario, the second operating system will exit the intelligent driving related functions. In this case, it can be determined whether resource scheduling can be performed based on the first resource status. If resource scheduling can be performed, the resource scheduling strategy may include: scheduling the first resource from the second operating system to the first operating system.
[0141] The method provided in the embodiment of the present disclosure determines a resource scheduling strategy based on the user scenario and resource status of the first operating system, and can match the resources obtained by the first operating system with its resource requirements in various user scenarios, thereby ensuring that various applications in the first operating system can run efficiently and stably, thereby improving system reliability.
[0142] Figure 4 is another flow chart of a resource scheduling method provided by an exemplary embodiment of the present disclosure.
[0143] like Figure 4 As shown, in one embodiment, the resource scheduling method may further include the following steps:
[0144] Step S100, determining a first user scenario of a first operating system.
[0145] Step S210: determining a first resource state of a first operating system.
[0146] Step S230: determine a second user scenario of the second operating system.
[0147] The second user scenario may be a current user scenario of the second operating system.
[0148] Wherein, step S230 may be executed by the second operating system calling the processor. After determining the second user scenario, the second operating system may send the second user scenario to the first operating system through the IPC interface.
[0149] The second operating system can determine the second user scenario in a variety of ways. For example, the application information currently running in the second operating system can be obtained, and the second user scenario can be determined based on the obtained application information. The foreground application information in the second operating system can be obtained, and the second user scenario can be determined based on the obtained foreground application information. The second user scenario can be determined based on the vehicle state. The second user scenario can be determined based on the system state of the second operating system. The second user scenario can be determined based on the input state of the second operating system.
[0150] Regarding the second operating system determining the unexpanded content of the second user scenario, please refer to the way in which the first operating system determines the first user scenario, which will not be repeated here.
[0151] It is understandable that, since the first operating system and the second operating system have different functions and run different applications, the first user scenario and the second user scenario may be the same or different at the same time or in the same period.
[0152] Take the cockpit system as the first operating system and the intelligent driving system as the second operating system as an example:
[0153] If the vehicle is in motion and a video is playing in the first operating system, the first user scenario determined by the first operating system may be a video scenario, and the second user scenario determined by the second operating system may be a driving scenario.
[0154] If the vehicle is in a parking state and a game application is running in the first operating system, the first user scenario determined by the first operating system may be a game scenario, and the second user scenario determined by the second operating system may be a parking scenario.
[0155] Step S240: determining a second resource state of the second operating system.
[0156] In one implementation, step S240 may be executed by the second operating system calling a processor. After determining the second resource state, the second operating system may send the second resource state to the first operating system through an IPC interface.
[0157] In one implementation, the second resource state includes the load state of the second operating system, such as the current load. In a specific implementation, a performance management tool or a load monitoring tool may be run in the second operating system to monitor and obtain the load state of the second operating system through the performance management tool or the load monitoring tool. Exemplarily, the load state of the second operating system may include, for example: CPU usage, GPU usage, NPU usage, memory usage, disk usage, network usage, etc. of the second operating system.
[0158] In one implementation, the second resource state may further include a load change of the second operating system in a future period of time. The future period of time may be, for example, a few seconds or minutes in the future, which is not limited in the embodiments of the present disclosure. In a specific implementation, the load change of the second operating system may be estimated based on the second user scenario of the second operating system to predict the load change of the second operating system in the future period of time.
[0159] Regarding the unexpanded content of the second operating system determining the second resource state, please refer to the implementation of the method of the first operating system determining the first resource state, which will not be repeated here.
[0160] Step S250: determining a resource scheduling strategy based on the first user scenario, the second user scenario, the first resource state, and the second resource state.
[0161] Among them, step S250 can be executed by the first operating system calling the processor, or by the second operating system calling the processor, or step S250 can be executed in parallel by the first operating system and the second operating system calling the processor, that is, the two operating systems can each determine a resource scheduling strategy.
[0162] Figure 5 It is a flowchart of step S250 of the resource scheduling method provided by an exemplary embodiment of the present disclosure.
[0163] like Figure 5 As shown, in one embodiment, step S250 may include the following steps:
[0164] Step S251: determining a priority of a first operating system based on a first user scenario, and determining a priority of a second operating system based on a second user scenario.
[0165] In one implementation, priority rules can be set for user scenarios, and the priority rules may include the priority of the cockpit system and / or the intelligent driving system in each user scenario. The priority rules can be flexibly set by technicians, and the embodiments of this disclosure do not limit this.
[0166] Taking the example that the priority includes high priority and low priority, the priority rule may include:
[0167] When the intelligent driving system and / or cockpit system are in the driving scene, intelligent driving scene, or human driving scene, the intelligent driving system has a high priority and the cockpit system has a low priority. In other words, the priority of the intelligent driving system is higher than that of the cockpit system.
[0168] When the intelligent driving system is in the parking scene and the cockpit system is in the touch scene, voice scene, visual scene, game scene, video scene, music scene, and downloading scene, the intelligent driving system has a low priority and the cockpit system has a high priority.
[0169] When the intelligent driving system is in the human driving scenario and the cockpit system is in the navigation scenario, the intelligent driving system has a low priority and the cockpit system has a high priority.
[0170] When the cockpit system is in standby mode or the screen is off, the cockpit system has a low priority.
[0171] When the intelligent driving system is in standby mode or the screen is off, the intelligent driving system has a low priority.
[0172] In this way, the priority of the first operating system and the priority of the second operating system may be determined based on the priority rule.
[0173] Taking the first operating system as the cockpit system and the second operating system as the intelligent driving system as an example, if the first user scenario is a video scene and the second user scenario is a driving scene, then the first operating system is a low priority and the second operating system is a high priority.
[0174] In an implementation manner, priorities may also be set for user scenarios, and the user scenarios may be sorted in order of priority from high to low or from low to high.
[0175] For example, the priorities of user scenarios may include, in descending order:
[0176] Driving scene > Interaction scene > Activity scene > Parking scene > Screen on scene > Screen off scene.
[0177] Among them, driving scenes may include, for example, intelligent driving scenes and human driving scenes; interactive scenes may include, for example, touch scenes, voice scenes, and visual scenes; activity scenes may include, for example, game scenes, video scenes, music scenes, navigation scenes, and download scenes.
[0178] In this way, based on the above sorting, the priority of the first user scenario can be used as the priority of the first operating system, and the priority of the second user scenario can be used as the priority of the second operating system.
[0179] Taking the first operating system as the cockpit system and the second operating system as the intelligent driving system as an example, if the first user scenario is a video scene and the second user scenario is a driving scene, then the priority of the first user scenario is lower than the priority of the second user scenario. Accordingly, the priority of the first operating system is lower than the priority of the second operating system.
[0180] In one implementation, priority scores may also be pre-set for multiple user scenarios.
[0181] For example, the priority scores of user scenarios may be as shown in Table 1:
[0182] Table 1:
[0183] User scenarios Priority score User scenarios Priority score Intelligent driving scenarios 99 Video scene 50 Driving scene 95 Music Scene 50 Driving scene 90 Navigation Scene 50 Interaction scenes 80 Download scene 45 Touch scene 80 Parking scene 30 Voice scene 80 Screen light scene 25 Visual scene 80 Idle scene 20 Activity scene 50 Screen off scene 10 Game scene 50 … …
[0184] It should be noted here that the above priority scores are only examples and do not constitute a specific limitation on the embodiments of the present disclosure. Based on the embodiments of the present disclosure, technical personnel can adjust the priority scores of various user scenarios, and these adjustments will not exceed the protection scope of the embodiments of the present disclosure.
[0185] In this way, the priority relationship between the first operating system and the second operating system can be determined based on the priority scores of the first user scenario and the second user scenario. In other words, the priority score of the first user scenario is used as the priority score of the first operating system, and the priority score of the first user scenario is used as the priority score of the second operating system.
[0186] Taking the first operating system as the cockpit system and the second operating system as the intelligent driving system as an example, if the first user scenario is a video scene with a priority score of 50, and the second user scenario is a driving scene with a priority score of 90, then the priority of the first user scenario is lower than that of the second user scenario. Accordingly, the priority of the first operating system is lower than that of the second operating system.
[0187] Step S252: Determine a resource scheduling strategy based on the priority of the first operating system, the priority of the second operating system, the first resource state, and the second resource state.
[0188] In one implementation, step S252 may be implemented by following the steps S2521-S2523:
[0189] Step S2521, based on the first resource state, determining whether the first operating system has idle resources, and based on the second resource state, determining whether the second operating system has idle resources.
[0190] Exemplarily, the load state of the first operating system can be determined by setting a first load threshold. If the current load of the first operating system is greater than (or equal to) the first load threshold, it can be determined that the first operating system has no idle resources. If the current load of the first operating system is less than (or equal to) the first load threshold, it can be determined that the first operating system has idle resources.
[0191] For example, the first load threshold may include a utilization threshold of the first operating system for the obtained processor resources, such as a CPU utilization threshold, a GPU utilization threshold, an NPU utilization threshold, etc. The value of the first load threshold may be, for example, 80%, 85%, 88%, 90%, 91%, 92%, 93%, 94%, 95%, 96%, 97%, 98%, 99%, etc. The utilization thresholds corresponding to different processors may be the same or different.
[0192] For example, the CPU usage threshold = 90%. If the CPU usage is greater than 90%, it can be determined that the first operating system has no idle CPU resources. If the CPU usage is less than 90%, it can be determined that the first operating system has idle CPU resources.
[0193] Similarly, a second load threshold may be set for the second operating system, and the second load threshold may be the same as or different from the first load threshold. If the current load of the second operating system is greater than (or equal to) the second load threshold, it may be determined that the second operating system has no idle resources. If the current load of the second operating system is less than (or equal to) the second load threshold, it may be determined that the second operating system has idle resources.
[0194] For the contents not specifically described in determining whether the second operating system has idle resources, please refer to the method of determining whether the first operating system has idle resources for implementation, which will not be repeated here.
[0195] Step S2522: when the second operating system has no idle resources and the priority of the first operating system is lower than that of the second operating system, determine a first resource scheduling strategy, where the first resource scheduling strategy includes scheduling the first resource from the first operating system to the second operating system.
[0196] The second operating system having no idle resources may include two situations:
[0197] One situation is: the first operating system has no idle resources, and the second operating system also has no idle resources. In this case, it is necessary to give priority to ensuring that the operating system with a higher priority can run stably. Therefore, if the priority of the first operating system is lower than that of the second operating system, the first resource can be dispatched from the first operating system to the second operating system, so that the second operating system obtains more resources, avoids the situation of insufficient resources, and ensures the stable operation of the second operating system.
[0198] Another situation is that the first operating system has idle resources, but the second operating system has no idle resources. In this case, if the priority of the first operating system is lower than that of the second operating system, the first resources can be dispatched from the first operating system to the second operating system, so that the second operating system obtains more resources, avoids the situation of insufficient resources, and ensures the stable operation of the second operating system. In addition, the idle first resources in the first operating system can be used by the second operating system, thereby improving resource utilization.
[0199] Step S2523, when the first operating system has no idle resources and the priority of the first operating system is higher than that of the second operating system, determine a second resource scheduling strategy, the second resource scheduling strategy including scheduling the first resource from the second operating system to the first operating system.
[0200] The first operating system having no idle resources may include two situations:
[0201] One situation is: the first operating system has no idle resources, and the second operating system also has no idle resources. In this case, it is necessary to give priority to ensuring that the operating system with a higher priority can run stably. Therefore, if the priority of the first operating system is higher than that of the second operating system, the first resource can be dispatched from the second operating system to the first operating system, so that the first operating system obtains more resources, avoids the situation of insufficient resources, and ensures the stable operation of the first operating system.
[0202] Another situation is that the second operating system has idle resources, but the first operating system has no idle resources. In this case, if the priority of the first operating system is higher than that of the second operating system, the first resources can be dispatched from the second operating system to the first operating system, so that the first operating system obtains more resources, avoids the situation of insufficient resources, and ensures the stable operation of the first operating system. In addition, the idle first resources in the second operating system can be used by the first operating system, thereby improving resource utilization.
[0203] Figure 6 It is a decision flow chart of a first scheduling strategy provided by an exemplary embodiment of the present disclosure.
[0204] In one implementation, the first scheduling strategy may be determined by the first operating system, for example, including the following steps S310-S360:
[0205] Step S310: determining a first resource state of a first operating system.
[0206] Wherein, step S310 may be specifically implemented with reference to step S210, which will not be described in detail here. After the first operating system determines the first resource state, it may send the first resource state to the second operating system through the IPC interface.
[0207] Step S320: determining a second resource state of the second operating system.
[0208] Exemplarily, the first operating system may receive the second resource status sent by the second operating system through an IPC interface.
[0209] Step S330: Determine whether the first operating system has idle resources based on the first resource state.
[0210] Among them, step S330 can be specifically implemented with reference to step S2521, which will not be repeated here.
[0211] After the first operating system determines whether there are idle resources, the process may jump to step S350.
[0212] Step S340: Determine whether the second operating system has idle resources based on the second resource state.
[0213] Wherein, step S340 can be specifically implemented with reference to step S2521, which will not be described in detail here. If the second operating system has no idle resources, the process can jump to step S350. If the second operating system has idle resources, the process can jump to step S320.
[0214] Step S350: determine whether the priority of the first operating system is higher than the priority of the second operating system.
[0215] If the priority of the first operating system is higher than that of the second operating system, the process may jump to step S320. That is, if the priority of the first operating system is higher than that of the second operating system, even if the second operating system has no idle resources, the first operating system will not determine the first resource scheduling strategy, thereby not scheduling the first resource from the high-priority operating system to the low-priority operating system.
[0216] If the priority of the first operating system is lower than the priority of the second operating system, the process may jump to step S360.
[0217] Step S360: determine a first resource scheduling strategy.
[0218] That is to say, if the priority of the first operating system is lower than that of the second operating system, regardless of whether the first operating system has idle resources, the first operating system can determine the first scheduling policy to schedule the first resources from the low-priority first operating system to the high-priority second operating system.
[0219] Next, after determining the first resource scheduling strategy, the first resource scheduling strategy may be executed to complete resource scheduling. The following is an exemplary description of the manner of executing the first resource scheduling strategy.
[0220] In one implementation, the first resource scheduling strategy may be executed by the first operating system and the resource management layer calling the processor. Figure 6 As shown, executing the first resource scheduling strategy may include steps S370-S380:
[0221] Step S370: based on the resource demand of the second operating system, releasing the first target resource from the first resource obtained by the first operating system, the first target resource matches the resource demand of the second operating system.
[0222] Wherein, step S370 may be executed by the first operating system calling the processor.
[0223] In one example, if the second operating system has resource requirements, the second operating system can send the resource requirements to the first operating system through the IPC interface. That is, the first operating system can receive the resource requirements of the second operating system through the IPC interface. The resource requirements of the second operating system may include: the resource type and resource requirement amount required by the second operating system.
[0224] The resource types may include, for example, CPU resources, GPU resources, NPU resources, memory resources, etc. The resource requirements may include, for example, the CPU resource requirements, GPU resource requirements, NPU resource requirements, etc.
[0225] In one implementation, the second operating system may predict resources required by the second operating system in a future period of time based on the second user scenario to determine the resource requirements of the second operating system, and then send the resource requirements of the second operating system to the first operating system.
[0226] Taking the second operating system as the intelligent driving system and the second user scenario as the intelligent driving scenario as an example, assuming that the NPU resources currently obtained by the second operating system are 200TOPS (Tera Operations Per Second, referring to trillions of operations per second), the NPU resources required for intelligent driving applications in urban elevated sections are 150TOPS, and the NPU resources required for intelligent driving applications in urban mixed traffic sections are 250TOPS. Then, when the vehicle travels from the urban elevated section to the urban mixed traffic section, the second operating system needs to obtain at least 50TOPS of NPU resources to meet the computing power requirements of the intelligent driving application. In other words, in the future, for example, in the remaining time before this intelligent driving reaches the destination, the resource requirements of the second operating system include at least: 50TOPS of NPU resources.
[0227] After the first operating system obtains the resource demand of the second operating system, it can determine whether the idle resources in the first resources obtained by the first operating system (hereinafter referred to as first idle resources) match the resource demand of the second operating system.
[0228] Exemplarily, it can be determined whether the type of the first idle resource matches the type of resource required by the second operating system. For example, if the type of the first idle resource is the same as the type of resource required by the second operating system, it means that the type of the first idle resource matches the type of resource required by the second operating system. If the type of the first idle resource is different from the type of resource required by the second operating system, it means that the type of the first idle resource does not match the type of resource required by the second operating system.
[0229] For example, if the first idle resource includes CPU resources, and the second operating system requires NPU resources, then the type of the first idle resource does not match the type of resource required by the second operating system. If the first idle resource includes CPU resources, and the second operating system also requires CPU resources, then the type of the first idle resource matches the type of resource required by the second operating system.
[0230] Exemplarily, it is also possible to determine whether the resource amount of the first idle resource matches the resource amount required by the second operating system. For example, if the resource amount of the first idle resource is greater than or equal to the resource amount required by the second operating system for the same type of resource, it means that the resource amount of the first idle resource matches the resource amount required by the second operating system. If the resource amount of the first idle resource is less than the resource amount required by the second operating system for the same type of resource, it means that the resource amount of the first idle resource does not match the resource amount required by the second operating system.
[0231] For example, if the first idle resource includes 200TOPS of NPU resources and the second operating system requires 100TOPS of NPU resources, then the resource amount of the first idle resource matches the resource requirement of the second operating system. If the first idle resource includes 200TOPS of NPU resources and the second operating system requires 300TOPS of NPU resources, then the resource amount of the first idle resource does not match the resource requirement of the second operating system.
[0232] Then, if the resource type and resource amount of the first idle resource match the resource type and resource requirement of the second operating system, it can be determined that the first idle resource matches the resource requirement of the second operating system; otherwise, it can be determined that the first idle resource does not match the resource requirement of the second operating system.
[0233] In one example, the resource requirement of the second operating system may further include: the resource requirement duration of the second operating system. The resource requirement duration may be a preset duration or a predicted remaining duration of the current user scenario of the second operating system.
[0234] Exemplarily, it can also be determined whether the remaining idle duration of the first idle resource matches the resource requirement duration of the second operating system. If the remaining idle duration of the first idle resource is greater than or equal to the resource requirement duration of the second operating system, it means that the remaining idle duration of the first idle resource matches the resource requirement duration of the second operating system. If the remaining idle duration of the first idle resource is less than the resource requirement duration of the second operating system, it means that the remaining idle duration of the first idle resource does not match the resource requirement duration of the second operating system.
[0235] In this case, if the resource type, resource amount, and remaining idle time of the first idle resource match the resource type, resource requirement amount, and resource requirement time required by the second operating system, it can be determined that the first idle resource matches the resource requirement of the second operating system; otherwise, it can be determined that the first idle resource does not match the resource requirement of the second operating system.
[0236] Next, when the first idle resource matches the resource demand of the second operating system, the first operating system may release the first target resource from the first idle resource, so that the first target resource is in an unallocated state, that is, the released first target resource belongs neither to the first operating system nor to the second operating system. In some implementations, the release of the first target resource may also be performed by the resource management layer, which is not specifically limited here.
[0237] For example, Figure 7 As shown, if the first idle resources include 200TOPS of NPU resources and the second operating system requires 100TOPS of NPU resources, the first operating system can release 100TOPS of NPU resources from the first idle resources. Of course, the first operating system can also release more NPU resources from the first idle resources, such as releasing 150TOPS of NPU resources, so that more NPU resources can be scheduled to the second operating system later.
[0238] In addition, when the first idle resource does not match the resource demand of the second operating system, the first operating system may perform internal resource scheduling to obtain an idle first target resource and then release the first target resource.
[0239] Exemplarily, the first operating system may perform internal resource scheduling based on the first user scenario. Figure 8 As shown, take the cockpit system as the first operating system and the video scene as the first user scenario as an example. If the first idle resources include 10% of the total CPU resources and the second operating system requires 20% of the total CPU resources, then the first operating system can reduce the video application's CPU resource occupancy rate by reducing video bit rate, resolution, frame rate and other parameters, thereby freeing up more CPU resources. For example, free up another 10% of the total CPU resources, so that 20% of the total CPU resources can be freed up together with the original first idle resources as the first target resources, and the first target resources are released.
[0240] Similarly, if the first user scenario is a game scenario, the image quality of the game can be reduced, such as reducing the frame rate of the game, reducing the resolution, reducing the image quality of the game, reducing or turning off the animation in the game, etc., to reduce the resources occupied by the game application, thereby obtaining more idle resources. If the first user scenario is a download scenario, the download speed of the application can be reduced, or the download task can be suspended, to reduce the resources occupied by the download task, thereby obtaining more idle resources.
[0241] In addition, the first operating system can also manage and control background tasks, such as closing background tasks or reducing resources allocated to background tasks to obtain more idle resources. Closing background tasks may include, for example, closing background applications that have not been used by the user for a long time, closing background update tasks, download tasks, etc.
[0242] The embodiments of the present disclosure do not specifically limit the manner in which the operating system frees up more resources.
[0243] Step S380: dispatch the first target resource to the second operating system.
[0244] In one implementation, step S380 may be executed by invoking a processor by the resource management layer.
[0245] In one example, after releasing the first target resource, the first operating system may also send a first notification message to the resource management layer, and the first notification message user instructs the resource management layer to execute the first resource scheduling strategy. In this way, the resource management layer may schedule the first target resource to the second operating system upon receiving the first notification message. The first notification message may, for example, include the first resource scheduling strategy and the scheduled object, such as the first target resource, for instructing the resource management layer to schedule the first target resource to the second operating system.
[0246] Exemplarily, the first operating system may send a first notification message to the virtual machine manager hypervisor. After receiving the first notification message, the virtual machine manager hypervisor schedules the released first target resource to the second operating system.
[0247] For example, Figure 7 As shown, after releasing 100TOPS of NPU resources, the first operating system can send a first notification message to the hypervisor, and the first notification message instructs the hypervisor to schedule 100TOPS of NPU resources to the second operating system. The hypervisor receives the first notification message, performs resource scheduling, and schedules 100TOPS of NPU resources to the second operating system.
[0248] For example, Figure 8 As shown, after releasing 20% of the total CPU resources, the first operating system can send a first notification message to the virtual machine manager hypervisor, and the first notification message instructs the virtual machine manager hypervisor to schedule 20% of the total CPU resources to the second operating system. The virtual machine manager hypervisor receives the first notification message, performs resource scheduling, and schedules 20% of the total CPU resources to the second operating system.
[0249] In one implementation, the second scheduling policy may be decided by the second operating system, and the second resource scheduling policy may be executed by the second operating system and the resource management layer. The second operating system may decide the second scheduling policy by referring to the first operating system deciding the first scheduling policy, and the second operating system and the resource management layer may execute the second scheduling policy by referring to the first operating system and the resource management layer executing the first scheduling policy, which will not be described in detail here.
[0250] For example, Fig. 9 As shown, taking the first operating system as the cockpit system, the first user scenario as the voice scenario, the second operating system as the intelligent driving system, and the second user scenario as the parking scenario as an example:
[0251] Normally, the intelligent driving task needs to be executed in the second operating system, so most or all NPU resources will be allocated to the second operating system by default, and the first operating system can only obtain a few NPU resources, or no NPU resources. This means that when the second user scenario is a parking scenario, the second operating system will have a large number of idle NPU resources.
[0252] At the same time, when the first user scenario is a voice scenario, the speech recognition application of the first operating system may need to use a local large model to understand the voice content of the user input and give a corresponding reply. This means that the first operating system requires a large amount of NPU resources to meet the computing power requirements of the local large model. Then, in this case, the idle NPU resources (i.e., the second idle resources) in the second operating system can be released for scheduling to the first operating system.
[0253] For example, if the second idle resources include 400TOPS of NPU resources, and the resource demand of the first operating system is 300TOPS of NPU resources, then the second operating system can release 300TOPS of NPU resources from the second idle resources. Of course, the second operating system can also release more NPU resources from the second idle resources, such as releasing 350TOPS of NPU resources, or releasing 400TOPS of NPU resources, that is, releasing all idle NPU resources.
[0254] After releasing 300TOPS of NPU resources, the second operating system may send a second notification message to the hypervisor, the second notification message instructing the hypervisor to schedule 300TOPS of NPU resources to the first operating system. The hypervisor receives the second notification message, performs resource scheduling, and schedules 300TOPS of NPU resources to the first operating system.
[0255] It can be seen from the above technical solutions that the method provided by the embodiment of the present disclosure can perform resource scheduling between different operating systems based on the resource requirements of each operating system in different user scenarios. In other words, it realizes cross-system resource scheduling based on user scenarios, which not only meets the resource requirements of each operating system in different user scenarios and improves the operating stability of the operating system, but also makes resource allocation more reasonable and improves resource utilization.
[0256] Exemplary Devices
[0257] The resource scheduling method provided by the embodiment of the present disclosure is introduced above. It can be understood that in order to realize the above functions, the integrated cabin-pilot system (such as the first operating system, the second operating system and the resource management layer in the integrated cabin-pilot system) includes software modules corresponding to executing various functions.
[0258] Of course, those skilled in the art should be easily aware that, in combination with the steps of a resource scheduling method described in each embodiment of the present disclosure, the present disclosure can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in a hardware or software-driven hardware manner 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 the present disclosure.
[0259] Fig.10 It is a structural block diagram of a resource scheduling device provided by an exemplary embodiment of the present disclosure.
[0260] An embodiment of the present disclosure provides a resource scheduling device, which is used for an integrated circuit, and the integrated circuit runs at least a first operating system and a second operating system.
[0261] In one embodiment, Fig.10 As shown, the resource scheduling device for implementing each step of the resource scheduling method may include: a scene recognition unit 710, a scheduling management unit 720 and a scheduling execution unit 730. The functions of each unit may be implemented in the first operating system and / or the second operating system. Take the implementation of the functions of each unit in the first operating system as an example:
[0262] The scene recognition unit 710 is configured to determine a first user scene of the first operating system, and send the first user scene to the scheduling management unit 720. For example, the scene recognition unit 710 may determine the first user scene based on information of applications running in the first operating system.
[0263] The scheduling management unit 720 is configured to determine a resource scheduling strategy based on the first user scenario.
[0264] In one implementation, the scenario recognition unit 710 is configured to determine a first resource state of the first operating system and send the first resource state to the scheduling management unit 720. The scheduling management unit 720 is configured to determine a resource scheduling strategy based on the first user scenario and the first resource state.
[0265] In one implementation, the scheduling management unit 720 is configured to communicate with the second operating system, for example, through an IPC interface, to obtain a second user scenario and a second resource state of the second operating system, and to determine a resource scheduling strategy based on the first user scenario, the second user scenario, the first resource state, and the second resource state.
[0266] In one implementation, the scheduling management unit 720 is configured to determine the priority of the first operating system based on the first user scenario, and determine the priority of the second operating system based on the second user scenario; and determine the resource scheduling strategy based on the priority of the first operating system, the priority of the second operating system, the first resource status, and the second resource status.
[0267] In one implementation, the scheduling management unit 720 is configured to determine whether the first operating system has idle resources based on the first resource state, and determine whether the second operating system has idle resources based on the second resource state. And, if the second operating system has no idle resources and the priority of the first operating system is lower than the priority of the second operating system, determine a first resource scheduling strategy, the first resource scheduling strategy including scheduling the first resource from the first operating system to the second operating system.
[0268] In one implementation, the scheduling management unit 720 is configured to obtain the resource requirements of the second operating system, and when the idle resources in the first resources obtained by the first operating system do not match the resource requirements of the second operating system, determine the internal scheduling policy of the first operating system, and send the internal scheduling policy of the first operating system to the scheduling execution unit 730. The scheduling execution unit 730 is configured to execute the internal scheduling policy of the first operating system, perform internal resource scheduling on the first operating system, and obtain idle first target resources.
[0269] In one implementation, the scheduling execution unit 730 is further configured to release the first target resource, so that the first target resource is in an unallocated state.
[0270] In one implementation, the resource scheduling apparatus further includes a resource management unit 810 .
[0271] The scheduling management unit 720 is configured to send a resource scheduling policy (eg, a first resource scheduling policy) to the resource management unit 810. The resource management unit 810 may be configured to execute the resource scheduling policy to perform cross-system resource scheduling, for example, executing the first resource scheduling policy to schedule the first target resource to the second operating system.
[0272] In one implementation, the resource management unit 810 is configured to release the first target resource so that the first target resource is in an unallocated state. That is, the release of the first target resource can be performed by the scheduling execution unit 730 or the resource management unit 810.
[0273] In one implementation, the scheduling management unit 720 is configured to predict the resources required by the first operating system within a preset time period in the future based on the first user scenario to determine the resource demand of the first operating system.
[0274] In one implementation, the scheduling management unit 720 is configured to send the first user scenario, the first resource state, and the resource demand of the first operating system to the second operating system.
[0275] In one implementation, the function of any unit in the resource scheduling device can be implemented by multiple units cooperating with each other, that is, the resource scheduling device can include more units. For example, the resource scheduling device can also include a cross-domain scheduling unit, and at least part of the functions of the scheduling management unit 720 can be implemented by the cross-domain scheduling unit.
[0276] Exemplarily, the scheduling management unit 720 is configured to send the first user scenario and the first resource state to the cross-domain scheduling unit, or the scenario recognition unit 710 can also send the first user scenario and the first resource state to the cross-domain scheduling unit. The cross-domain scheduling unit is configured to determine a resource scheduling strategy based on the first user scenario and the first resource state.
[0277] Exemplarily, the cross-domain scheduling unit is configured to communicate with the second operating system to obtain a second user scenario and a second resource state of the second operating system, and determine a resource scheduling strategy based on the first user scenario, the second user scenario, the first resource state, and the second resource state.
[0278] Exemplarily, the cross-domain scheduling unit is configured to obtain the resource requirements of the second operating system, and send the resource scheduling policy and the resource requirements of the second operating system to the scheduling management unit 720. In this way, the scheduling management unit 720 can determine the internal scheduling policy of the first operating system based on the resource scheduling policy and the resource requirements of the second operating system.
[0279] Exemplarily, the cross-domain scheduling unit configuration may also be configured to send a resource scheduling policy (eg, a first resource scheduling policy) to the resource management unit 810 so that the resource management unit 810 executes the resource scheduling policy.
[0280] In one implementation, the functions of multiple units in the resource scheduling device may also be implemented in one unit, for example, at least two of the scene recognition unit 710, the scheduling management unit 720, and the scheduling execution unit 730 are combined into one unit. In other words, the resource scheduling device may include fewer units, which are within the scope of protection of the embodiments of the present disclosure.
[0281] In addition, in the first operating system or the second operating system, each unit of the resource scheduling device can be implemented in various ways, which is not limited in the embodiments of the present disclosure. Taking the first operating system as the Android system as an example: the scene recognition unit 710 can be located in the application framework layer of the Android system, the scheduling management unit 720 can be located in the native layer of the Android system, the scheduling execution unit 730 can be located in the kernel layer of the Android system, and the resource management unit 810 can be located in the resource management layer of the cabin-driving integrated system. For example, the resource management unit 810 can be a hypervisor of the resource management layer.
[0282] The resource scheduling device provided in the embodiment of the present disclosure can perform resource scheduling between different operating systems based on the resource requirements of each operating system in different user scenarios. In other words, it implements cross-system resource scheduling based on user scenarios, which not only meets the resource requirements of each operating system in different user scenarios and improves the operating stability of the operating system, but also makes resource allocation more reasonable and improves resource utilization.
[0283] Exemplary Electronic Devices
[0284] The present disclosure provides an electronic device that can be used in a vehicle, such as an intelligent networked car. The electronic device can be, for example, an on-board computing device, an on-board computing platform, an on-board computing unit, an intelligent driving computing platform, etc.
[0285] In one embodiment, the electronic device may include a chip system provided by an embodiment of the present disclosure, which may run at least one operating system, such as an intelligent driving system and a cockpit system, to implement relevant functions of the cabin-cockpit integrated system.
[0286] In one embodiment, the electronic device may further include:
[0287] The housing is used to accommodate and install various hardware units of the electronic equipment, protect the various hardware units from being affected by dust and water, and improve the reliability of the electronic equipment.
[0288] The power module is used to supply power to various hardware units of the electronic device.
[0289] The heat dissipation module, such as a heat dissipation fan, a liquid cooling device, etc., is used to dissipate heat for the hardware units of the electronic equipment, reduce the operating temperature of each hardware unit, and improve the operating stability of each hardware unit.
[0290] External interfaces are used to connect various sensors on the vehicle, such as cameras, lidar, millimeter-wave radar, ultrasonic radar, etc., to send instructions to each sensor or receive data sent back by the sensor. External interfaces can also be connected to various actuators of the vehicle, such as the drive system, brake system, steering system, etc., to send control instructions to each system and receive feedback from each system.
[0291] Example Vehicles
[0292] The disclosed embodiments provide a vehicle, which may include a land vehicle, an air vehicle, a water vehicle, an underwater vehicle, a space vehicle, etc. For details about the vehicle, please refer to the above embodiments, which will not be described here.
[0293] The vehicle may include a chip system or electronic device provided in an embodiment of the present disclosure to implement the resource scheduling method provided in an embodiment of the present disclosure. In this way, when a user uses the vehicle, such as driving the vehicle, or using the vehicle to watch videos, listen to music, or play games, the vehicle can perform cross-system resource scheduling between the cockpit system and the intelligent driving system based on the user scenario, providing the user with a better user experience.
[0294] Exemplary computer program products and computer-readable storage media
[0295] In addition to the above-mentioned methods and devices, an embodiment of the present disclosure may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the resource scheduling method according to various embodiments of the present disclosure described in the above-mentioned "Exemplary Method" section of this specification.
[0296] The computer program product may be written in any combination of one or more programming languages to write program code for performing the operations of the disclosed embodiments, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0297] In addition, an embodiment of the present disclosure may also be a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, enables the processor to execute the steps of the resource scheduling method according to various embodiments of the present disclosure described in the above “Exemplary Method” section of this specification.
[0298] Computer readable storage media can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0299] The basic principles of the present disclosure are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present disclosure are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present disclosure. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, and are not limitations. The above details do not limit the present disclosure to the necessity of adopting the above specific details to be implemented.
[0300] The block diagrams of the devices, apparatuses, equipment, and systems involved in this disclosure are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including," "comprising," "having," and the like are open words, referring to "including but not limited to," and can be used interchangeably therewith. The words "or" and "and" used herein refer to the words "and / or," and can be used interchangeably therewith, unless the context clearly indicates otherwise. The word "such as" used herein refers to the phrase "such as but not limited to," and can be used interchangeably therewith.
[0301] It should also be noted that in the apparatus, device and method of the present disclosure, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present disclosure.
[0302] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
[0303] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.
Claims
1. A resource scheduling method for an integrated circuit, wherein the integrated circuit runs at least a first operating system and a second operating system, the method comprising: Determining a first user scenario of the first operating system; Based on the first user scenario, a resource scheduling policy for scheduling a first resource between the first operating system and the second operating system is determined, where the first resource includes a resource shared by the first operating system and the second operating system.
2. The method according to claim 1, wherein: The first operating system is a cockpit system, and the second operating system is an intelligent driving system.
3. The method according to claim 1 or 2, wherein: The determining, based on the first user scenario, a resource scheduling strategy for scheduling a first resource between the first operating system and the second operating system includes: determining a first resource state of the first operating system; The resource scheduling strategy is determined based on the first user scenario and the first resource state.
4. The method according to claim 3, wherein: The method further comprises: Determining a second user scenario of the second operating system; determining a second resource state of the second operating system; The resource scheduling strategy is determined based on the first user scenario, the second user scenario, the first resource state, and the second resource state.
5. The method according to claim 4, wherein: The determining the resource scheduling strategy based on the first user scenario, the second user scenario, the first resource state, and the second resource state includes: Based on the first user scenario, determining a priority of the first operating system, and based on the second user scenario, determining a priority of the second operating system; The resource scheduling policy is determined based on the priority of the first operating system, the priority of the second operating system, the first resource state, and the second resource state.
6. The method according to claim 5, wherein: The determining the resource scheduling strategy based on the priority of the first operating system, the priority of the second operating system, the first resource state, and the second resource state includes: Based on the second resource state, determining whether the second operating system has idle resources; When the second operating system has no idle resources and the priority of the first operating system is lower than that of the second operating system, a first resource scheduling strategy is determined, where the first resource scheduling strategy includes scheduling the first resource from the first operating system to the second operating system.
7. The method according to claim 6, wherein: The method further comprises: Based on the resource demand of the second operating system, releasing a first target resource from the first resource already acquired by the first operating system, the first target resource matching the resource demand of the second operating system; The first target resource is scheduled to the second operating system.
8. The method according to claim 7, wherein: Also includes: In the case that idle resources in the first resources obtained by the first operating system do not match the resource requirements of the second operating system, internal resource scheduling is performed on the first operating system to obtain idle first target resources.
9. The method according to claim 7, wherein: Also includes: Based on the second user scenario, resources required by the second operating system within a preset time period in the future are predicted to determine resource requirements of the second operating system.
10. The method according to claim 6, wherein: Also includes: Based on the first resource state, determining whether the first operating system has idle resources; When the first operating system has no idle resources and the priority of the first operating system is higher than that of the second operating system, a second resource scheduling strategy is determined, where the second resource scheduling strategy includes scheduling the first resource from the second operating system to the first operating system.
11. The method according to claim 10, wherein: The method further comprises: Based on the resource demand of the first operating system, releasing a second target resource from the first resource already obtained by the second operating system, wherein the resource amount of the second target resource matches the resource demand of the first operating system; The second target resource is scheduled to the first operating system.
12. The method according to claim 11, wherein: Also includes: When the amount of free resources in the first resources obtained by the second operating system is less than the amount of resources of the second target resources, internal resource scheduling is performed on the second operating system to obtain the free second target resources.
13. The method according to claim 11, wherein: Also includes: Based on the first user scenario, resources required by the first operating system within a preset time period in the future are predicted to determine resource requirements of the first operating system.
14. The method according to any one of claims 4 to 13, wherein: The determining a first user scenario of the first operating system includes: Determining the first user scenario based on application information currently running in the first operating system; The determining a second user scenario of the second operating system includes: The second user scenario is determined based on application information currently running in the second operating system.
15. The method according to any one of claims 1 to 14, wherein: The first operating system communicates with the second operating system via an inter-process communication (IPC) interface.
16. A resource scheduling device, used for an integrated circuit, the integrated circuit running at least a first operating system and a second operating system, wherein: include: a scenario recognition unit, configured to determine a first user scenario of the first operating system; a scheduling management unit configured to determine, based on the first user scenario, a resource scheduling strategy for scheduling a first resource between the first operating system and the second operating system; The first resource includes resources shared by the first operating system and the second operating system.
17. The device according to claim 16, wherein: The first operating system is the intelligent driving system, and the second operating system is the cockpit system.
18. The device according to claim 16 or 17, wherein: The scene recognition unit is configured to determine a first resource state of the first operating system; The scheduling management unit is configured to determine the resource scheduling strategy based on the first user scenario and the first resource state.
19. The device according to claim 18, wherein The scheduling management unit is configured to obtain a second user scenario and a second resource state of the second operating system, and determine the resource scheduling strategy based on the first user scenario, the second user scenario, the first resource state, and the second resource state.
20. A chip system, wherein: It comprises a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the chip system executes the steps of the method according to any one of claims 1 to 15.
21. An electronic device comprising the chip system according to claim 20.
22. A carrier comprising the chip system according to claim 20 or the electronic device according to claim 21.
Citation Information
Cited By
Intelligent cabin dual-system CPU core dynamic sharing scheduling method, device and system
CN120994409A
