Performance scheduling method and device, terminal equipment and storage medium

By adjusting computing resources based on response time and computing resources in terminal devices, the problem of inaccurate performance scheduling is solved, and more efficient performance release and smooth operation is achieved.

CN119322661APending Publication Date: 2025-01-17GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310876870.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-17
Publication Date
2025-01-17

AI Technical Summary

Technical Problem

The existing performance scheduling methods cannot provide sufficient computing power when the terminal device switches from a low-load state to a high-load state, resulting in inaccurate performance release and causing equipment operation to stutter.

Method used

Determine the operating status of the target task based on the response time and computing resources, and adjust the computing resources in the unbalanced state to switch to the balanced state, and monitor the power consumption and lag situations in real time to improve the accuracy of performance scheduling and response speed.

Benefits of technology

Improves the accuracy and response speed of performance scheduling, shortens the lag time, and improves the smooth operation of terminal devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119322661A_ABST
    Figure CN119322661A_ABST
Patent Text Reader

Abstract

The invention is suitable for the technical field of information processing, and provides a performance scheduling method and device, terminal equipment and a storage medium. According to the method, whether the power consumption of running the target task is too high or too low or not can be quantified by obtaining the response time of running the target task, and whether the target task is blocked due to too low computing power or not during running can be judged on the basis of quantizing whether the power consumption of the target task is too low or not by obtaining the computing power resource input for the target task, so that the target task is more stable. Compared with a traditional performance scheduling method in which the computing power is scheduled according to the cluster load condition of the processor, the method can directly monitor the power consumption and lagging condition in real time, enables the performance scheduling to be matched with the actual working condition of the terminal equipment in real time, improves the accuracy of performance release during performance scheduling, improves the response timeliness of performance scheduling, and improves the performance scheduling efficiency. The lagging time caused by slow response is shortened, and the operation smoothness of the terminal equipment is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of information processing technology, and in particular, relates to a performance scheduling method, apparatus, terminal equipment and storage medium. Background Art

[0002] With the rapid development of electronic technology, terminal devices have become an indispensable tool for learning, working and entertainment in life. Terminal devices are usually powered by batteries, which results in limited battery life. By providing a suitable performance scheduling method, the performance release and battery life of terminal devices can be balanced to improve the user experience.

[0003] At present, the existing performance scheduling method usually matches each thread of the task with the cluster with the lowest power consumption after running according to the cluster load of the processor, so as to reduce power consumption and extend battery life. However, when the corresponding task switches from a low-load state to a high-load state, the above cores are prone to not being able to provide sufficient computing power. Especially under the current popular big-small core architecture, the computing power that the cluster with lower power consumption can provide is limited, which further leads to the limitation of the computing power of the corresponding task, and the terminal device fails to release sufficient performance in time, causing the terminal device to run stuck. Therefore, how to improve the accuracy of performance release when the terminal device performs performance scheduling has become an urgent problem to be solved. Summary of the invention

[0004] In view of this, an embodiment of the present application provides a performance scheduling method, apparatus, terminal device and storage medium to solve the problem of inaccurate performance release in existing performance scheduling methods.

[0005] A first aspect of an embodiment of the present application provides a performance scheduling method, which is applied to a terminal device, and the method includes:

[0006] Determine the running status of the target task based on the response time of the target task and the computing resources invested in the target task;

[0007] When the running state of the target task is in an unbalanced state, adjusting the computing resources invested in the target task according to the unbalanced state, so that the running state of the target task is switched from the unbalanced state to the balanced state;

[0008] Among them, the response time represents the estimated time it takes for the terminal device to complete the target task; the response time is associated with the power consumption when running the corresponding target task; the invested computing resources are associated with the jamming situation when running the corresponding target task; the running status of the target task is determined based on the power consumption and the jamming situation.

