Terminal control method and device, equipment, storage medium and computer program product

By adopting two different control strategies in the computer system to collaboratively control the task execution devices and dynamically adjust the control parameters, the problems of frequent static table updates and high maintenance costs in the existing technology are solved, and high efficiency of task execution is achieved. Stability and reliability.

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

Patent Information

Application Number
CN202411406202.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-09
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

When the prior art deals with different equipment and different application scenarios, static tables need to be updated frequently, with high maintenance costs and lack flexibility.

Method used

By determining the target performance parameters of the task, and based on two different control strategies, the task performing device is coordinated, and the control parameters are dynamically adjusted to respond to performance requirements and optimize system performance.

Benefits of technology

The performance requirements of fast response tasks are realized, and the performance of the system is continuously optimized to ensure the efficiency, stability and reliability of task execution, and reduce maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119336503A_ABST
    Figure CN119336503A_ABST
Patent Text Reader

Abstract

The invention discloses a terminal control method and device, equipment, a storage medium and a computer program product. The method comprises the following steps: determining a target performance parameter corresponding to a first task; controlling a task execution device of the terminal based on the first control strategy to execute the first task; in the execution process of the first task, obtaining a current performance parameter corresponding to the first task; and under the condition that an error value between the target performance parameter and the current performance parameter is larger than a preset threshold value, the task execution device is controlled based on a second control strategy to execute the first task, and the first control strategy and the second control strategy are different. Thus, during task scheduling, two different control strategies are adopted to perform cooperative control on the task execution device, the performance requirement of the first task is quickly responded, and the system performance can be continuously optimized for the first task so as to ensure high efficiency, stability and reliability of task execution.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a terminal control method, device, equipment, storage medium and computer program product. Background Art

[0002] In computer systems, the frequency control of the central processing unit (CPU) includes a frequency control method based on a static table. This method pre-sets the frequency adjustment parameters corresponding to various tasks, and adjusts the frequency for different tasks by looking up the table to achieve the purpose of optimizing system performance. However, when dealing with different devices and different application scenarios, this method requires frequent updates of the static table, has high maintenance costs, and lacks flexibility. Summary of the invention

[0003] The embodiments of the present application are intended to provide a terminal control method, apparatus, device, storage medium and computer program product.

[0004] The technical solution of this application is implemented as follows:

[0005] In a first aspect, a terminal control method is provided, comprising:

[0006] Determining a target performance parameter corresponding to the first task;

[0007] Controlling a task execution device of the terminal based on a first control strategy to execute a first task;

[0008] During the execution of the first task, obtaining a current performance parameter corresponding to the first task;

[0009] When the error value between the target performance parameter and the current performance parameter is greater than a preset threshold, the task execution device is controlled based on a second control strategy to execute the first task, and the first control strategy and the second control strategy are different.

[0010] In a second aspect, a terminal control device is provided, including:

[0011] A determination unit, configured to determine a target performance parameter corresponding to the first task;

[0012] A first control unit, configured to control a task execution device of the terminal based on a first control strategy to execute a first task;

[0013] An acquisition unit, used for acquiring a current performance parameter corresponding to the first task during the execution of the first task;

[0014] The second control unit is used to control the task execution device based on the second control strategy to execute the first task when the error value between the target performance parameter and the current performance parameter is greater than a preset threshold, and the first control strategy and the second control strategy are different.

[0015] In a third aspect, a terminal control device is provided, comprising: a processor and a memory configured to store a computer program that can be run on the processor,

[0016] Wherein, when the processor is configured to run a computer program, the steps of the aforementioned method are executed.

[0017] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, wherein the computer program implements the steps of the aforementioned method when executed by a processor.

[0018] In a fifth aspect, a computer program product includes a computer program, and when the computer program is executed by a processor, the steps of the aforementioned method are implemented.

[0019] In an embodiment of the present application, a terminal control method, device, equipment, storage medium and computer program product are provided, the method comprising: determining a target performance parameter corresponding to a first task; controlling a task execution device of the terminal based on a first control strategy to execute the first task; during the execution of the first task, obtaining a current performance parameter corresponding to the first task; when the error value between the target performance parameter and the current performance parameter is greater than a preset threshold, controlling the task execution device based on a second control strategy to execute the first task; wherein the first control strategy and the second control strategy are different. In this way, when scheduling tasks, two different control strategies are used to coordinately control the task execution device, which not only quickly responds to the performance requirements of the first task, but also continuously optimizes the system performance for the first task to ensure the efficiency, stability and reliability of task execution. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 This is a schematic diagram of a first process flow of a terminal control method in an embodiment of the present application;

