Resource scheduling method and apparatus, and electronic device

By acquiring load time-series characteristic data and predicting future load conditions using predictive models, computing resources are dynamically scheduled, solving the problems of low resource scheduling efficiency and accidental killing of task threads under sudden load scenarios, thereby improving the system performance and energy-saving capabilities of electronic devices.

WO2025261415A1PCT designated stage Publication Date: 2025-12-26HUAWEI TECH CO LTD

Patent Information

Application Number
PCT/CN2025/101865
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-06-20
Filing Date
2025-06-18
Publication Date
2025-12-26

AI Technical Summary

Technical Problem

Existing technologies struggle to quickly and accurately schedule resources when faced with sudden loads, leading to a decline in electronic device performance. In particular, resource scheduling efficiency is low and task threads are mistakenly killed under heavy loads, increasing application cold start time.

Method used

By acquiring the load time-series characteristic data of the target task, the load prediction model is used to predict the future load conditions, and computing resources are dynamically scheduled based on the prediction results. The correlation between task threads is distinguished, and the allocation of computing resources is dynamically adjusted, including scheduling lightweight tasks to run on small cores and setting heavyweight tasks to wait status, thereby improving resource utilization efficiency.

Benefits of technology

It enables fast and accurate resource scheduling under sudden load scenarios, reduces the false kill of task threads, improves system performance and energy saving capabilities, and reduces application cold start time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025101865_26122025_PF_FP_ABST
    Figure CN2025101865_26122025_PF_FP_ABST
Patent Text Reader

Abstract

A resource scheduling method and apparatus, and an electronic device, relating to the technical field of electronic devices. The method comprises: acquiring temporal load characteristic data of a target task, the target task being a task triggered by an operation of a user on a target application among at least one application running in the electronic device; determining a prediction result on the basis of the temporal load characteristic data of the target task and a load prediction model, the prediction result indicating a load condition of the target task in a future period of time; and determining a scheduling strategy on the basis of the prediction result, and scheduling computing resources in the electronic device according to the scheduling strategy, wherein a scheduling objective of the scheduling strategy comprises satisfying computing resource requirements of the target task in the future period of time. The technical solution can meet computing power requirements of an application in a sudden high-load scenario, and provide application performance.
Need to check novelty before this filing date? Find Prior Art

Description

A resource scheduling method, apparatus and electronic device

[0001] Cross-references to related applications

[0002] This application claims priority to Chinese Patent Application No. 202410808258.8, filed on June 20, 2024, entitled “A Resource Scheduling Method, Apparatus and Electronic Equipment”, the entire contents of which are incorporated herein by reference. Technical Field

[0003] This application relates to the field of electronic equipment technology, and in particular to a resource scheduling method, apparatus and electronic equipment. Background Technology

[0004] Currently, the number of application software installed on electronic device operating systems is increasing. When users run and launch many applications, each application, whether in the foreground (visible to the user or interacting with the user) or in the background (invisible to the user), consumes resources on the electronic device. The most significant resource type is the central processing unit (CPU), posing a huge challenge to improving the performance of electronic devices. Taking scenarios with sudden load surges as an example, the demand for CPU resources is large and urgent, necessitating a highly efficient, precise, and fast CPU resource scheduling method. Summary of the Invention

[0005] This application provides a resource scheduling method, apparatus, and electronic device to provide a new resource scheduling method.

[0006] Firstly, this application provides a resource scheduling method applicable to an electronic device, which includes a hardware layer and a software layer. The software layer includes at least one application program, and the hardware layer includes computing resources (such as a processor) used to run tasks of the application program. This method can be executed by the electronic device or a component of the electronic device (such as a processor). Taking processor execution as an example, the method includes: the processor acquiring load timing characteristic data of a target task, where the target task refers to a task triggered by a user's operation on an application running within the electronic device (e.g., triggered by a user operating an application through the electronic device's display screen); determining a prediction result based on the load timing characteristic data of the target task and a load prediction model, the prediction result indicating the load status of the target task over a future period; then, taking the computing resources required by the target task over the future period as the scheduling objective, determining a scheduling strategy based on the prediction result, and executing the scheduling strategy.

[0007] Through the above design, the load time-series characteristic data of the target task is obtained. Based on the load time-series characteristic data and the load prediction model, the load status of the target task in the future period is determined. Based on the prediction results, the scheduling strategy is determined. The real-time scheduling strategy dynamically schedules CPU resources to meet the computing resource requirements of the target task in heavy-load scenarios.

[0008] In one possible design, when determining the prediction result based on load time-series characteristic data and load prediction model, the prediction result can be determined based on the load time-series characteristic data of the target task, load performance events, and load prediction model; wherein, the load performance events of the target task are used to reflect the degree of consumption of computing resources by the target task.

[0009] The above design allows for the dynamic design and construction of different load performance events for different application scenarios, accurately representing the degree of computing resource consumption by different tasks, thereby improving the accuracy of load prediction. At the same time, this dynamic configuration method has strong flexibility.

[0010] In one possible design, for a target task, the relevance of each of the multiple task threads included in the electronic device to the target task is determined. These multiple task threads may be task threads of one or more applications running within the electronic device. The relevance includes being related to the target task and not being related to the target task.

[0011] The scheduling strategy includes: when computing resources are about to be overloaded, increasing the computing resources scheduled for the target task; wherein, whether computing resources are overloaded can be determined based on the prediction results of the target task and the number of available computing resources.

[0012] In one possible design, increasing the computing resources used by the target task includes: reducing the proportion of computing resources used by task threads unrelated to the target task; and / or, allocating idle computing resources to task threads running the target task.

[0013] In one possible design, task threads unrelated to the target task include: lightweight task threads and heavyweight task threads; reducing the proportion of computing resources used by task threads unrelated to the target task includes at least one of the following: scheduling lightweight task threads to run on small cores, setting heavyweight task threads to a waiting state, and increasing the frequency and / or voltage of computing resources.

[0014] The above design dynamically schedules the large, medium, and small cores where tasks reside based on the workload, achieving dynamic CPU frequency and voltage adjustment, further reducing energy consumption, and comprehensively improving system performance and energy-saving capabilities.