[0009] A first aspect of an embodiment of the present application provides a performance scheduling method, which determines the running state of a target task based on the response time of the target task and the computing power resources invested in the target task; when the running state of the target task is in an unbalanced state, the computing power resources invested in the target task are adjusted according to the unbalanced state, so that the running state of the target task is switched from the unbalanced state to the balanced state; wherein the response time is associated with the power consumption when the corresponding target task is run; the computing power resources invested are associated with the jamming situation when the corresponding target task is run; by obtaining the response time of the running target task, it is possible to quantify whether the power consumption of the running target task is too high or too low, and by obtaining the computing power resources invested in the target task, it is possible to judge whether the target task will jam due to too low computing power when running on the basis of quantifying whether the power consumption of the target task is too low. Compared with the traditional performance scheduling method that schedules computing power according to the cluster load of the processor, the power consumption and jamming situation can be directly and in real time monitored, so that the performance scheduling and the actual working conditions of the terminal device are matched in real time, the accuracy of performance release during performance scheduling is improved, and the response timeliness of the performance scheduling is improved, the jamming time caused by slow response is shortened, and the running smoothness of the terminal device is improved.

[0010] A first aspect of an embodiment of the present application provides a performance scheduling device, including:

[0011] An analysis module, used to determine the running status of the target task based on the response time of the target task and the computing resources invested in the target task;

[0012] A scheduling module, configured to adjust the computing resources invested in the target task according to the unbalanced state when the running state of the target task is in an unbalanced state, so that the running state of the target task is switched from the unbalanced state to the balanced state;

[0013] Among them, the response time represents the estimated time it takes for the terminal device to complete the target task; the response time is associated with the power consumption when running the corresponding target task; the invested computing resources are associated with the jamming situation when running the corresponding target task; the running status of the target task is determined based on the power consumption and the jamming situation.

[0014] The third aspect of an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the performance scheduling method provided in the first aspect of the embodiment of the present application when executing the computer program.

[0015] The fourth aspect of the embodiments of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of the performance scheduling method provided in the first aspect of the embodiments of the present application.

[0016] It can be understood that the beneficial effects of the second to fourth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0018] Figure 1 This is a schematic diagram of the structure of a terminal device provided in an embodiment of the present application;

[0019] Figure 2 This is a schematic diagram of the architecture of an operating system running on a terminal device provided in an embodiment of the present application;

[0020] Figure 3 This is a schematic diagram of a first flow chart of a performance scheduling method provided in an embodiment of the present application;

[0021] Figure 4 This is a second flow chart of the performance scheduling method provided in the embodiment of the present application;

[0022] Figure 5 It is a schematic diagram of the relationship between computing resources, response time and frame number provided in the embodiment of the present application;

[0023] Figure 6 It is a schematic diagram of the architecture of the performance scheduling device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0024] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0025] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0026] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0027] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0028] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0029] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0030] In applications, existing performance scheduling methods usually match each thread of a task with the core with the lowest power consumption after running according to the core load of the processor, in order to reduce power consumption and extend battery life. However, when the corresponding task switches from a low-load state to a high-load state, the above cores are prone to not being able to provide sufficient computing power. Especially under the currently popular big-small core architecture, the computing power that the core with lower power consumption can provide is limited, which further leads to the limitation of the computing power of the corresponding task, and the terminal device fails to release sufficient performance in time, causing the terminal device to run laggy. Therefore, how to improve the accuracy of performance release when the terminal device performs performance scheduling has become an urgent problem to be solved.

[0031] In response to the above technical problems, an embodiment of the present application provides a performance scheduling method, which determines the running state of the target task based on the response time of the target task and the computing power resources invested in the target task; when the running state of the target task is in an unbalanced state, the computing power resources invested in the target task are adjusted according to the unbalanced state, so that the running state of the target task is switched from the unbalanced state to the balanced state; wherein the response time is associated with the power consumption when running the corresponding target task; the computing power resources invested are associated with the jamming situation when running the corresponding target task; by obtaining the response time of running the target task, the running state of the target task can be quantified. Whether the power consumption of the target task is too high or too low, and by obtaining the computing power resources invested in the target task, it is possible to quantify whether the power consumption of the target task is too low and judge whether the target task will be stuck due to low computing power during its operation. Compared with the traditional performance scheduling method that schedules computing power according to the cluster load of the processor, it can directly and in real time monitor the power consumption and stuck conditions, so that the performance scheduling and the actual working conditions of the terminal device can be matched in real time, improve the accuracy of performance release during performance scheduling, and improve the response timeliness of performance scheduling, shorten the stuck time caused by slow response, and improve the running smoothness of the terminal device.