[0021] Figure 2 This is a schematic diagram of a second process flow of the terminal control method in an embodiment of the present application;

[0022] Figure 3 This is a schematic diagram of a third flow chart of the terminal control method in an embodiment of the present application;

[0023] Figure 4 This is a schematic diagram of the structure of the terminal control device in the embodiment of the present application;

[0024] Figure 5It is a schematic diagram of the composition structure of the terminal control device in the embodiment of the present application. DETAILED DESCRIPTION

[0025] In order to enable a more detailed understanding of the features and technical contents of the embodiments of the present application, the implementation of the embodiments of the present application is described in detail below in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present application.

[0026] An embodiment of the present application provides a terminal control method, which adopts two different control strategies to collaboratively control the task execution devices during task scheduling, which not only quickly responds to the performance requirements of the first task, but also can continuously optimize the system performance for the first task to ensure the efficiency, stability and reliability of task execution.

[0027] The terminals described in this application may include, for example, mobile phones, tablet computers, laptop computers, PDAs, portable media players (PMPs), navigation devices, wearable devices, smart bracelets, cameras, etc.

[0028] Figure 1 Schematic diagram of the first process of the terminal control method in the embodiment of the present application. Figure 1 As shown, the method may specifically include:

[0029] Step 101: Determine a target performance parameter corresponding to a first task;

[0030] The first task refers to any task to be scheduled by the terminal, and the first task may specifically be a task to be scheduled, a process, or a thread.

[0031] The target performance parameter corresponding to the first task refers to a state or target performance value that the task execution device expects to achieve or maintain during the execution of the first task. For example, the target performance parameter may include the expected values ​​of one or more physical quantities such as task deadline, frequency, power consumption, voltage, temperature, etc.

[0032] In some embodiments, based on the task type of the first task, a target performance parameter corresponding to the first task is determined from a first parameter library, and the first parameter library includes a correspondence between one or more task types and target performance parameters.

[0033] Exemplarily, when a first event is monitored to occur, a trigger signal is generated; in response to the trigger signal, a task type of one or more tasks corresponding to the first event is determined, and the one or more tasks include the first task; based on the task type of the first task, a target performance parameter corresponding to the first task is determined from a first parameter library, and the first parameter library includes a correspondence between one or more task types and the target performance parameter.

[0034] A first event refers to a specific thing or behavior that occurs at a specific time and under specific conditions. The first event is a specific situation or action that can be recognized and responded to by a system or program. An embodiment of the present application provides an event-driven terminal control method. When the first event occurs, one or more tasks corresponding to the first event will be triggered to execute.

[0035] The first event may be a specific event or behavior of a preset application. For example, the first event of the application may be identified by monitoring the running state of the application.

[0036] In some embodiments, the method further includes: configuring a first parameter library based on a device type of the terminal and performance requirements of different task types.

[0037] It should be noted that the software and hardware configurations of different device types are different, that is, the system performance provided is different, and the performance requirements of different task types are also different. The embodiment of the present application flexibly configures the first parameter library according to the device type of the terminal and the performance requirements of different task types, and provides corresponding target performance parameters for different task types of the current terminal.

[0038] Step 102: Controlling a task execution device of the terminal based on a first control strategy to execute a first task;

[0039] The first control strategy is specifically used to adjust the control parameters of the control task execution device so that the performance of the task execution device in the process of executing the first task meets the performance requirements of the first task.

[0040] The task execution device includes one or more devices in the terminal for executing the first task. Exemplarily, the task execution device includes at least one of the following: a central processing unit (CPU), a graphics processing unit (GPU), a neural network processor (NPU), a memory controller, a bus system, etc.

[0041] Accordingly, the control parameters of the central processing unit include at least one of the following: frequency, number of cores, temperature, power consumption, etc. The control parameters of the graphics processing unit include at least one of the following: frequency, power consumption, selection of image processing algorithm, etc. The control parameters of the neural network processor include at least one of the following: frequency, power consumption, weight setting, number of iterations, learning rate, etc. The control parameters of the memory controller include at least one of the following: frequency, memory capacity, memory access speed, etc. The control parameters of the bus system include at least one of the following: frequency, bus width, bus protocol, etc.

[0042] Step 103: During the execution of the first task, obtain the current performance parameter corresponding to the first task;