[0015] In one possible design, the relevance of each task thread to the target task is determined based on the application characteristics of the target task; the method further includes: obtaining relevant information about the task thread running the target task; matching the relevant information with the application characteristics included in the application characteristic library to obtain the application characteristics of the target task; wherein, the application characteristics of the target task include at least one of the following characteristics: user operation on the target application, type of the target application, and business type of the target task.

[0016] The above design matches the user's personalized load profile with relevant information of the target task and the application feature library, identifies the user's current operation, application type and business type, and can achieve adaptive identification of the target task, which has strong flexibility.

[0017] In one possible design, the relevance of each task thread to the target task is determined by calculating the relevance fitting result between each task thread and the target task based on a similarity coefficient fitting algorithm, the application characteristics of the target task, and relevant information of each task thread.

[0018] The above design calculates the correlation between each task thread and the target task based on the application characteristics of the target task and the correlation coefficient fitting algorithm, rather than simply distinguishing task threads as foreground and background tasks. Based on this correlation, more accurate resource scheduling can be achieved, avoiding the accidental killing of threads, thereby reducing the application's cold start time and improving system performance.

[0019] Secondly, this application provides another resource scheduling apparatus, comprising: modules / units for executing the methods described in the first aspect or any possible design of the first aspect; these modules / units can be implemented in hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the functions described above. In one possible design, the apparatus includes a load prediction module and a dynamic scheduling module; optionally, it may also include a task identification module and a thread classification module.

[0020] The load prediction module is used to obtain the load time-series characteristic data of the target task, which is the task triggered by the user's operation on at least one target application in the application.

[0021] The load forecasting module is also used to determine the forecasting results based on load time-series characteristic data and load forecasting models. The forecasting results indicate the load status of the target task in the future.

[0022] The dynamic scheduling module is used to determine the scheduling strategy based on the prediction results and schedule computing resources according to the scheduling strategy; wherein, the scheduling objective of the scheduling strategy includes meeting the computing resources required by the target task in the future period of time.

[0023] In one possible design, when the load prediction module determines the prediction result based on load time-series characteristic data and the load prediction model, it is specifically used to: determine the prediction result based on load time-series characteristic data, the load performance events of the target task, and the load prediction model; wherein, the load performance events are used to reflect the degree of consumption of computing resources by the target task.

[0024] In one possible design, a thread classification module is used to determine the relevance of each of the multiple task threads included in the electronic device to the target task. The multiple task threads are used to run at least one application task using the resources allocated by the computing resources. The relevance includes relevance to the target task and irrelevance to the target task.

[0025] The scheduling strategy includes increasing the computing resources used by the target task when computing resources are about to be overloaded; wherein whether computing resources are overloaded is determined based on the prediction results and the number of available computing resources.

[0026] In one possible design, when the dynamic scheduling module increases the computing resources used by the target task, it specifically performs the following actions: reducing the proportion of computing resources used by task threads unrelated to the target task; and / or scheduling idle computing resources to task threads running the target task.

[0027] In one possible design, task threads that are not related to the target task include: lightweight task threads and heavyweight task threads;

[0028] The dynamic scheduling module reduces the proportion of computing resources used by task threads that are not related to the target task by performing at least one of the following: scheduling lightweight task threads to run on small cores, setting heavyweight task threads to a waiting state, and increasing the frequency and / or voltage of computing resources.

[0029] In one possible design, the task identification module is used to match the relevant information of the task thread of the target task with the application features included in the application feature library to obtain the application features of the target task; wherein, the application features of the target task include at least one of the following features: user operation on the target application, type of the target application, and business type of the target task.

[0030] In one possible design, the thread classification module is specifically used to determine the relevance of each task thread among multiple task threads included in the electronic device to the target task. Specifically, it is used to calculate the relevance fitting result between each task thread and the target task based on the similarity coefficient fitting algorithm, the application characteristics of the target task, and the relevant information of each task thread.

[0031] Thirdly, this application provides an electronic device including at least one processor and at least one memory; wherein the one or more memories store one or more computer programs, the one or more computer programs including instructions, which, when executed by the one or more processors, cause the electronic device to perform the first aspect of this application and any possible design of the first aspect.

[0032] The fourth aspect provides a chip coupled to a memory in an electronic device for calling a computer program stored in the memory and executing the first aspect of this application and any possible design of the first aspect, or the second aspect and any possible design of the second aspect.

[0033] The fifth aspect provides a computer-readable storage medium comprising a computer program that, when executed on an electronic device, causes the electronic device to perform the technical solutions described in the first aspect and any possible design of the first aspect.

[0034] A sixth aspect provides a computer program comprising instructions that, when executed on a computer, cause the computer to perform the technical solutions described in the first aspect and any possible design thereof.

[0035] For the beneficial effects of aspects two through six, please refer to the beneficial effects of aspect one, which will not be repeated here. Attached Figure Description

[0036] Figure 1 is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;

[0037] Figure 2 is a schematic diagram of a resource scheduling architecture provided in an embodiment of this application;

[0038] Figure 3 is a schematic diagram of a resource scheduling device provided in an embodiment of this application;

[0039] Figure 4 is a flowchart illustrating a resource scheduling method provided in an embodiment of this application;

[0040] Figure 5 is a schematic diagram of a resource scheduling scenario provided in an embodiment of this application;

[0041] Figure 6 is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Detailed Implementation

[0042] This application provides a resource scheduling method that can be used to dynamically schedule computing resources within an electronic device to meet the real-time computing resource requirements of applications running within the electronic device.

[0043] In some embodiments of this application, the electronic device 100 may be a portable terminal, such as a mobile phone, tablet computer, laptop computer, wearable device (such as a smartwatch), etc. Exemplary embodiments of the aforementioned electronic device 100 include, but are not limited to, portable electronic devices running iOS, Android, Microsoft, or other operating systems. The aforementioned portable electronic device may also be other portable electronic devices, such as a digital camera. It should also be understood that in other embodiments of this application, the aforementioned electronic device 100 may not be a portable electronic device, but rather a desktop computer, in-vehicle terminal, smart screen, television, etc.