[0032] The performance scheduling method provided in the embodiment of the present application can be applied to terminal devices. The terminal device can be a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR) / virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), etc. The embodiment of the present application does not impose any restrictions on the specific type of the terminal device.

[0033] Figure 1The schematic diagram of the structure of the terminal device 1 is shown as an example. The terminal device 1 includes a processor 10, a memory 20, an audio module 30, a camera module 40, a sensor module 50, an input module 60, a display module 70, a wireless communication module 80, and a power module 90. The audio module 30 may include a speaker 31 and a microphone 32, the camera module 40 may include a short-focus camera 41, a long-focus camera 42, and a flash 43, the sensor module 50 may include an infrared sensor 51, an acceleration sensor 52, a position sensor 53, a fingerprint sensor 54, and an iris sensor 55, the input module 60 may include a touch panel 61 and an external input unit 62, and the wireless communication module 80 may include wireless communication units such as Bluetooth, optical wireless communication (Optical Wireless), mobile communication (Mobile Communications), wireless local area network (Wireless Local Area Network, WLAN), near field communication (Near Field Communication, NFC) and ZigBee protocol (ZigBee).

[0034] In applications, the processor 10 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.

[0035] In application, the memory 20 may be an internal storage unit of the terminal device in some embodiments, such as a hard disk or memory of the terminal device. The memory 20 may also be an external storage device of the terminal device in other embodiments, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the terminal device. Further, the memory 20 may also include both an internal storage unit of the terminal device and an external storage device. The memory 20 is used to store computer programs 21 such as an operating system, an application program, and a boot loader (BootLoader). The memory 20 may also be used to temporarily store data that has been output or is to be output.

[0036] In application, the display module 70 can be a flat screen, a curved screen or a flexible screen, specifically a folding screen. The folding screen may include at least one flexible screen, or the folding screen may include at least one flexible screen and at least one flat screen or curved screen. The embodiment of the present application does not impose any restrictions on the specific type of the display module 70.

[0037] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the terminal device 1. In other embodiments of the present application, the terminal device 1 may include more or fewer components than those illustrated, or may combine certain components, or different components, such as a graphics processor, etc. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0038] like Figure 2 As shown, the architecture diagram of the operating system running on the terminal device 1 provided in the embodiment of the present application, the layered architecture can divide the operating system into multiple layers, and the layers communicate with each other through software interfaces. In some embodiments, the operating system can be divided from top to bottom into an application layer 100, a framework layer 200, a system runtime layer 300, a hardware abstraction layer 400, and a Linux kernel layer 500.

[0039] It should be noted that the type of the operating system may be an Android system, an operating system customized based on the Android system, or other different types of operating systems. The embodiments of the present application do not impose any limitation on the specific type of the operating system.

[0040] In the application, the five layers of the operating system are introduced as follows:

[0041] The application layer 100 may include built-in applications 120 built into the system and upper layer applications 110 provided by third-party application providers. The application programs of the application layer 100 may interact directly with users to implement different functions provided by the application programs. For example, the application layer 100 may specifically include built-in applications such as email, phone, calendar, camera, contacts, and Bluetooth, and upper layer applications such as map positioning, food delivery, and video playback.

[0042] The framework layer (ApplicationFramwork) 200 may include an application programming interface (API) and a programming framework. The application programming interface may be used to provide an interface for operating system developers to develop applications, and may also be used to call corresponding basic services for applications in the application layer when implementing different functions. For example, the framework layer may include different types of application programming interfaces such as window managers, content providers, phone managers, positioning managers, and view systems.

[0043] The window manager is used to manage window programs. Specifically, it can be used to obtain the window size, determine whether there is a status bar, lock the screen, capture the screen, etc.