[0043] The current performance parameter refers to a state or performance value actually reached or maintained by the task execution device during the execution of the first task. By way of example, the current performance parameter may include the actual value of one or more physical quantities such as task execution time, frequency, power consumption, voltage, temperature, etc.

[0044] Step 104: When the error value between the target performance parameter and the current performance parameter is greater than a preset threshold, the task execution device is controlled based on a second control strategy to execute the first task, and the first control strategy and the second control strategy are different.

[0045] The error value (Error) represents the deviation between the actual performance parameters of the first task and the set target performance parameters. When the error value is greater than the preset threshold, it indicates that the control result of the first control strategy does not meet expectations, and the second control parameters need to be called for collaborative control to reduce the deviation between the actual performance parameters of the first task and the set target performance parameters to achieve the best control effect.

[0046] The target performance parameter and the current performance parameter include one or more parameters, and correspondingly, the error value includes one or more error values, or the error value is a weighted value of multiple error values.

[0047] In some embodiments, when the error value between the target performance parameter and the current performance parameter is less than or equal to a preset threshold, it indicates that the best control effect has been achieved, and there is no need to rely on the second control strategy.

[0048] In some embodiments, after the task execution device is controlled based on the second control strategy to execute the first task, the method further includes: controlling the task execution device of the terminal based on the first control strategy to execute the first task. It can be understood that the first control strategy can be the main control strategy, and the second control strategy can be the secondary control strategy, and the second control strategy is used to assist and correct the first control strategy to improve the overall performance of the system.

[0049] In some embodiments, the first control strategy is an open-loop control strategy, and the second control strategy is a closed-loop control strategy. The open-loop control strategy can quickly respond to the performance requirements of the first task, and the closed-loop control strategy continuously optimizes system performance for the first task to ensure control accuracy and stability.

[0050] Exemplarily, the first control strategy may include: based on the task type of the first task, determining a first control parameter corresponding to the first task from a second parameter library, the second parameter library including a correspondence between one or more task types and control parameters; adjusting the control parameter of the task execution device to the first control parameter to execute the first task.

[0051] In some embodiments, the method further comprises: configuring a second parameter library based on the device type of the terminal and the performance requirements of different task types. The embodiment of the present application flexibly configures the second parameter library according to the device type of the terminal and the performance requirements of different task types to provide corresponding control parameters for different task types of the current terminal.

[0052] The second control strategy may include: determining the second control parameter corresponding to the first task using a closed-loop control algorithm based on the error value between the target performance parameter and the current performance parameter; adjusting the control parameter of the task execution device to the second control parameter to execute the first task; obtaining the current performance parameter corresponding to the first task during the execution of the first task; and updating the second control parameter using a closed-loop control algorithm based on the error value between the target performance parameter and the current performance parameter when the error value between the target performance parameter and the current performance parameter is greater than a preset threshold, until the error value between the target performance parameter and the current performance parameter is less than or equal to the preset threshold, or the first task is completed.

[0053] A closed-loop control algorithm is a control method that performs corrections based on the output feedback of the control object. In some embodiments, the closed-loop control algorithm is a proportional-integral-differential algorithm (PID algorithm), which continuously adjusts the control parameters of the task execution device so that the actual performance parameters of the first task are close to the target performance parameters, thereby achieving stable and accurate automatic control. In some embodiments, the closed-loop control algorithm can also be a fuzzy control algorithm, a neural network control algorithm, etc.

[0054] In some embodiments, the first control strategy is a closed-loop control strategy, and the second control strategy is an open-loop control strategy. The closed-loop control strategy can achieve precise control for different task types and continuously optimize system performance, while the open-loop control strategy can quickly respond to the performance requirements of the first task. When the closed-loop control strategy cannot achieve the desired state, the response speed is accelerated by calling the open-loop control strategy.

[0055] Exemplarily, the first control strategy may include: initializing a first control parameter corresponding to the first task based on the task type of the first task; adjusting the control parameter of the task execution device to the first control parameter to execute the first task; obtaining the current performance parameter corresponding to the first task during the execution of the first task; when the error value between the target performance parameter and the current performance parameter is greater than a preset threshold and the switching condition is not met, using a closed-loop control algorithm to update the first control parameter according to the error value between the target performance parameter and the current performance parameter until the error value between the target performance parameter and the current performance parameter is less than or equal to the preset threshold, or the first task is completed; when the error value between the target performance parameter and the current performance parameter is greater than the preset threshold and the switching condition is met, controlling the task execution device based on the second control strategy to execute the first task.