[0044] The following text takes an electronic device 100 as a mobile phone as an example. Figure 1 shows a schematic diagram of the hardware structure of a mobile phone.

[0045] As shown in Figure 1, the mobile phone includes a processor 310, an external memory interface 320, an internal memory 321, a universal serial bus (USB) interface 330, a charging management module 340, a power management module 341, a battery 342, antenna 1, antenna 2, a mobile communication module 350, a wireless communication module 360, an audio module 270, a speaker 370A, a receiver 370B, a microphone 370C, a headphone jack 370D, a sensor module 380, buttons 390, a motor 391, an indicator 392, a camera 393, a display screen 394, and a subscriber identification module (SIM) card interface 395. The sensor module 380 may include pressure sensors, gyroscope sensors, barometric pressure sensors, magnetic sensors, accelerometers, proximity sensors, proximity sensors, fingerprint sensors, temperature sensors, touch sensors, ambient light sensors, bone conduction sensors, etc.

[0046] Processor 310 may include one or more processing units. For example, processor 310 may include an application processor (AP), a modem, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). Different processing units may be independent devices, or two or more different processing units may be integrated into a single device.

[0047] The processor 310 may also include a memory for storing computer programs and / or data. In some embodiments, the memory in the processor 310 is a cache memory. This memory can store computer programs and / or data that the processor 310 has just used or that are used repeatedly. If the processor 310 needs to use the computer program and / or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 310, and thus improves the efficiency of the system.

[0048] In some embodiments, processor 310 may include one or more interfaces. For example, processor 310 includes a universal serial bus (USB) interface 330 and a subscriber identity module (SIM) interface 395. As another example, processor 310 may also include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), and / or a general-purpose input / output (GPIO) interface, etc.

[0049] It is understood that the interface connection relationships between the modules shown in Figure 1 are merely illustrative and do not constitute a limitation on the counterparty's mechanism. In other embodiments of this application, the mobile phone may also adopt an interface connection method different from that shown in Figure 1, for example, the modules may be connected via a bus.

[0050] The charging management module 340 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 340 receives charging input from the wired charger via a USB interface 330. In some wireless charging embodiments, the charging management module 340 receives wireless charging input via the phone's wireless charging coil. While charging the battery 342, the charging management module 340 can also supply power to the phone via the power management module 341.

[0051] The power management module 341 connects the battery 342, the charging management module 340, and the processor 310. The power management module 341 receives input from the battery 342 and / or the charging management module 340, providing power to the processor 310, internal memory 321, external memory, display screen 394, camera 393, and wireless communication module 360. The power management module 341 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 341 may be located within the processor 310. In other embodiments, the power management module 341 and the charging management module 340 may be located in the same device.

[0052] The wireless communication function of a mobile phone can be achieved through antenna 1, antenna 2, mobile communication module 350, wireless communication module 360, modem, and baseband processor.

[0053] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the mobile phone can be used to cover one or more communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with a tuning switch.

[0054] The mobile communication module 350 can provide solutions for wireless communication in mobile phones, including 2G / 3G / 4G / 5G standards. The mobile communication module 350 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc.

[0055] The wireless communication module 360 ​​includes solutions that can provide wireless communication applications for mobile phones, including wireless local area networks (WLAN) (such as Wi-Fi networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies.

[0056] In some embodiments, antenna 1 of the mobile phone is coupled to mobile communication module 350, and antenna 2 is coupled to wireless communication module 360, enabling the mobile phone to communicate with networks and other devices via wireless communication technology. The wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time-Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies. The GNSS may include Global Positioning System (GPS), Global Navigation Satellite System (GLONASS), BeiDou Navigation Satellite System (BDS), Quasi-Zenith Satellite System (QZSS), and / or Satellite Based Augmentation Systems (SBAS).

[0057] The mobile phone's GPU, display screen 394, and application processor enable display functions. The display screen 394 is used to display images, videos, etc. The display screen 394 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the mobile phone may include one or N displays 394, where N is a positive integer greater than 1.

[0058] A mobile phone can perform shooting functions through an ISP, camera 393, video codec, GPU, display 394, and application processor. The camera 393 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, the mobile phone may include one or N cameras 393, where N is a positive integer greater than 1.

[0059] The external storage interface 320 can be used to connect an external storage card, such as a Micro SD card, to expand the phone's storage capacity. The external storage card communicates with the processor 310 through the external storage interface 320 to perform data storage functions. For example, audio and video files can be saved on the external storage card.

[0060] The internal memory 321 includes RAM and internal storage. RAM can be used to store computer programs and / or data. The processor 310 executes various mobile phone functions and performs data processing by running the computer programs stored in RAM. For example, RAM may include high-speed random access memory. Internal storage, also known as internal external storage, can be used to store computer programs and / or data. For example, internal storage can store the operating system, applications, etc. The mobile phone typically loads the computer programs and / or data from the internal storage into RAM, causing the processor 310 to run the corresponding computer programs and / or data to perform the corresponding functions. Furthermore, the internal memory 321 may include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.

[0061] The mobile phone implements audio functions through an audio module 270, a speaker 370A, a receiver 370B, a microphone 370C, a headphone jack 370D, and an application processor. Examples include music playback and recording.

[0062] Keypad 390 includes the power button, volume buttons, etc. Keypad 390 can be a mechanical keypad or a touch-sensitive keypad. The phone can receive keypad input and generate key signal inputs related to user settings and function control.

[0063] Motor 391 can generate vibration alerts. Motor 391 can be used for incoming call vibration alerts or for touch vibration feedback. For example, touch operations applied to different applications (such as taking photos, playing audio, etc.) can correspond to different vibration feedback effects. Touch operations applied to different areas of the display screen 394 can also correspond to different vibration feedback effects from motor 391. Different application scenarios (such as time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also be customized.

[0064] Indicator 392 can be an indicator light, which can be used to indicate charging status, power changes, messages, missed calls, notifications, etc.

[0065] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the mobile phone and the vehicle-mounted system. In other embodiments of this application, the mobile phone and the vehicle-mounted system may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0066] Figure 2 is a schematic diagram of the software structure of a mobile phone according to an embodiment of this application.

[0067] Typically, mobile phones support a variety of applications (referred to as apps). These may include one or more of the following: camera apps, photo management apps, short video playback apps, browser apps, WeChat, Tencent QQ, WhatsApp Messenger, Line, Instagram, etc. These apps can be pre-installed at the factory (such as system apps, phone, SMS, calendar) or apps installed by the user according to their needs (such as WeChat, etc.). wait).