[0044] Content providers are used to store and retrieve data and make the data accessible to applications. The data may include videos, images, audio, call logs, contacts, browsing history, and bookmarks.

[0045] The phone manager is used to provide communication functions of the terminal device 1, such as management of call status, including answering and hanging up calls, etc.;

[0046] The positioning manager is used to obtain the location information of the terminal device 1, which may include different types of location information such as satellite location information (obtained through the global positioning system), network location information (obtained through a network positioning service), and fused location information (obtained through a fused positioning service);

[0047] The view system is used to provide visual controls, such as controls for displaying text and controls for displaying pictures, and is also used to build applications for displaying the application layer 100. The view system can run multiple visual controls at the same time, so that the terminal device can display multiple views at the same time, for example, a view that displays text and a view that displays pictures at the same time.

[0048] The system runtime layer (Native) 300 may include a C / C++ library 310 and an Android runtime library 320, wherein the C / C++ library 310 may include a drawing function library, a font engine, a rendering engine, a multimedia library, and a database engine, etc. The drawing function library may be OpenGL For Embedded Systems 3D (a 3D open graphics library running on embedded systems); the font engine is used to provide different fonts, and may be FreeType (a portable font engine); the rendering engine is used to render two-dimensional graphics or three-dimensional graphics, and may be Skia Graphics Library (an engine for rendering two-dimensional graphics); the multimedia library (Media Framework) is used to support the playback, recording, and playback of audio and video in different formats; the database engine is used to provide storage functions for different types of databases, so that different types of data can be stored in different types of databases according to actual needs, or different types of data can be stored in a unified database.

[0049] The Android runtime 320 may include core libraries (Core Libraries) and an Android runtime environment (Android Runtime, ART), wherein after the Android 5.0 system, the Dalvik virtual machine is replaced by ART. The core library provides most of the functions of the Java language core library, so that developers can use the Java language to write Android applications. Compared with the Java Virtual Machine (Java Virtual Machine, JVM), the Dalvik virtual machine is specially customized for mobile devices, allowing multiple virtual machine instances to run simultaneously in limited memory, and each Dalvik application is executed as an independent Linux process. Independent processes can prevent all programs from being closed when the virtual machine crashes. The mechanism of ART, which replaces the Dalvik virtual machine, is different from Dalvik. Under Dalvik, every time an application runs, the bytecode needs to be converted into machine code by a just-in-time compiler, which slows down the running efficiency of the application. In the ART environment, when the application is installed for the first time, the bytecode will be pre-compiled into machine code, making it a truly local application.

[0050] The Hardware Abstraction Layer (HAL) 400 is an interface layer between the operating system kernel and the hardware circuit. Its purpose is to abstract the hardware. In order to protect the intellectual property rights of hardware manufacturers, it hides the hardware interface details of a specific platform, thereby providing a virtual hardware platform for the operating system, making it hardware-independent and portable on multiple platforms. From the perspective of software and hardware testing, the testing of software and hardware can be completed based on the hardware abstraction layer, so that the testing of software and hardware can be carried out in parallel.

[0051] The Linux kernel layer 500 can be used to provide system services of the operating system, including security services, memory management, process management, network protocol stack, driver model and other services of the operating system.

[0052] Understandably, Figure 2 The architecture diagram of an operating system is only shown by way of example. The operating system architecture can also be four-layer or six-layer, wherein the architecture of a four-layer operating system may include: an application layer, a framework layer, a system runtime layer and a Linux kernel layer; the architecture of a six-layer operating system may include: an application layer, a framework layer, a system runtime layer, a hardware abstraction layer, a Linux kernel layer and a hardware device layer. The embodiment of the method of the present application does not impose any limitation on the number of architecture layers and the specific architecture of the operating system.

[0053] like Figure 3 As shown, the performance scheduling method provided in the embodiment of the present application is applied to a terminal device, and includes the following steps S301 and S302:

[0054] Step S301: Determine the running status of the target task based on the response time of the target task and the computing resources invested in the target task.