[0056] The switching condition may include that the task progress is less than the target progress; or the number of control cycles is greater than the target number of cycles. That is, if the control effect based on the closed-loop control strategy is poor, switch to the second control strategy to improve the control effect.

[0057] The second control strategy may include: based on the task type of the first task, determining the second control parameter corresponding to the first task from a second parameter library, the second parameter library including the correspondence between one or more task types and control parameters; adjusting the control parameter of the task execution device to the second control parameter to execute the first task.

[0058] In some embodiments, the first control strategy and the second control strategy are different open-loop control strategies, or the first control strategy and the second control strategy are different closed-loop control strategies.

[0059] By adopting the above technical solution, during task scheduling, two different control strategies are used to collaboratively control the task execution devices, which not only quickly responds to the performance requirements of the first task, but also continuously optimizes the system performance for the first task to ensure the efficiency, stability and reliability of task execution.

[0060] In order to better reflect the purpose of the present application, based on the above embodiments of the present application, taking the first control strategy as an open-loop control strategy and the second control strategy as a closed-loop control strategy as an example, further examples are given. Figure 2 As shown, the method specifically includes:

[0061] Step 201: event monitoring;

[0062] Specifically, when the occurrence of a first event is monitored, a trigger signal is generated; in response to the trigger signal, the task type of one or more tasks corresponding to the first event is determined, and the one or more tasks include the first task; based on the task type of the first task, the target performance parameters corresponding to the first task are determined from a first parameter library, and the first parameter library includes a correspondence between one or more task types and the target performance parameters.

[0063] Step 202: open loop control;

[0064] The task execution device of the terminal is controlled based on an open-loop control strategy to execute a first task. Exemplarily, based on the task type of the first task, a first control parameter corresponding to the first task is determined from a second parameter library, the second parameter library including a correspondence between one or more task types and control parameters; the control parameter of the task execution device is adjusted to the first control parameter to execute the first task.

[0065] Based on the open-loop control strategy, when an event occurs, the control parameters can be quickly adjusted according to the task type, so that the actual performance parameters of the first task are close to the target performance parameters.

[0066] Step 203: Error monitoring;

[0067] Specifically, during the execution of the first task, the current performance parameters corresponding to the first task are obtained, and the error value between the target performance parameters and the current performance parameters is determined. The error value is used as a basis for whether to switch to a closed-loop control strategy. Furthermore, the closed-loop control strategy further continuously adjusts the control parameters of the task execution device based on the current error value and the target performance parameters.

[0068] More specifically, according to the sampling period corresponding to the task type, the current performance parameter corresponding to the first task is obtained.

[0069] Step 204: Closed-loop control.

[0070] The task execution device of the terminal is controlled based on a closed-loop control strategy to execute the first task. Exemplarily, when the error value between the target performance parameter and the current performance parameter is greater than a preset threshold, a closed-loop control algorithm is used to determine the second control parameter corresponding to the first task according to the error value between the target performance parameter and the current performance parameter; the control parameter of the task execution device is adjusted to the second control parameter to execute the first task; step 203 is continued to be performed to perform error monitoring to determine the error value between the target performance parameter and the current performance parameter; when the error value between the target performance parameter and the current performance parameter is greater than a preset threshold, the closed-loop control is continued until the error value between the target performance parameter and the current performance parameter is less than or equal to the preset threshold, or the first task is completed.

[0071] Adopt closed-loop control strategy to continuously optimize system performance and ensure control accuracy and stability.

[0072] If the first task is a task with a deadline, and the task execution device is a CPU, the control method may specifically include:

[0073] Event monitoring can specifically include:

[0074] Step a: The event detection module monitors the running state of the application program and identifies the occurrence of a first event (eg, an application startup event, a touch event, an interface refresh event, etc.).

[0075] Step b: When the occurrence of the first event is detected, an event trigger signal is sent to the task scheduling module;

[0076] Step c: The task scheduling module receives the event trigger signal and determines the task type of one or more tasks corresponding to the first event;

[0077] Step d: The task scheduling module determines the deadline (corresponding to the target performance parameter) corresponding to the task type from the preset first parameter library according to the task type. The deadline of the task is the specific embodiment of the system performance requirement in the time dimension. The deadline of the task is used to control the task execution device, which can ensure that the task obtains sufficient resources and is executed before the deadline.

[0078] The deadline of the task is set according to different application scenarios to ensure the timeliness and effectiveness of frequency adjustment. For example, for game, video and browser applications, there are different requirements for the frequency of interface refresh and the response time of touch events.