[0068] During application use, users may initiate multiple tasks. These tasks can be triggered by user actions on the phone's screen, such as opening WeChat, opening an image within WeChat, or opening a mini-program within WeChat. Alternatively, these tasks can be tasks initiated within the application itself, such as backup tasks. These tasks can be run by task threads. Specifically, the processor (such as the CPU) starts task threads and allocates computing resources to them. The task threads then use these allocated computing resources to execute their tasks. The processor periodically performs computing resource scheduling. When the computing resources allocated to a task thread cannot meet the task's requirements, the task may be interrupted or delayed. In this case, the user may perceive phenomena such as dropped frames or stuttering in the application.

[0069] Currently, applications are trending towards larger scale, higher definition, and more computationally intensive nature. On the electronic device side, this manifests as diverse load types and complex scenarios such as sudden load spikes, increasing the difficulty of resource scheduling, especially in real-time resource scheduling during sudden heavy loads. Traditional methods may involve lengthy analysis and simulation before resource scheduling, reducing processing efficiency in sudden load scenarios. Alternatively, they may fail to accurately identify resource loads during scheduling, frequently resulting in the accidental termination of task threads, further increasing application restart latency during heavy load scenarios. Therefore, how to quickly and accurately release and schedule resources appropriately in the face of sudden load scenarios has become a key issue in improving the performance of current electronic devices.

[0070] Based on this, this embodiment provides a resource scheduling system that can be used for real-time scheduling of computing resources of electronic devices. A detailed description is provided below with reference to the accompanying drawings.

[0071] Figure 3 is a schematic diagram of the architecture of a possible resource scheduling device provided in an embodiment of this application. For example, the resource scheduling device 200 shown in Figure 3 can be a functional module architecture of a software system. The resource scheduling device 200 can be run by the processor of the electronic device 100 and is used to schedule the computing resources within the electronic device 100.

[0072] The resource scheduling device 200 may include: a task identification module 201, a thread classification module 202, a load prediction module 203, and a dynamic scheduling module 204.

[0073] The task identification module 201 is used to obtain relevant information about the target task and identify the application characteristics of the target task based on the relevant information.

[0074] The thread classification module 202 is used to obtain the recognition results (i.e., the application characteristics of the task) output by the task recognition module 201, and determine the relevance between the task thread running in the electronic device and the target task based on the application characteristics of the target task.

[0075] The load prediction module 203 is used to predict the load status of the target task in the future.

[0076] The dynamic scheduling module 204 is used to schedule computing resources based on the relevance determined by the thread classification model 202 and the prediction results output by the load prediction module 203, so as to meet the computing resource requirements of the target task.

[0077] It should be noted that Figure 3 is for illustrative purposes only, and the resource scheduling device 200 may have more or fewer modules than that shown in Figure 3.

[0078] The resource scheduling method provided in this application embodiment will be described below using the resource scheduling device 200 shown in Figure 3 as an example. Figure 4 is a schematic flowchart of a resource scheduling method provided in this application embodiment. The method includes the following steps:

[0079] Step 401, (Task Identification Module 201) determines the application characteristics of the target task based on relevant information of the target task.

[0080] Specifically, this step may include: obtaining relevant information about the target task, inputting the relevant information about the target task into the application feature library for matching, and obtaining the matching application features.

[0081] The target tasks here include tasks triggered by the electronic device in response to user actions on applications installed on the device. For example, when the electronic device receives a user's tap on a game app icon on the screen, it triggers a task to launch the game app. Similarly, when the electronic device receives a user's tap on the "Scan" function in the WeChat app, it triggers a task to open the "Scan" function. Likewise, when the electronic device receives a user's tap on "Launch a Mini Program" in the WeChat app, it triggers a task to open that mini program. And when the electronic device receives a user's tap on the WeChat app to navigate to a map application, it triggers a task to open that map application, and so on.

[0082] In summary, in one embodiment, the target task includes a task triggered by an operation performed by the user in the foreground of the electronic device. It is understood that electronic devices typically focus on the user's current operation to improve the user experience. Therefore, in another embodiment, the target task refers to a task triggered by the user's current operation on the electronic device. Of course, the target task can also be triggered by other operations, or it can be a derivative task (such as a subtask) triggered by any of the aforementioned operations; this embodiment does not limit this. For ease of explanation, the following description will use the example of a target task triggered by the user's current operation in the foreground of the electronic device.