[0055] Among them, the response time represents the estimated time it takes for the terminal device to complete the target task; the response time is related to the power consumption when running the corresponding target task; the computing resources invested are related to the lag when running the corresponding target task; the running status of the target task is determined based on the power consumption and the lag.

[0056] In the application, the target task can be any application that the terminal device is going to run or is running, or any service / thread in any of the above applications. The response time of the target task can be calculated in real time by the terminal device. The specific calculation method can be to divide the computing task amount of the target task by the computing power resources invested in the target task.

[0057] In applications, computing resources may include processor frequency, utilization, and the cluster to which it belongs, and specifically, the number of instructions per second (IPS), which is positively correlated with the frequency of the processor. Before the target task is run, the terminal device can determine the computing resources invested in the target task based on the load conditions, preset working modes (e.g., power saving mode, balanced mode, or performance mode, etc.), and other performance release methods. For details, please refer to the existing performance release methods.

[0058] In the application, when the target task is running, the terminal device can monitor the response time of the target task and the computing resources invested in the target task to determine the running status of the target task. It should be noted that during the operation of the target task, the response time can change with the changes in the computing resources invested, so the running status of the target task can also change accordingly. Generally speaking, for the same target task, the response time is inversely proportional to the computing resources invested, that is, the more computing resources invested, the faster the terminal device can run to complete the target task, and the shorter the response time; conversely, the fewer computing resources invested, the longer it takes for the terminal device to run and complete the target task, and the longer the response time.

[0059] In the application, the running status of the target task can be divided into two categories according to whether it is balanced: balanced state and unbalanced state. Specifically, the balanced state indicates that the performance release of the terminal device for the target task is appropriate, and there is no lag when the target task is running; the unbalanced state indicates that the performance release of the terminal device for the target task is too much, or the performance release of the terminal device for the target task is too little, resulting in lag when the target task is running.

[0060] In one embodiment, before step S301, the method further includes:

[0061] When receiving a target task execution request, determining the target task execution priority according to the target task response time;

[0062] Among them, the response time of the target task is positively correlated with the running priority.

[0063] In the application, when the terminal device receives a running request of a target task, it can first determine the running priority of the target task according to the response time of the target task, so as to sort the running priorities of each target task, and then determine the running status of the target task.

[0064] In the application, the running priority can be determined according to the response time of the target task. Specifically, the response time of the target task can be positively correlated with the running priority. The longer the response time of the target task, the greater the impact of the corresponding target task on the terminal device, and the more computing power required for the target task. Prioritizing the corresponding target task can complete the operation in advance and invest more computing power resources to avoid terminal device jams and improve the running smoothness of the terminal device.

[0065] Step S302: When the running state of the target task is in an unbalanced state, the computing resources invested in the target task are adjusted according to the unbalanced state, so that the running state of the target task is switched from the unbalanced state to the balanced state.

[0066] In the application, when the running state of the target task is in an unbalanced state, it means that the performance release for the target task is currently too much or too little, and the computing power resources invested in the target task can be adjusted according to the unbalanced state. Specifically, when the terminal device releases too much performance for the target task, the computing power resources invested in the target task can be reduced; when the terminal device releases too little performance for the target task, or it causes a freeze when the target task is running, the computing power resources invested in the target task can be increased to switch the running state of the target task from an unbalanced state to a balanced state.

[0067] In one embodiment, after step S301, the method further includes:

[0068] When the running status of the target task is in a balanced state, maintain the current computing resources invested in the target task.

[0069] In the application, when the running status of the target task is in a balanced state, it means that the current performance release for the target task is appropriate, and there is no lag when the target task is running. The current computing power resources invested in the target task can be maintained without adjustment, so that the running status of the target task continues to be in a balanced state.