[0079] Open-loop control can specifically include:

[0080] Step a: According to the task type, extract the corresponding open-loop control parameters (corresponding to the first control parameters) from the preset second parameter library.

[0081] Step b: The open-loop control module uses the extracted open-loop control parameters to adjust the CPU frequency so that the CPU performance is close to the performance requirements of the current task.

[0082] Step c: If the task cannot be completed within the deadline after the open-loop control, the closed-loop control module is called to perform closed-loop control.

[0083] For example, for an application startup task, the deadline is 100ms. The CPU frequency is adjusted through the open-loop control module so that the application startup is completed within 100ms. If it is not completed within 100ms, the closed-loop control is triggered. For another example, for an interface refresh, the deadline is 15ms. The CPU frequency is adjusted through the open-loop control module. If it is not completed within 15ms, the closed-loop control is triggered.

[0084] Closed-loop control can specifically include:

[0085] Step a: The closed-loop control module (such as a PID controller) obtains the target performance parameters and error values ​​corresponding to the current task.

[0086] Step b: The PID control algorithm calculates the adjustment amount of the CPU frequency according to the target performance parameter and the error value, and continuously adjusts the CPU frequency to reduce the error value until the task is completed or the deadline is reached.

[0087] In order to better reflect the purpose of the present application, based on the above embodiments of the present application, taking the first control strategy as a closed-loop control strategy and the second control strategy as an open-loop control strategy as an example, further examples are given. Figure 3 As shown, the method specifically includes:

[0088] Step 301: event monitoring;

[0089] Specifically, when the occurrence of a first event is monitored, a trigger signal is generated; in response to the trigger signal, the task type of one or more tasks corresponding to the first event is determined, and the one or more tasks include the first task; based on the task type of the first task, the target performance parameters corresponding to the first task are determined from a first parameter library, and the first parameter library includes a correspondence between one or more task types and the target performance parameters.

[0090] Step 302: closed loop control;

[0091] Specifically, based on the task type of the first task, the first control parameter corresponding to the first task is initialized; the control parameter of the task execution device is adjusted to the first control parameter to execute the first task; during the execution of the first task, the current performance parameter corresponding to the first task is obtained; when the error value between the target performance parameter and the current performance parameter is greater than a preset threshold and the switching condition is not met, according to the error value between the target performance parameter and the current performance parameter, a closed-loop control algorithm is used to update the first control parameter until the error value between the target performance parameter and the current performance parameter is less than or equal to the preset threshold, or the first task is completed; when the error value between the target performance parameter and the current performance parameter is greater than the preset threshold and the switching condition is met, the task execution device is controlled based on the second control strategy to execute the first task.

[0092] For example, based on the task type of the first task, a first control parameter corresponding to the first task is determined from a third parameter library, and the third parameter library includes initial control parameters corresponding to one or more task type closed-loop control strategies.

[0093] Step 303: Error monitoring;

[0094] Specifically, during the execution of the first task, the current performance parameters corresponding to the first task are obtained, and the error value between the target performance parameters and the current performance parameters is determined. The error value is used as the basis for the closed-loop control of the next cycle and whether to switch to the closed-loop control strategy.

[0095] In some embodiments, if the error value is greater than a preset threshold and the task progress is lower than the target progress, a closed-loop control module is called to perform closed-loop control.

[0096] Step 304: Open loop control.

[0097] The task execution device of the terminal is controlled based on an open-loop control strategy to execute a first task. Specifically, based on the task type and / or error value of the first task, a second control parameter corresponding to the first task is determined; and the control parameter of the task execution device is adjusted to the second control parameter to execute the first task.

[0098] If the first task is a task with a deadline, and the task execution device is a CPU, the control method may specifically include:

[0099] Event monitoring can specifically include:

[0100] Step a: The event detection module monitors the running state of the application program and identifies the occurrence of a first event (eg, an application startup event, a touch event, an interface refresh event, etc.).

[0101] Step b: When the occurrence of the first event is detected, an event trigger signal is sent to the task scheduling module;

[0102] Step c: The task scheduling module receives the event trigger signal and determines the task type of one or more tasks corresponding to the first event;

[0103] Step d: The task scheduling module determines the deadline (corresponding to the target performance parameter) corresponding to the task type from a preset first parameter library according to the task type.

[0104] The deadline of the task is set according to different application scenarios to ensure the timeliness and effectiveness of frequency adjustment. For example, for game, video and browser applications, there are different requirements for the frequency of interface refresh and the response time of touch events.