[0083] The relevant information for the target task includes, but is not limited to, at least one of the following: user actions that triggered the target task, and the target task's runtime information. User actions include operations on the display screen, such as unlocking, clicking, swiping, and dragging. The target task's runtime information may include, but is not limited to, one or more of the following: task start time, the core on which the task resides, information about the target application, and user actions (such as the user's click location on the display screen). In one example, the target task's runtime information may be recorded in the thread information of the task thread.

[0084] Application characteristics include, but are not limited to, one or more of the following: application type and business type. See Figure 5. Application types include, but are not limited to: social networking (such as WeChat), short video, shopping, news, and browser applications. Business types include, but are not limited to: web pages, mini-programs, QR code scanning, payment, image display, audio playback, and video playback.

[0085] In one implementation, when the target task is a task triggered by any current user operation, when determining the application characteristics of the target task based on relevant information of the target task, the thread information of the target task can be input into the application characteristic library for matching to obtain the application characteristics that match the target task.

[0086] In another embodiment, the target task can also refer to a task triggered by a user's current operation on an electronic device, where the current operation is a critical operation. The critical operation provided in this embodiment can be an operation that consumes significant computing resources, such as launching a game or generating a video.

[0087] For example, when identifying the application characteristics of a target task triggered by a critical operation, the user's current operation can be input into the application characteristic library first. This library has the function of identifying critical operations; for example, it includes tags for critical operations (such as unlocking, clicking, and swiping, as shown in Figure 5). If the current operation matches a critical operation in the application characteristic library, it is determined to be a critical operation. After determining that the current operation is a critical operation, the thread information of the target task is then input into the application characteristic library for matching to obtain the application characteristics of the target task. Alternatively, if the current operation does not match a critical operation in the application characteristic library, it is determined that the current operation is not a critical operation, and the following optimization process will not be executed for tasks triggered by non-critical operations.

[0088] Alternatively, when identifying the application characteristics of a target task triggered by a critical operation, the user's current operation and the thread information of the task triggered by that current operation can be simultaneously input into the application characteristic library. If the current operation is a critical operation, the application characteristics of the target task can be quickly obtained.

[0089] Among them, the labels of key operations in the application feature library can be extracted from the trace features offline or updated online, without any specific limitation.

[0090] The above design matches the user's personalized load profile with relevant information of the target task and the application feature library, and identifies the user's current operation, application type and business type, so as to achieve adaptive identification of the target task.

[0091] Step 402, (Thread Classification Module 202) determines the relevance of each task thread among multiple task threads to the target task based on the application characteristics of the target task.

[0092] Specifically, this step may include: traversing the multiple task threads, and calculating the correlation fitting result between each task thread and the target task based on the application characteristics of the target task, the thread information of the task threads, and the correlation coefficient fitting algorithm. The multiple task threads may be all currently running task threads within the electronic device 100, or only some of the task threads; there is no specific limitation.

[0093] In one implementation, the correlation fitting result is used as the correlation between the task thread and the target task. This approach allows for fine-grained management of task threads during subsequent resource scheduling.

[0094] In another optional implementation, multiple task threads are classified based on the relevance fitting results, and the classification results are used as the relevance between the task threads and the target task. Each task thread is assigned to one of several categories. Referring to Figure 5, these categories may include: relevant to the target task and irrelevant to the target task. That is, the relevance between a task thread and the target task includes both relevant and irrelevant categories.

[0095] Optionally, based on other information about the task threads, these categories can be further subdivided. For example, the target task-related threads can be divided according to the topological relationship between the task threads and the target task. The resulting target task-related threads include target task child threads and target task dependent threads. Target task child threads refer to threads derived from the target task's task thread, and may include the target task's child threads and grandchild threads, etc. Target task dependent threads refer to threads that the target task's task thread depends on for its execution, such as the target task's task thread's parent thread, etc., without specific limitations.

[0096] For example, threads unrelated to the target task can be divided based on the scale of the task threads. These unrelated threads can be categorized into lightweight unrelated threads and heavyweight unrelated threads. The scale of the task can be measured by one or more metrics such as the number of processes and / or threads, the number of running nodes, and the number of computing resources required. This is not specifically limited to these metrics.

[0097] The above design calculates the relevance of each task thread to the target task based on the application characteristics of the target task and a correlation coefficient fitting algorithm, rather than simply distinguishing task threads as foreground and background tasks. Based on this relevance, more accurate resource scheduling can be achieved. For example, when executing the target task, it can ensure that task threads related to the target task are not mistakenly killed. Furthermore, in scenarios with a large number of task threads, by classifying them by relevance, task threads of the same category can be used as scheduling objects without having to record the relevance of each task thread separately. This reduces the management overhead of resource scheduling while maintaining the accuracy of resource scheduling.

[0098] It should be noted that the above classification method based on relevance is only an example and is not limited in this embodiment.

[0099] Step 403, (load prediction module 203) acquires the load time series characteristic data of the target task, and determines the prediction result based on the load time series characteristic data and the load prediction model. The prediction result indicates the load status of the target task in the future.

[0100] The load time-series characteristic data of the target task includes the computing resource usage of the target task over a period of time. Specifically, the load time-series characteristic data may include time-series data of one or more load indicators. In terms of data format, the load time-series characteristic data includes one-dimensional or multi-dimensional time-series data, with each dimension of time-series data representing the time-series data of a load indicator. In this embodiment, the load time-series characteristic data of the target task includes time-series data of CPU utilization, or the load time-series characteristic data of the target task includes time-series data of both CPU utilization and memory utilization. Of course, the load indicators of computing resources may also include one or more of the following: GPU utilization, DPU utilization, number of processes, number of threads, number of computing nodes, etc., without specific limitations.

[0101] In one implementation, determining a prediction result based on the load time-series characteristic data of the target task and a load prediction model includes: inputting the load time-series characteristic data of the target task into a trained first load prediction model to obtain the prediction result output by the first load prediction model. The first load prediction model is trained based on multiple training samples. Each training sample includes the load time-series characteristic data of a task within a first time period (as model input data) and the load time-series characteristic data of the task within a second time period (as model output data). The first time period is before the second time period. For example, the first load prediction model predicts the load time-series characteristic data at time T+1 or predicts load data after time T based on the load time-series characteristic data at time T.

[0102] In another implementation, the prediction result is determined based on the load time-series characteristic data of the target task, the load performance events of the target task, and the load prediction model. This process may include:

[0103] (1) Determine the load performance events of the target task based on the application characteristics of the target task. Among them, the load performance events are used to reflect the degree of consumption of computing resources by the target task.

[0104] In this embodiment, the construction of load performance events is related to specific tasks and the application characteristics of those tasks. Different application characteristics and / or different tasks may construct different load performance events. Specifically, a combination of application characteristics corresponds to a set of load performance indicators, wherein each combination of application characteristics includes one or more application characteristics, and a set of load performance indicators includes one or more load performance indicators (denoted as specified load performance indicators).

[0105] The load performance events for a task are determined based on the task's requirements for each specified load performance metric. For example, if the target task is to open an image in WeChat, then based on step 401, a set of application features for the target task includes dating and displaying images. Assume that a set of load performance metrics corresponding to these application features includes the image's pixel count. If the target task requires the opened image to have a pixel count of 1280*720, then the load performance event for the target task includes the image pixel count of 1280*720. It should be understood that this is just an example; the load performance event can include the values ​​of multiple load performance metrics, such as the number of rendering nodes or the number of rendering layers. Furthermore, for a batch image processing task, the load performance event can include the number of images to be processed, the pixel value of each image, etc., without specific limitations.

[0106] (2) Input the load time-series feature data of the target task and the load performance event of the target task into the trained second load prediction model to obtain the prediction result output by the second load prediction model.

[0107] For example, each training sample of the second load prediction model includes the load time-series feature data of a task within a first time period and the load performance events of that task (as model input data), and the load time-series feature data of the task within a second time period (as model output). The first time period is prior to the second time period. In other words, the second load prediction model is used to combine the load time-series feature data and load performance events of a task to predict the load status of the task over a future period.

[0108] Regardless of the load forecasting model, the forecast results can be represented in various forms to indicate load conditions. For example, the forecast result can be a predicted load value, such as the CPU resource utilization of the target task. Alternatively, the forecast result can also indicate the target task's load status, for example, light load and heavy load, which can be categorized based on the predicted load value. Or, the forecast result can include both the predicted load value and the load status, without any specific limitation.

[0109] The above design allows for the dynamic design and construction of different load performance events for different application scenarios, accurately representing the degree of computing resource consumption by different tasks, thereby improving the accuracy of load prediction. At the same time, this dynamic configuration method has strong flexibility.

[0110] It should be noted that there is no strict timing requirement between steps 402 and 403. Steps 402 and 403 can be executed simultaneously, or step 402 can be executed after step 403.

[0111] Step 404 (Dynamic Scheduling Module 204) determines the scheduling strategy based on the prediction results of the target task and the correlation between the task thread and the target task.

[0112] The scheduling objective in this embodiment includes meeting the computing resource requirements of the target task over a future period. The scheduling objective may also include energy conservation.

[0113] The following lists several scenarios and corresponding scheduling strategies. For ease of explanation, it is assumed that the computing resources are CPU resources.

[0114] Scheduling strategy 1: When the prediction result indicates that the target task will be lightly loaded in the future, the task thread of the target task will be scheduled to run on a small core of the CPU.

[0115] Scheduling Strategy 2: When the prediction result indicates that the target task will be heavily loaded in the future, the task thread of the target task will be scheduled to run on the large core of the CPU.

[0116] The above design dynamically schedules the large, medium, and small cores where tasks reside based on the workload. The optimized ratio of large, medium, and small cores is more reasonable than before the optimization. According to actual test data, after optimization, the proportion of time spent on large cores for target tasks with sudden heavy loads can be increased by about 30% compared to before the optimization, while the proportion of time spent on medium and small cores decreases by the same amount. Large cores can provide more computing resources for target tasks, ensuring the computing power requirements of target tasks in sudden heavy load scenarios and improving system performance.

[0117] Scheduling Strategy 3: Based on the prediction results, if it is determined that the CPU will not be overloaded in the near future, the CPU's frequency and voltage are adjusted to match the total load in the near future. For example, the frequency and / or voltage are lowered to reduce the total computing resources available to the CPU to match a lower total load, thereby achieving energy saving. How to determine whether the CPU will be overloaded will be introduced below and will not be elaborated here.

[0118] The above design enables dynamic CPU frequency and voltage adjustment, further reducing energy consumption and comprehensively improving system performance and energy-saving capabilities.

[0119] Scheduling Strategy 4: If the prediction results indicate that the CPU will be overloaded in the near future, increase the computing resources allocated to the target task and keep the threads related to the target task running.

[0120] Increasing the computing resources allocated to the target task may include one or more of the following: reducing the proportion of computing resources used by task threads unrelated to the target task, allocating idle computing resources to the target task, and increasing the CPU frequency and / or voltage. This is to keep task threads related to the target task running.

[0121] In one example, reducing the proportion of computing resources used by task threads unrelated to the target task can be achieved by reducing the computing resources allocated to task threads unrelated to the target task, such as releasing some or all task threads unrelated to the target task, or scheduling task threads unrelated to the target task to run on medium or small cores.

[0122] In another example, reducing the proportion of computing resources used by task threads unrelated to the target task can also be achieved by keeping the computing resources allocated to task threads unrelated to the target task unchanged, while increasing the total computing power of CPU resources, such as by increasing the CPU frequency and / or voltage.

[0123] Specifically, when the task threads unrelated to the target task include lightweight unrelated threads and heavyweight unrelated threads, the above-mentioned reduction of the proportion of computing resources used by task threads unrelated to the target task may also include one or more of the following: scheduling lightweight unrelated task threads to run on small cores, setting heavyweight unrelated task threads to a wait state, and increasing the CPU frequency and / or voltage.

[0124] In one example, when allocating idle computing resources to the target task, one could keep the computing resources allocated to task threads unrelated to the target task unchanged while increasing the CPU frequency and / or voltage. Alternatively, one could decrease the computing resources allocated to task threads unrelated to the target task while keeping the CPU frequency and voltage unchanged. Or, one could decrease the computing resources allocated to task threads unrelated to the target task while increasing the CPU frequency and / or voltage. The specific approach is not limited.

[0125] This embodiment can also set the priority of task threads based on their relevance to the target task, and schedule computing resources according to the task thread priority. For example, one priority ordering is: target task dependent threads > target task sub-threads > lightweight unrelated threads of the target task > heavyweight unrelated threads of the target task. Based on this ordering, computing resources are preferentially scheduled for higher-priority task threads to ensure their processing performance.

[0126] In this embodiment, whether the CPU will be overloaded can be determined based on the prediction results and the CPU limit performance model. The CPU limit performance model can simulate the CPU's operating environment based on multi-dimensional input index data to predict the maximum computing resources (such as the maximum value) that the CPU can provide under a specific operating environment. For example, multi-dimensional index input data includes temperature, frequency, voltage, CPU hardware indicators, and running software parameters. After obtaining the computing resource limit value, the number of currently used CPU resources and the CPU resource requirements of the target task (load prediction value) are combined to determine whether the CPU will be overloaded. For example, if the number of currently used CPU resources and the CPU resource requirements of the target task are greater than the computing resource limit value, the CPU will be overloaded. Otherwise, the CPU will not be overloaded. Alternatively, the number of available resources can be managed by determining different levels based on the baseline value of computing resources. If the number of idle resources (number of available resources - number of currently used CPU resources) is less than the CPU resource requirements of the target task, the CPU will be overloaded; otherwise, the CPU will not be overloaded. This embodiment does not limit this approach.

[0127] Similarly, the total CPU load can be determined based on the current amount of CPU resources used and the CPU resource requirements of the target task (load prediction), which will not be elaborated here.

[0128] The above design determines the scheduling strategy based on the relevance of task threads to the target task and the prediction results, with the goal of meeting the target task's demand for computing resources. When computing resources are insufficient, threads unrelated to the target task can be released, and more computing resources can be scheduled to task threads related to the target task. By determining the relevance of task threads to the target task through the above method, keeping threads related to the target task running, and dynamically releasing threads unrelated to the target task, it is possible to avoid mistakenly killing threads and meet the computing resource requirements of the target task in heavy-load scenarios. Based on actual test data, this embodiment significantly reduces the application cold start time and greatly improves performance compared to existing resource scheduling methods.

[0129] Step 405: Perform resource scheduling according to the scheduling strategy.

[0130] It should be noted that the above only illustrates one resource scheduling process. The above method can be executed periodically to achieve real-time dynamic scheduling of CPU resources.

[0131] The above method obtains the load time-series characteristic data of the target task, determines the load status of the target task in the future based on the load time-series characteristic data and the load prediction model, and determines the scheduling strategy based on the prediction results. The real-time scheduling strategy dynamically schedules CPU resources to meet the computing resource requirements of the target task in heavy-load scenarios, while achieving application performance indicators such as less jitter, less frame loss and high startup speed.

[0132] It should be noted that the above embodiment is described using a task thread as an example. This embodiment can also be applied to scheduling computing resources for processes, hyperthreads, coroutines, etc.

[0133] The above embodiments can be used in combination or individually, and there is no limitation thereto.

[0134] Based on the same concept, this application also provides an electronic device, as shown in FIG6, including a processor 601, a memory 602, and one or more computer programs 604; optionally, it may also include a display screen 603. The above-mentioned devices can be connected through one or more communication buses 605. The one or more computer programs 604 are stored in the memory 602 and configured to be executed by the one or more processors 601. The one or more computer programs 604 include instructions, which, when executed by the one or more processors 601, can implement all or part of the steps described in the method embodiment shown in FIG4. In one embodiment, the processor 604 executes the one or more computer programs 604 to respectively implement some or all of the functions of the aforementioned task identification module 201, thread classification module 202, load prediction module 203, and dynamic scheduling module 204, thereby realizing the resource scheduling method provided in this embodiment.

[0135] The processor 601 can be a central processing unit (CPU), an application-specific integrated circuit (ASIC), one or more integrated circuits for controlling program execution, a baseband chip, etc. The number of memories 602 can be one or more, and the memories 602 can be read-only memory (ROM), random access memory (RAM), or disk storage, etc.

[0136] For example, the processor 601 may specifically be the processor 310 shown in FIG1, the memory 602 may specifically be the internal memory 321 shown in FIG1 and / or the external memory connected to the electronic device, and the display screen 603 may specifically be the display screen 394 shown in FIG1. ​​This application embodiment does not impose any limitations on these.

[0137] This application also provides a computer program product containing instructions. The computer program product may be a software or program product containing instructions, capable of running on a computing device or stored on any usable medium. When the computer program product is run on at least one computing device, it causes the at least one computing device to perform an application deployment method, or an application deployment method.

[0138] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that a computing device can store, or a data storage device such as a data center that includes one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to perform an application deployment method, or instruct the computing device to perform an application deployment method.

[0139] In the embodiments of this application, "at least one" refers to one or more. "More than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three cases: A exists alone, A and B exist simultaneously, and B exists alone. A and B can be singular or plural. The character " / " generally indicates that the related objects before and after are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent seven cases: a, b, c, a and b, a and c, b and c, or a, b, and c. Each of a, b, and c can be an element itself or a set containing one or more elements.

[0140] In this application, terms such as "exemplary," "in some embodiments," and "in other embodiments" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" in this application should not be construed as being more preferred or advantageous than other embodiments or designs. Rather, the term "exemplary" is used to present the concept in a specific manner.

[0141] It should be noted that the terms "first" and "second" used in the embodiments of this application are used only for the purpose of distinguishing descriptions and should not be construed as indicating or implying relative importance or order.

[0142] As used in the above embodiments, depending on the context, the terms "when..." or "after..." can be interpreted as meaning "if...", "after...", "in response to determining...", or "in response to detecting...". Similarly, depending on the context, the phrases "when..." or "if (the stated condition or event) is detected" can be interpreted as meaning "if...", "in response to determining...", "when (the stated condition or event) is detected", or "in response to detecting (the stated condition or event)".

[0143] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)). Where there is no conflict, the solutions in the above embodiments can be combined.