[0070] In the application, the running state of the target task is determined based on the response time of the target task and the computing power resources invested in the target task; when the running state of the target task is in an unbalanced state, the computing power resources invested in the target task are adjusted according to the unbalanced state, so that the running state of the target task is switched from the unbalanced state to the balanced state; wherein the response time is associated with the power consumption when the corresponding target task is run; the computing power resources invested are associated with the jamming situation when the corresponding target task is run; by obtaining the response time of the running target task, it is possible to quantify whether the power consumption of the running target task is too high or too low, and by obtaining the computing power resources invested in the target task, it is possible to judge whether the target task will jam due to too low computing power when running on the basis of quantifying whether the power consumption of the target task is too low. Compared with the traditional performance scheduling method that schedules computing power according to the cluster load of the processor, it is possible to directly and in real time monitor the power consumption and jamming situation, so that the performance scheduling and the actual working conditions of the terminal device are matched in real time, and the accuracy of performance release during performance scheduling is improved, and the response timeliness of performance scheduling is improved, the jamming time caused by slow response is shortened, and the running smoothness of the terminal device is improved.

[0071] like Figure 4 As shown, in one embodiment, based on Figure 3 The corresponding embodiment includes the following steps S401 to S405. Figure 5 The relationship between computing resources, response time and frame rate is illustrated in the following figure:

[0072] Step S401: upon receiving a target task execution request, obtaining the target task response time and computing resources invested in the target task;

[0073] Step S402: when the response time of the target task is not greater than the preset response time, determining that the target task is in a first unbalanced state;

[0074] Step S403: when the computing power resources invested in the target task are not greater than the preset computing power resources, determining that the target task is in a second unbalanced state;

[0075] The first unbalanced state indicates that the power consumption is too high when the target task is executed, and the second unbalanced state indicates that there is a freeze when the target task is executed.

[0076] In the application, when the terminal device receives a request to run the target task, it can start to obtain the response time of the target task and the computing resources invested in the target task until the target task is completed.

[0077] In the application, when the response time of the target task is not greater than the preset response time, such as Figure 5As shown, it means that the current response time is too low, that is, too much computing power resources are invested, which easily leads to excessive power consumption when running the target task. It can be determined that the target task is in the first unbalanced state, and in the first unbalanced state, the frame number has reached the target frame number and cannot be further improved, wasting excess computing power.

[0078] In the application, when the computing power resources invested in the target task are not greater than the preset computing power resources, such as Figure 5 As shown, it means that the current computing resources invested are too little, which may easily lead to a freeze when running the target task (the number of frames is too low). It can be determined that the target task is in the second unbalanced state.

[0079] Step S404: When the running state of the target task is in the first unbalanced state, reduce the computing resources invested in the target task, so that the running state of the target task is switched from the first unbalanced state to the balanced state.

[0080] In the application, when the running state of the target task is in the first unbalanced state, the computing power resources invested in the target task can be reduced, so that the running state of the target task is switched from the first unbalanced state to the balanced state. Specifically, the frequency of the current cluster running the target task can be reduced (specifically, the number of instructions per second can be reduced); or, the target task is scheduled from the current cluster to be run by the first cluster, and the computing power resources contained in the first cluster are less than the computing power resources contained in the current cluster. For example, if the processor is a large and small core architecture, the current cluster can be a large core with high computing power resources, and the first cluster can be a small core with low computing power resources. By scheduling the target task from the current cluster to be run by the first cluster, on the basis of reducing the input of computing power resources and thus reducing power consumption, the advantage of the high energy efficiency ratio of the first cluster can also be brought into play, further reducing power consumption and increasing the battery life of the terminal device.

[0081] Step S405: When the running state of the target task is in the second unbalanced state, increase the computing resources invested in the target task to switch the running state of the target task from the second unbalanced state to the balanced state.

[0082] In the application, when the running state of the target task is in the second unbalanced state, the computing power resources invested in the target task can be increased to switch the running state of the target task from the second unbalanced state to the balanced state. Specifically, the frequency of the current cluster running the target task can be increased (specifically, the number of instructions per second can be increased); or, the target task is scheduled from the current cluster to the second cluster, and the computing power resources contained in the second cluster are greater than the computing power resources contained in the current cluster. For example, if the processor has a large and small core architecture, the current cluster can be a small core with low computing power resources, and the second cluster can be a large core with high computing power resources.