[0105] Closed-loop control can specifically include:

[0106] Step a: The closed-loop control module (such as a PID controller) obtains the target performance parameters and error values ​​corresponding to the current task.

[0107] Step b: The PID control algorithm calculates the adjustment amount of the CPU frequency according to the target performance parameter and the error value, and continuously adjusts the CPU frequency to reduce the error value until the task is completed or the open-loop control strategy is called.

[0108] For example, for an application startup task, the deadline is 100ms. The CPU frequency is adjusted through the closed-loop control module so that the application startup is completed within 100ms. If it is not completed within 100ms and the switching conditions are met, the open-loop control is triggered. For another example, for an interface refresh, the deadline is 15ms. The CPU frequency is adjusted through the closed-loop control module. If it is not completed within 15ms and the switching conditions are met, the open-loop control is triggered.

[0109] Open-loop control can specifically include:

[0110] Step a: extracting corresponding open-loop control parameters (corresponding to the second control parameters) according to the task type and / or error value.

[0111] Step b: The open-loop control module uses the extracted open-loop control parameters to adjust the CPU frequency so that the CPU performance is close to the performance requirements of the current task.

[0112] In some embodiments, after the open-loop control, the closed-loop control strategy may continue to be called to continuously optimize the system performance for the first task.

[0113] The above technical solution has the following beneficial effects:

[0114] Reduce maintenance costs. By dynamically adjusting parameters, the reliance on static tables is reduced, thus reducing maintenance costs.

[0115] Improve system performance, combine open-loop and closed-loop control, achieve fast response and continuous optimization, and improve the overall system performance.

[0116] Enhanced robustness: PID closed-loop control provides better robustness and can maintain stable performance in a variety of scenarios.

[0117] Improve adaptability and be able to adaptively adjust CPU frequency according to different application scenarios to meet various performance requirements.

[0118] To implement the method of the embodiment of the present application, based on the same inventive concept, the embodiment of the present application also provides a terminal control device, such as Figure 4 As shown, the terminal control device 40 includes:

[0119] A determination unit 401 is used to determine a target performance parameter corresponding to a first task;

[0120] A first control unit 402, configured to control a task execution device of the terminal based on a first control strategy to execute a first task;

[0121] An acquisition unit 403 is used to acquire a current performance parameter corresponding to the first task during the execution of the first task;

[0122] The second control unit 404 is used to control the task execution device based on the second control strategy to execute the first task when the error value between the target performance parameter and the current performance parameter is greater than a preset threshold, and the first control strategy and the second control strategy are different.

[0123] In some embodiments, the determination unit 401 is used to generate a trigger signal when monitoring the occurrence of a first event; in response to the trigger signal, determine the task type of one or more tasks corresponding to the first event, the one or more tasks including the first task; based on the task type of the first task, determine the target performance parameters corresponding to the first task from a first parameter library, the first parameter library including the correspondence between one or more task types and the target performance parameters.

[0124] In some embodiments, the determining unit 401 is further configured to configure the first parameter library based on the device type of the terminal and the performance requirements of different task types.

[0125] In some embodiments, the first control strategy is an open-loop control strategy, and the second control strategy is a closed-loop control strategy.

[0126] In some embodiments, the first control strategy includes: determining a first control parameter corresponding to the first task from a second parameter library based on the task type of the first task, the second parameter library including a correspondence between one or more task types and control parameters; adjusting the control parameter of the task execution device to the first control parameter to execute the first task;

[0127] The second control strategy includes: determining the second control parameter corresponding to the first task by using a closed-loop control algorithm according to the error value between the target performance parameter and the current performance parameter; adjusting the control parameter of the task execution device to the second control parameter to execute the first task; obtaining the current performance parameter corresponding to the first task during the execution of the first task; and updating the second control parameter by using a closed-loop control algorithm according to the error value between the target performance parameter and the current performance parameter when the error value between the target performance parameter and the current performance parameter is greater than a preset threshold, until the error value between the target performance parameter and the current performance parameter is less than or equal to the preset threshold, or the execution of the first task is completed.

[0128] In some embodiments, the first control strategy is a closed-loop control strategy, and the second control strategy is an open-loop control strategy.