[0144] It should be noted that a portion of this patent application contains copyrighted material. The copyright holder retains all rights except for making copies of the contents of patent documents or records from the patent office.

[0145] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of the present invention.

Claims

1. A resource scheduling method, characterized in that, Applied to an electronic device, the electronic device comprising a hardware layer and a software layer, the software layer comprising at least one application program, and the hardware layer comprising computing resources for running tasks of the at least one application program, the method comprising: Obtain the load time-series characteristic data of the target task, wherein the target task is a task triggered by the user's operation on the target application in the at least one application; The prediction result is determined based on the load time-series characteristic data and the load prediction model, and the prediction result indicates the load status of the target task in the future period of time; A scheduling strategy is determined based on the prediction results, and the computing resources are scheduled according to the scheduling strategy; wherein, the scheduling objective of the scheduling strategy includes meeting the computing resource requirements of the target task in the future.

2. The method as described in claim 1, characterized in that, The step of determining the prediction result based on the load time-series characteristic data and the load prediction model includes: The prediction result is determined based on the load time-series characteristic data, the load performance events of the target task, and the load prediction model; wherein the load performance events are used to reflect the degree of consumption of computing resources by the target task.

3. The method as described in claim 1 or 2, characterized in that, The method further includes: The relevance of each of the multiple task threads included in the electronic device to the target task is determined. The multiple task threads are used to run the task of the at least one application using the resources allocated by the computing resources. The relevance includes being related to the target task and not being related to the target task. The scheduling strategy includes: When the computing resources are about to be overloaded, the computing resources used by the target task are increased; wherein, whether the computing resources are overloaded is determined based on the prediction results and the number of available computing resources.