[0083] It should be noted that no matter whether the running state of the target task is in the first unbalanced state or the second unbalanced state, when adjusting the computing power resources invested in the target task, the frequency of the current cluster running the target task can be adjusted first. After adjusting the frequency, if the running state of the target task is still in an unbalanced state, the cluster to which the target task belongs can be rescheduled, so that when adjusting the computing power resources, the cache overhead required for scheduling the cluster can be reduced as much as possible, further saving power consumption and improving the battery life of the terminal device.

[0084] In the application, by determining whether the running state of the target task is in the first unbalanced state or the second unbalanced state, and adjusting the computing resources invested in the target task in a targeted manner, the performance scheduling efficiency can be improved, and power consumption can be reduced while ensuring a high average frame rate (less lag), thereby achieving performance balance.

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

[0086] like Figure 6 As shown, the embodiment of the present application also provides a performance scheduling device for executing the steps in the above performance scheduling method embodiment applied to the terminal device. The performance scheduling device can be a virtual appliance in the terminal device, which is run by the processor of the terminal device, or it can be the terminal device itself.

[0087] like Figure 6 As shown, the performance scheduling device 6 provided in the embodiment of the present application includes:

[0088] An analysis module 610, configured to determine the running status of the target task based on the response time of the target task and the computing resources invested in the target task;

[0089] The scheduling module 620 is used to adjust the computing resources invested in the target task according to the unbalanced state when the running state of the target task is in an unbalanced state, so that the running state of the target task is switched from the unbalanced state to the balanced state;

[0090] Among them, the response time represents the estimated time it takes for the terminal device to complete the target task; the response time is related to the power consumption when running the corresponding target task; the computing resources invested are related to the lag when running the corresponding target task; the running status of the target task is determined based on the power consumption and the lag.

[0091] In one embodiment, the analysis module 610 includes:

[0092] A first analyzing unit, configured to determine that the target task is in a first unbalanced state when the response time of the target task is not greater than a preset response time;

[0093] A second analysis unit is used to determine that the target task is in a second unbalanced state when the computing power resources invested in the target task are not greater than the preset computing power resources;

[0094] The first unbalanced state indicates that the power consumption is too high when the target task is executed, and the second unbalanced state indicates that there is a freeze when the target task is executed.

[0095] In one embodiment, the scheduling module 620 includes:

[0096] A first scheduling unit, configured to reduce computing resources invested in the target task when the running state of the target task is in a first unbalanced state;

[0097] A second scheduling unit is used to increase the computing power resources invested in the target task when the running state of the target task is in a second unbalanced state;

[0098] The first unbalanced state indicates that the power consumption is too high when the target task is executed, and the second unbalanced state indicates that there is a freeze when the target task is executed.

[0099] In one embodiment, the performance scheduling device 6 further includes:

[0100] A priority sorting unit, for determining the running priority of the target task according to the response time of the target task when receiving the running request of the target task;

[0101] Among them, the response time of the target task is positively correlated with the running priority.

[0102] In one embodiment, the performance scheduling device 6 further includes:

[0103] A third analysis unit is used to determine that the running state of the target task is in a balanced state when the response time of the target task is greater than the preset response time and the computing power resources invested in the target task are greater than the preset computing power resources;

[0104] The balancing unit is used to maintain the computing resources currently invested in the target task when the running state of the target task is in a balanced state.

[0105] In applications, each module in the performance scheduling device may be a software program module, or may be implemented by different logic circuits integrated in a processor, or may be implemented by multiple distributed processors.

[0106] It should be noted that the information interaction, execution process and other contents between the above-mentioned modules are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0107] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example for illustration. In actual applications, the above-mentioned function allocation can be completed by different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The functional modules in the embodiment can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software functional modules. In addition, the specific names of the functional modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0108] The embodiment of the present application further provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the steps in the above-mentioned color temperature controllable multi-light source color mixing method embodiment can be implemented.

[0109] If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium may at least include: any entity or device that can carry the computer program code to the camera terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electric carrier signal, a telecommunication signal, and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a disk or an optical disk.