[0129] In some embodiments, the first control strategy includes: initializing a first control parameter corresponding to the first task based on the task type of the first task; adjusting the control parameter of the task execution device to the first control parameter to execute the first task; during the execution of the first task, obtaining the current performance parameter corresponding to the first task; when the error value between the target performance parameter and the current performance parameter is greater than a preset threshold and the switching condition is not met, using a closed-loop control algorithm to update the first control parameter according to the error value between the target performance parameter and the current performance parameter until the error value between the target performance parameter and the current performance parameter is less than or equal to the preset threshold, or the first task is completed; when the error value between the target performance parameter and the current performance parameter is greater than the preset threshold and the switching condition is met, controlling the task execution device based on the second control strategy to execute the first task;

[0130] The second control strategy includes: based on the task type of the first task, determining the second control parameter corresponding to the first task from a second parameter library, the second parameter library including the correspondence between one or more task types and control parameters; adjusting the control parameter of the task execution device to the second control parameter to execute the first task.

[0131] In some embodiments, the task execution device includes at least one of the following: a central processing unit, a graphics processing unit, a neural network processor, a memory controller, and a bus system.

[0132] In practical applications, the above device can be a terminal or a chip applied to a terminal. In the present application, the device can realize the functions of multiple units by software, hardware, or a combination of software and hardware, so that the device can execute the terminal control method provided in any of the above embodiments. The technical effects of each technical solution of the device can refer to the technical effects of the corresponding technical solution in the terminal control method, and this application will not elaborate on this one by one.

[0133] The present application also provides a terminal, such as Figure 5 As shown, the terminal control device 50 includes: a processor 501 and a memory 502 configured to store a computer program that can be run on the processor;

[0134] The processor 501 is configured to execute the method steps in the aforementioned embodiment when running a computer program.

[0135] Of course, in practical applications, Figure 5As shown, the various components in the terminal control device 50 are coupled together through a bus system 503. It can be understood that the bus system 503 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 503 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, various buses are marked as bus system 503 in the figure.

[0136] In practical applications, the processor may be at least one of an application-specific integrated circuit (ASIC), a digital signal processing device (DSPD), a programmable logic device (PLD), a field-programmable gate array (FPGA), a controller, a microcontroller, and a microprocessor. It is understandable that for different devices, the electronic device used to implement the functions of the processor may also be other, and the embodiments of the present application do not specifically limit this.

[0137] The above-mentioned memory can be a volatile memory (volatile memory), such as a random access memory (RAM); or a non-volatile memory (non-volatile memory), such as a read-only memory (ROM), a flash memory, a hard disk (HDD) or a solid-state drive (SSD); or a combination of the above-mentioned types of memory, and provide instructions and data to the processor.

[0138] The terminal control device may be a chip used to implement the method steps in the aforementioned embodiment.

[0139] Optionally, the chip may further include an input interface, wherein the processor may control the input interface to communicate with other devices or chips, and specifically, may obtain information or data sent by other devices or chips.

[0140] Optionally, the chip may further include an output interface, wherein the processor may control the output interface to communicate with other devices or chips, and specifically, may output information or data to other devices or chips.

[0141] Optionally, the chip can be applied to the terminal in the embodiments of the present application to implement the corresponding processes of the various methods in the embodiments of the present application. For the sake of brevity, they will not be described here.

[0142] In an exemplary embodiment, the embodiment of the present application further provides a computer-readable storage medium, such as a memory including a computer program, and the computer program can be executed by a processor of a terminal to complete the steps of the aforementioned method.

[0143] An embodiment of the present application further provides a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of any one of the methods described in the embodiments of the present application are implemented.

[0144] Optionally, the computer program product can be applied to the terminal in the embodiments of the present application, and the computer program instructions enable the computer to execute the corresponding processes of the various methods in the embodiments of the present application. For the sake of brevity, they are not repeated here.

[0145] The embodiment of the present application also provides a computer program.

[0146] Optionally, the computer program may be applied to a terminal in an embodiment of the present application. When the computer program runs on a computer, the computer executes corresponding processes of the various methods in the embodiments of the present application. For the sake of brevity, details are not given here.

[0147] It should be understood that in the embodiments of the present application, related data such as user information is involved. When the embodiments of the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0148] It should be understood that the terms used in the present application are only for the purpose of describing specific embodiments, but are not intended to limit the present application. The singular forms of "a", "said" and "the" used in the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in this article refers to and includes any or all possible combinations of one or more associated listed items. The expressions "having", "may have", "include" and "include", or "may include" and "may include" in this application can be used to indicate the presence of corresponding features (e.g., elements such as numerical values, functions, operations or components), but the presence of additional features is not excluded.