4. The method as described in claim 3, characterized in that, The increased computing resources used by the target task include: Reduce the proportion of computing resources used by task threads that are unrelated to the target task; and / or, Idle computing resources are allocated to task threads that run the target task.

5. The method as described in claim 4, characterized in that, Task threads unrelated to the target task include: lightweight task threads and heavyweight task threads; Reducing the proportion of computing resources used by task threads unrelated to the target task, including at least one of the following: Schedule the lightweight task thread to run on a small core. The heavyweight task thread is set to a waiting state. Increase the frequency and / or voltage of the computing resources.

6. The method according to any one of claims 3-5, characterized in that, The relevance of each task thread to the target task is determined based on the application characteristics of the target task; The method further includes: Obtain relevant information about the task thread running the target task; The relevant information is matched with the application features included in the application feature library to obtain the application features of the target task; wherein, the application features of the target task include at least one of the following features: user operation on the target application, type of the target application, and business type of the target task.

7. The method as described in claim 6, characterized in that, The relevance of each task thread to the target task is determined in the following way: Based on the similarity coefficient fitting algorithm, the application characteristics of the target task, and the relevant information of each task thread, the correlation fitting result between each task thread and the target task is calculated.

8. A resource scheduling device, characterized in that, include: Load prediction module, dynamic scheduling module; The load prediction module is used to obtain the load time-series characteristic data of the target task, wherein the target task is a task triggered by the user's operation on the target application in the at least one application. The load prediction module is further configured to determine the prediction result based on the load time-series characteristic data and the load prediction model, wherein the prediction result indicates the load status of the target task in the future period of time; The dynamic scheduling module is used to determine a scheduling strategy based on the prediction results and schedule the computing resources according to the scheduling strategy; wherein, the scheduling objective of the scheduling strategy includes meeting the computing resources required by the target task in the future.