[0110] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0111] Those of ordinary skill in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0112] In the embodiments provided in the present application, it should be understood that the disclosed terminal device and method can be implemented in other ways. For example, the terminal device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.

[0113] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A performance scheduling method, characterized in that: Applied to a terminal device, the method comprises: Determine the running status of the target task based on the response time of the target task and the computing resources invested in the target task; When the running state of the target task is in an unbalanced state, adjusting the computing resources invested in the target task according to the unbalanced state, so that the running state of the target task is switched from the unbalanced state to the balanced state; Among them, the response time represents the estimated time it takes for the terminal device to complete the target task; the response time is associated with the power consumption when running the corresponding target task; the invested computing resources are associated with the jamming situation when running the corresponding target task; the running status of the target task is determined based on the power consumption and the jamming situation.

2. The performance scheduling method according to claim 1, characterized in that: The determining the running state of the target task based on the response time of the target task and the computing resources invested in the target task includes: When the response time of the target task is not greater than the preset response time, determining that the target task is in a first unbalanced state; When the computing power resources invested in the target task are not greater than the preset computing power resources, determining that the target task is in a second unbalanced state; The first unbalanced state indicates that power consumption is too high when the target task is executed, and the second unbalanced state indicates that a freeze occurs when the target task is executed.

3. The performance scheduling method according to claim 1, characterized in that: When the running state of the target task is in an unbalanced state, adjusting the computing resources invested in the target task according to the unbalanced state includes: When the running state of the target task is in a first unbalanced state, reducing the computing resources invested in the target task; When the running state of the target task is in a second unbalanced state, increasing the computing power resources invested in the target task; The first unbalanced state indicates that power consumption is too high when the target task is executed, and the second unbalanced state indicates that a freeze occurs when the target task is executed.

4. The performance scheduling method according to claim 3, characterized in that: The terminal device includes a processor, the processor includes a plurality of clusters, and when the running state of the target task is in a first unbalanced state, reducing the computing power resources invested in the target task includes: When the running state of the target task is in a first unbalanced state, reducing the frequency of the current cluster running the target task, or scheduling the target task from being run by the current cluster to being run by the first cluster; The computing resources included in the first cluster are smaller than the computing resources included in the current cluster.

5. The performance scheduling method according to claim 3, characterized in that: The terminal device includes a processor, the processor includes a plurality of clusters, any cluster is used to run the target task, and when the running state of the target task is in the second unbalanced state, increasing the computing power resources invested in the target task includes: When the running state of the target task is in a second unbalanced state, increasing the frequency of the current cluster running the target task, or scheduling the target task from being run by the current cluster to being run by the second cluster; The computing resources included in the second cluster are greater than the computing resources included in the current cluster.

6. The performance scheduling method according to any one of claims 1 to 5, characterized in that: The method further comprises: When receiving a target task execution request, determining the target task execution priority according to the target task response time; The response time of the target task is positively correlated with the running priority.

7. The performance scheduling method according to any one of claims 1 to 5, characterized in that: The determining the running state of the target task based on the response time of the target task and the computing resources invested in the target task includes: When the response time of the target task is greater than the preset response time, and the computing power resources invested in the target task are greater than the preset computing power resources, determining that the running state of the target task is in a balanced state; The method further comprises: When the running state of the target task is in a balanced state, the computing resources currently invested in the target task are maintained.

8. A performance scheduling device, characterized in that: include: An analysis module, used to determine the running status of the target task based on the response time of the target task and the computing resources invested in the target task; A scheduling module, configured to adjust the computing resources invested in the target task according to the unbalanced state when the running state of the target task is in an unbalanced state, so that the running state of the target task is switched from the unbalanced state to the balanced state; Among them, the response time represents the estimated time it takes for the terminal device to complete the target task; the response time is associated with the power consumption when running the corresponding target task; the invested computing resources are associated with the jamming situation when running the corresponding target task; the running status of the target task is determined based on the power consumption and the jamming situation.

9. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the performance scheduling method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the performance scheduling method according to any one of claims 1 to 7 are implemented.