[0149] It should be understood that although the terms first, second, third, etc. may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other and are not necessarily used to describe a specific order or sequence. For example, without departing from the scope of the present invention, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information.

[0150] The technical solutions described in the embodiments of the present application can be combined arbitrarily without conflict.

[0151] In the several embodiments provided in the present application, it should be understood that the disclosed methods, devices and equipment can be implemented in other ways. The embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0152] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0153] In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be a separate unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0154] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.

Claims

1. A terminal control method, characterized in that: The method comprises: Determining a target performance parameter corresponding to the first task; Controlling the task execution device of the terminal based on the first control strategy to execute the first task; During the execution of the first task, obtaining a current performance parameter corresponding to the first task; When the error value between the target performance parameter and the current performance parameter is greater than a preset threshold, the task execution device is controlled based on a second control strategy to execute the first task, and the first control strategy and the second control strategy are different.

2. The method according to claim 1, characterized in that The method further comprises: When the first event is monitored to occur, a trigger signal is generated; In response to the trigger signal, determining a task type of one or more tasks corresponding to the first event, the one or more tasks including the first task; Based on the task type of the first task, a target performance parameter corresponding to the first task is determined from a first parameter library, where the first parameter library includes a correspondence between one or more task types and target performance parameters.

3. The method according to claim 2, characterized in that The method further comprises: The first parameter library is configured based on the device type of the terminal and the performance requirements of different task types.

4. The method according to any one of claims 1 to 3, characterized in that: The first control strategy is an open-loop control strategy, and the second control strategy is a closed-loop control strategy.

5. The method according to claim 4, characterized in that The first control strategy includes: Based on the task type of the first task, determining a first control parameter corresponding to the first task from a second parameter library, wherein the second parameter library includes a correspondence between one or more task types and control parameters; adjusting a control parameter of the task execution device to the first control parameter to execute the first task; The second control strategy includes: Determine a second control parameter corresponding to the first task using a closed-loop control algorithm according to an error value between the target performance parameter and the current performance parameter; adjusting a control parameter of the task execution device to the second control parameter to execute the first task; During the execution of the first task, obtaining a current performance parameter corresponding to the first task; When the error value between the target performance parameter and the current performance parameter is greater than a preset threshold, the closed-loop control algorithm is used to update the second control parameter based on the error value between the target performance parameter and the current performance parameter until the error value between the target performance parameter and the current performance parameter is less than or equal to the preset threshold, or the first task is completed.

6. The method according to any one of claims 1 to 3, characterized in that: The first control strategy is a closed-loop control strategy, and the second control strategy is an open-loop control strategy.

7. The method according to claim 6, characterized in that The first control strategy includes: Initializing a first control parameter corresponding to the first task based on a task type of the first task; adjusting a control parameter of the task execution device to the first control parameter to execute the first task; During the execution of the first task, obtaining a current performance parameter corresponding to the first task; When the error value between the target performance parameter and the current performance parameter is greater than a preset threshold and the switching condition is not met, a closed-loop control algorithm is used to update the first control parameter according to the error value between the target performance parameter and the current performance parameter until the error value between the target performance parameter and the current performance parameter is less than or equal to the preset threshold, or the first task is completed; When the error value between the target performance parameter and the current performance parameter is greater than a preset threshold and the switching condition is met, controlling the task execution device based on a second control strategy to execute the first task; The second control strategy includes: Based on the task type of the first task, determining a second control parameter corresponding to the first task from a second parameter library, where the second parameter library includes a correspondence between one or more task types and control parameters; The control parameters of the task execution device are adjusted to the second control parameters to execute the first task.

8. The method according to claim 1, characterized in that: The task execution device includes at least one of the following: a central processing unit, a graphics processing unit, a neural network processor, a memory controller, and a bus system.

9. A terminal control device, characterized in that: The device comprises: A determination unit, configured to determine a target performance parameter corresponding to the first task; A first control unit, configured to control a task execution device of the terminal based on a first control strategy to execute the first task; an acquisition unit, configured to acquire a current performance parameter corresponding to the first task during execution of the first task; The second control unit is used to control the task execution device based on a second control strategy to execute the first task when the error value between the target performance parameter and the current performance parameter is greater than a preset threshold, and the first control strategy and the second control strategy are different.

10. A terminal control device, characterized in that: The device comprises: a processor and a memory configured to store a computer program capable of being executed on the processor, Wherein, the processor is configured to execute the steps of the method according to any one of claims 1 to 8 when running the computer program.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.

12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.