9. The apparatus as claimed in claim 8, characterized in that, When determining the prediction result based on the load time-series characteristic data and the load prediction model, the load prediction module is specifically used for: The prediction result is determined based on the load time-series characteristic data, the load performance events of the target task, and the load prediction model; wherein the load performance events are used to reflect the degree of consumption of computing resources by the target task.

10. The apparatus as claimed in claim 8 or 9, characterized in that, The device also includes a thread classification module; The thread classification module is used to determine the relevance of each task thread among the multiple task threads included in the electronic device to the target task. The multiple task threads are used to run the task of the at least one application using the resources allocated by the computing resources. The relevance includes being relevant to the target task and not being relevant to the target task; The scheduling strategy includes: When the computing resources are about to be overloaded, the computing resources used by the target task are increased; wherein, whether the computing resources are overloaded is determined based on the prediction results and the number of available computing resources.

11. The apparatus as claimed in claim 10, characterized in that, When the dynamic scheduling module increases the computing resources used by the target task, it specifically performs the following: Reduce the proportion of computing resources used by task threads that are unrelated to the target task; and / or, Idle computing resources are allocated to task threads that run the target task.

12. The apparatus as claimed in claim 11, characterized in that, Task threads unrelated to the target task include: lightweight task threads and heavyweight task threads; The dynamic scheduling module reduces the proportion of computing resources used by task threads unrelated to the target task by performing at least one of the following: Schedule the lightweight task thread to run on a small core. The heavyweight task thread is set to a waiting state. Increase the frequency and / or voltage of the computing resources.

13. The apparatus according to any one of claims 10 to 12, characterized in that, The relevance of each task thread to the target task is determined based on the application characteristics of the target task; The device also includes a task identification module; The task identification module is used to match the relevant information of the task thread of the target task with the application features included in the application feature library to obtain the application features of the target task; wherein, the application features of the target task include at least one of the following features: user operation on the target application, type of the target application, and business type of the target task.

14. The apparatus as claimed in claim 13, characterized in that, When determining the relevance of each task thread among the multiple task threads included in the electronic device to the target task, the thread classification module is specifically used to: calculate the relevance fitting result between each task thread and the target task based on the similarity coefficient fitting algorithm, the application characteristics of the target task, and the relevant information of each task thread.

15. An electronic device, characterized in that, The device includes at least one processor and at least one memory; wherein the one or more memories store one or more computer programs, the one or more computer programs including instructions that, when executed by the one or more processors, cause the electronic device to perform the method as described in any one of claims 1 to 7.

16. A chip system, characterized in that, The chip system includes a processing circuit and a storage medium, wherein the storage medium stores instructions; when the instructions are executed by the processing circuit, they implement the method as described in any one of claims 1 to 7.

17. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a computer program that, when run on an electronic device, causes the electronic device to perform the method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Resource allocation method and device, storage medium and electronic equipment

    CN111831433A

  • Scheduling method of multi-core processor and electronic equipment

    CN113778663A

  • Load processing method and related device

    CN114968546A

  • Terminal adjusting method and device, storage medium and electronic equipment

    CN115658289A

  • Resource scheduling method and device, readable storage medium and chip system

    CN117891617A

Cited By

  • Container bottom plate production whole process monitoring method and system based on Internet of Things

    CN121436602A

  • Robot control method and device, electronic equipment and storage medium

    CN121946526A