Scheduling optimization method and device, equipment and storage medium

Through the optimization method of grouping resource scheduling, the problem of system thread scheduling is solved and the problem of excessive dispersion and excessive consumption of resources is achieved, and more efficient resource utilization and system performance improvement is achieved.

CN120144245APending Publication Date: 2025-06-13SHENZHEN TCL DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510155014.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-11
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

In the prior art, system thread scheduling is too scattered and consumes system resources excessively, and cannot meet system scheduling needs.

Method used

By responding to scheduling optimization requests, the target business process and its corresponding business process group and number of running processes are obtained, group resource scheduling is performed, and the scheduling results are optimized to reduce the probability of stuttering and losing frames and system power consumption.

Benefits of technology

It realizes unified grouping resource scheduling of the target business process group, reduces the probability of lag and frame drop in the running scenario, improves the same allocation scheduling of resources, and thus reduces system power consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120144245A_ABST
    Figure CN120144245A_ABST
Patent Text Reader

Abstract

The invention provides a scheduling optimization method and device, equipment and a storage medium, and the scheduling optimization method comprises the steps: obtaining a target business process corresponding to a scheduling optimization request in response to the scheduling optimization request; obtaining a target business process group corresponding to the target business process and the number of running processes in the target business process group; and performing grouping resource scheduling according to the target business process group and the number of the running processes to obtain a scheduling optimization result. In the terminal operation process, each target service process is grouped, and the same group resource scheduling optimization is performed according to the state of each target service process in each target service process group and the number of the operation processes, so that the jamming and frame loss probability of an operation scene corresponding to the target service process group is reduced, the same resource allocation scheduling is improved, and the resource scheduling efficiency is improved. And system power consumption is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and particularly relates to a scheduling optimization method, apparatus, device, and storage medium. Background Art

[0002] Currently, during the operation of intelligent electronic devices, it is necessary to optimize and update the CPU resources in the intelligent electronic devices, so as to maximize the utilization of the CPU hardware resources in the intelligent electronic devices to meet the reasonable scheduling of system tasks under system overload or extreme scenarios. However, the existing resource scheduling method performs fair allocation through CFS (Completely Fair Scheduler) or a real-time scheduler, which causes various system threads to run dispersedly on different processors, unable to achieve unified resource allocation and scheduling, and there is a situation of excessive consumption of system resources due to frequent scheduling, unable to meet the system scheduling requirements. Summary of the Invention

[0003] Embodiments of this application provide a scheduling optimization method, apparatus, device, and storage medium, aiming to solve the technical problem that system thread scheduling in the prior art is too dispersed and consumes excessive system resources.

[0004] On the one hand, embodiments of this application provide a scheduling optimization method, and the scheduling optimization method includes the following steps:

[0005] Respond to a scheduling optimization request, and obtain a target service process corresponding to the scheduling optimization request;

[0006] Obtain a target service process group corresponding to the target service process, and the number of running processes in the target service process group;

[0007] Perform grouped resource scheduling according to the target service process group and the number of running processes to obtain a scheduling optimization result.

[0008] In a possible implementation manner of this application, before obtaining the target service process group of the target service process, it further includes:

[0009] Respond to a process grouping request, and obtain each running service process corresponding to the process grouping request;

[0010] Perform process grouping on each running service process according to the process scenario identifier of the running service process to obtain an initial process group corresponding to the process grouping request;

[0011] Configure the initial process group according to the process control block corresponding to each running service process to obtain a service process group.

[0012] In a possible implementation manner of the present application, the configuring the initial process group according to the process control blocks corresponding to the respective running service processes to obtain a service process group includes:

[0013] Obtain the process group linked list corresponding to the initial process group;

[0014] Obtain the head of the service process linked list associated with the running service process in the process control block corresponding to the running service process;

[0015] Update the process group linked list by using the head of the service process linked list to obtain a target service process group.

[0016] In a possible implementation manner of the present application, the performing grouped resource scheduling according to the target service process group and the number of running processes to obtain a scheduling optimization result includes:

[0017] Obtain the target scheduling core corresponding to the target service process group and the current running frequency of the target scheduling core;

[0018] Determine a scheduling optimization strategy for the target scheduling core according to the process running states of the respective target service processes in the target service process group and the number of running processes;

[0019] Perform scheduling update on the current running frequency according to the scheduling optimization strategy to obtain a target running frequency.

[0020] In a possible implementation manner of the present application, the determining a scheduling optimization strategy for the target scheduling core according to the process running states of the respective target service processes in the target service process group and the number of running processes includes:

[0021] Obtain the process running states of the respective target service processes in the target service process group and the number of running processes of the target service process group;

[0022] If the process running state is the first running state and the number of running processes is greater than a preset first process number threshold, determine that the scheduling optimization strategy for the target scheduling core is the first scheduling optimization strategy;

[0023] If the process running state is the second running state or the number of running processes is less than the preset first process number threshold, determine that the scheduling optimization strategy for the target scheduling core is the second scheduling optimization strategy.

[0024] In a possible implementation manner of the present application, the performing scheduling update on the current running frequency according to the scheduling optimization strategy to obtain a target running frequency includes:

[0025] Determine the target scheduling core as the process scheduling core corresponding to the target service process;

[0026] If the scheduling optimization policy is the first scheduling optimization policy, increase the current operating frequency of the process scheduling core based on the first scheduling optimization policy to obtain the first target operating frequency;

[0027] If the scheduling optimization policy is the second scheduling optimization policy, decrease the current operating frequency of the process scheduling core based on the second scheduling optimization policy to obtain the second target operating frequency.

[0028] In a possible implementation manner of the present application, after obtaining the target service process group corresponding to the target service process and the number of running processes in the target service process group, it further includes:

[0029] If the number of running processes is greater than the second process quantity threshold corresponding to the target service process group, obtain the target migration process in the target service process group;

[0030] Migrate the target migration process to the target migration process group according to the process migration identifier associated with the target migration process and the preset callback function.

[0031] On the other hand, the present application provides a scheduling optimization device, and the scheduling optimization device includes:

[0032] A process acquisition module, configured to respond to a scheduling optimization request and acquire the target service process corresponding to the scheduling optimization request;

[0033] A process grouping module, configured to acquire the target service process group corresponding to the target service process and the number of running processes in the target service process group;

[0034] A scheduling optimization module, configured to perform grouped resource scheduling according to the target service process group and the number of running processes to obtain a scheduling optimization result.

[0035] On the other hand, the present application further provides a scheduling optimization device, and the scheduling optimization device includes:

[0036] One or more processors;

[0037] A memory; and

[0038] One or more applications, where the one or more applications are stored in the memory and configured to be executed by the processor to implement the steps of the scheduling optimization method.

[0039] On the other hand, the present application also provides a computer-readable storage medium, on which a computer program is stored. The computer program is loaded by a processor to execute the steps in the scheduling optimization method described above.

[0040] In the present application, by responding to a scheduling optimization request, a target service process corresponding to the scheduling optimization request is obtained; a target service process group corresponding to the target service process is obtained, as well as the number of running processes in the target service process group; and group resource scheduling is performed according to the target service process group and the number of running processes to obtain a scheduling optimization result. It realizes grouping of each target service process during the operation of the terminal, and performs unified grouping resource scheduling optimization according to the status of each target service process and the number of running processes in each target service process group, so as to reduce the probability of frame freezing and frame loss in the running scenario corresponding to the target service process group, improve the unified allocation and scheduling of resources, and further reduce the system power consumption. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention, and those skilled in the art can obtain other drawings based on these drawings without creative efforts.

[0042] Figure 1 It is a schematic diagram of the scenario of the scheduling optimization method in the embodiment of the present application;

[0043] Figure 2 It is a schematic flowchart of an embodiment of the scheduling optimization method in the embodiment of the present application;

[0044] Figure 3 It is a schematic flowchart of an embodiment of scheduling and updating the current operating frequency in the scheduling optimization method in the embodiment of the present application;

[0045] Figure 4 It is a schematic flowchart of an embodiment of process migration of running processes in a target service process group in the scheduling optimization method provided by the embodiment of the present application;

[0046] Figure 5 It is a schematic structural diagram of an embodiment of the scheduling optimization device provided by the embodiment of the present application;

[0047] Figure 6 It is a schematic structural diagram of an embodiment of the scheduling optimization device provided by the embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0048] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present invention.

[0049] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "transverse", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc. indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings. It is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus cannot be construed as a limitation of the present invention. In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of the described features. In the description of the present invention, "a plurality" means two or more, unless otherwise specifically defined.

[0050] In the present application, the term "exemplary" is used to mean "serving as an example, illustration, or explanation". Any embodiment described as "exemplary" in the present application is not necessarily to be construed as more preferred or more advantageous than other embodiments. In order for any person skilled in the art to implement and use the present invention, the following description is given. In the following description, details are set forth for the purpose of explanation. It should be understood that those of ordinary skill in the art can recognize that the present invention can be implemented without the use of these specific details. In other instances, well-known structures and processes are not described in detail to avoid unnecessary details from obscuring the description of the present invention. Therefore, the present invention is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features disclosed in the present application.

[0051] At present, during the operation of intelligent electronic devices, it is necessary to optimize and update the CPU resources in the intelligent electronic devices, so as to maximize the utilization of the CPU hardware resources in the intelligent electronic devices to meet the reasonable scheduling of system tasks under system overload or extreme scenarios. However, the existing resource scheduling method is to perform fair allocation through CFS (Completely Fair Scheduler) or a real-time scheduler, which causes various system threads to run dispersedly on different processors, unable to achieve unified resource allocation and scheduling, and there is a situation where frequent scheduling leads to excessive consumption of system resources, unable to meet the system scheduling requirements.

[0052] Based on this, the present application proposes a scheduling optimization method, device, equipment, and computer-readable storage medium to solve the technical problems of overly dispersed system thread scheduling and excessive consumption of system resources in the prior art.

[0053] The scheduling optimization method in the embodiments of the present invention is applied to a scheduling optimization device, the scheduling optimization device is set in a scheduling optimization equipment, and one or more processors, a memory, and one or more application programs are set in the scheduling optimization equipment. One or more application programs are stored in the memory and are configured to be executed by the processor to implement the scheduling optimization method; among them, the scheduling optimization equipment can be an intelligent terminal, such as a mobile phone, a tablet computer, a network device, and an intelligent computer, etc.; optionally, the scheduling optimization equipment can also be a server, or a service cluster composed of multiple servers.

[0054] As Figure 1 shown, Figure 1 is a schematic diagram of the scenario of the scheduling optimization method in the embodiments of the present application. In the embodiments of the present invention, the scheduling optimization scenario includes a scheduling optimization equipment 100 (the scheduling optimization device is integrated in the scheduling optimization equipment 100), and a computer-readable storage medium corresponding to the scheduling optimization method runs in the scheduling optimization equipment 100 to execute the steps of the scheduling optimization method.

[0055] It can be understood that, Figure 1 the scheduling optimization equipment in the scheduling optimization method scenario shown, or the device included in the scheduling optimization equipment does not constitute a limitation to the embodiments of the present invention. That is, the number of devices of the scheduling optimization equipment, the types of devices included in the scheduling optimization method scenario, or the number of devices and the types of devices included in each device do not affect the overall implementation of the technical solution in the embodiments of the present invention, and can all be regarded as equivalent replacements or derivatives of the technical solution required to be protected in the embodiments of the present invention.

[0056] In the embodiments of the present invention, the scheduling optimization equipment 100 is mainly used for: responding to a scheduling optimization request and obtaining the target service process corresponding to the scheduling optimization request;

[0057] Obtain the target service process group corresponding to the target service process, and the number of running processes in the target service process group;

[0058] Perform grouped resource scheduling according to the target service process group and the number of running processes to obtain a scheduling optimization result.

[0059] The scheduling optimization device 100 in the embodiments of the present invention may be an independent scheduling optimization device, such as intelligent terminals such as mobile phones, tablet computers, network devices, servers, and intelligent computers, or may be a scheduling optimization network or a scheduling optimization cluster composed of multiple scheduling optimization devices.

[0060] The embodiments of the present application provide a scheduling optimization method, device, equipment, and computer-readable storage medium, which will be described in detail below.

[0061] Those skilled in the art can understand that Figure 1 the application environment shown is only one application scenario related to the solution of the present application, and does not constitute a limitation on the application scenario of the solution of the present application. Other application environments may also include more or fewer scheduling optimization devices than Figure 1 shown, or the connection relationship of the scheduling optimization network. For example Figure 1 only one scheduling optimization device is shown in. It can be understood that the scenario of this scheduling optimization method may also include one or more scheduling optimization devices, which will not be specifically limited here; the scheduling optimization device 100 may also include a memory for storing process data and other data.

[0062] It should be noted that Figure 1 the schematic diagram of the scenario of the scheduling optimization method shown is only an example. The scenario of the scheduling optimization method described in the embodiments of the present invention is for more clearly explaining the technical solution of the embodiments of the present invention, and does not constitute a limitation on the technical solution provided by the embodiments of the present invention.

[0063] Based on the scenario of the above scheduling optimization method, various embodiments of the scheduling optimization method disclosed in the present invention are proposed.

[0064] As Figure 2 shown, Figure 2 is a schematic flowchart of an embodiment of the scheduling optimization method in the embodiments of the present application. The scheduling optimization method includes the following steps 201 to step 203:

[0065] 201. Respond to the scheduling optimization request and obtain the target service process corresponding to the scheduling optimization request;

[0066] The scheduling optimization method in this embodiment is applied to a scheduling optimization device. The types and quantities of the scheduling optimization devices are not specifically limited. That is, the scheduling optimization device can be one or more intelligent terminals or servers. In a specific embodiment, the scheduling optimization device is an intelligent computer.

[0067] Among them, the target service process is a service process or thread in each running service process of the scheduling optimization device that awaits CPU resource scheduling. In a specific embodiment, the target service process can be the service process or thread corresponding to system process switching.

[0068] Specifically, to avoid the situation where various existing system schedulings cause various running processes or running processes in the system to run dispersedly on different CPUs (Central Processing Units, task processors), resulting in stuttering and frame dropping in corresponding application scenarios. During operation, the scheduling optimization device also responds to a scheduling optimization request. Among them, the scheduling optimization request is an operation request that drives the scheduling optimization device to perform grouped scheduling on the target service process and the corresponding target service process group, and uniformly coordinates terminal resources. The triggering method of the scheduling optimization request is not specifically limited here. That is, the scheduling optimization request can be actively triggered by the user. For example, the user actively triggers the scheduling optimization request for each target service process in the scheduling optimization device by clicking the scheduling optimization button in the scheduling optimization device (where the scheduling optimization button can be a physical button in the scheduling optimization device or a virtual button control on the scheduling optimization setting interface). In addition, the scheduling optimization request can also be automatically triggered by the scheduling optimization device. For example, a scheduling optimization process is set in the scheduling optimization device, and when each process or thread in the terminal meets the scheduling optimization conditions, the scheduling optimization request is automatically triggered.

[0069] Specifically, after obtaining the scheduling optimization request, the scheduling optimization device parses the scheduling optimization request to determine the target service process corresponding to the scheduling optimization request. Among them, the target service process can be divided into a game service process, an interface display process, a rendering service process, a system frame rate process, etc. according to different process scenario identifiers.

[0070] Among them, the game service process represents that the process scenario identifier is a game service scenario and is a service process for running game applications in the scheduling optimization device.

[0071] The interface display process represents that the process scenario identifier is an interface display scenario and is a service process or thread for displaying a specified user interaction interface in the scheduling optimization device.

[0072] The rendering service process represents that the process scenario identifier is a rendering service scenario and is a service process or thread for rendering a specified scenario in the scheduling optimization device.

[0073] The system frame rate process is a process scenario identifier characterized as a frame rate control scenario, which is a service process or thread used to set the terminal display frame rate in a scheduling optimization device.

[0074] Specifically, in order to achieve scheduling optimization for each target service process, the scheduling optimization device also pre-groups the running service processes in the scheduling optimization device to generate a service process group containing the running service processes corresponding to the same application scenario, and uniformly sets the running service processes corresponding to this service process group to run in the same scheduling core. Then, in the subsequent process, resources are uniformly scheduled for the scheduling core corresponding to this service process group to reduce the probability of stuttering and frame dropping in the service scenario corresponding to this service process group and improve the running fluency of this service scenario.

[0075] Among them, this service process group is a service process combination containing similar running service processes (or threads) with a specified same process scenario identifier. For example, in a specific embodiment, this service process group can be a game process group (game_frame_boost_group), an interface process group, a rendering process group (default_frame_boost_group), and a frame rate process group (sf_composition_group), etc. Different service process groups can be set with different scheduling cores to run the service running processes in this service process group.

[0076] Optionally, during the operation of the scheduling optimization device, in response to a process grouping request, it obtains each running service process corresponding to this process grouping request, where this running service process can be each service process or thread in the running state of this scheduling optimization device.

[0077] Specifically, after the scheduling optimization device obtains each running service process, it also obtains the process scenario identifier of the running service process, and groups the running service processes according to this process scenario identifier, and divides the running service processes with the same process scenario identifier into the same running process group to obtain the initial process group corresponding to this process grouping request. That is, the scheduling optimization device determines the service scenario / task corresponding to this running service process by parsing this process scenario identifier, and divides the running service processes with the same service scenario or task into the same running process group to obtain the initial process group.

[0078] Specifically, the scheduling optimization device also configures this initial process group according to the process control block corresponding to each running service process to obtain a service process group. That is, the scheduling optimization device pre-sets a process group linked list corresponding to each initial process group, and configures this process group linked list according to the service process linked list head in this process control block. Among them, this process group linked list is a linked list used to maintain each running service process existing in the initial process group.

[0079] Specifically, the scheduling optimization device obtains the head of the service process linked list associated with the running service process in the process control block corresponding to the running service process. Wherein, the process control block is a PCB data structure. The head of the service process linked list is a customized linked list head characterizing the running service process.

[0080] Specifically, after obtaining the head of the service process linked list, the scheduling optimization device updates the process group linked list of the service process group by using the head of the service process linked list to obtain a service process group. That is, the scheduling optimization device adds the head of the service process linked list of each running service process in the initial process group to the process group linked list of the initial process group to generate a service process group.

[0081] Optionally, after generating the service process group, the scheduling optimization device also performs initialization and deletion operations on the running service processes or threads in each service process group in the core logic of process creation and process deletion in the terminal. That is, the running service processes or scenarios in each service process group can pass through the user input layer through input system call operations (i.e., I oct l call settings), so that the terminal kernel layer receives the process scenario identifier passed by the user input layer and adds different running service processes (threads) to the corresponding service process group, or deletes each running service process in the service process group.

[0082] 202. Obtain the target service process group corresponding to the target service process, and the number of running processes in the target service process group;

[0083] Specifically, after obtaining each target service process, the scheduling optimization device also obtains the target service process group corresponding to the target service process, and reads the number of running processes of the running service processes in the target service process group.

[0084] Specifically, after obtaining the target service process, the scheduling optimization device obtains the target process identifier corresponding to the target service process, and matches the target process identifier with the candidate process identifiers in each service process group, so as to determine the service process group containing the target service process, and determine the service process group containing the target service process as the target service process group.

[0085] Specifically, after obtaining the target service process group, the scheduling optimization device also counts the processes of each target service process in the target service process group to determine the number of running processes in the target service process group.

[0086] Specifically, the scheduling optimization device also obtains the process running status of each target service process in the target service process group. Wherein, the process running status is a status parameter corresponding to the load condition of the target service process or thread in the target service process group.

[0087] Optionally, in a specific embodiment, after obtaining the number of running processes of the target service process group, the scheduling optimization device also migrates the target service processes or running service processes in each target service process group according to the number of running processes, so as to prevent overloading in the target service process group from causing ineffective scheduling of other target service process groups.

[0088] 203. Perform grouped resource scheduling according to the target service process group and the number of running processes to obtain a scheduling optimization result.

[0089] Specifically, after obtaining the process running status and the number of running processes of the target service process group, the scheduling optimization device also performs grouped resource scheduling according to the process running status and the number of running processes of the target service process group to obtain a scheduling optimization result.

[0090] Specifically, after obtaining the target service process group to be scheduled and optimized, the scheduling optimization device also obtains the target scheduling core corresponding to the target service process group and the current running frequency of the target scheduling core. Wherein, the target scheduling core is the task processor core processing unit in the scheduling optimization device that runs each running service process in the target service process group. The current running frequency represents the instruction execution speed of the target scheduling core per unit time.

[0091] Specifically, after obtaining the target scheduling core and the current running frequency of the target scheduling core, the scheduling optimization device also determines the scheduling optimization strategy of the target scheduling core according to the process running status of each target service process in the target service process group and / or the number of running processes, wherein the scheduling optimization strategy is an optimization strategy for controlling and optimizing the running frequency of the target scheduling core. Optionally, in a specific embodiment, the scheduling optimization strategy includes a first scheduling optimization strategy for controlling the target scheduling core to increase the current running frequency and a second scheduling optimization strategy for controlling the target scheduling core to decrease the current running frequency.

[0092] Specifically, the scheduling optimization device runs the target service processes in the target service process group on the target scheduling core, selects the scheduling optimization strategy of the target scheduling core according to the process running status of the target service process and the number of running processes of the target service process group, and controls the internal frequency modulation interface in the scheduling optimization device to increase or decrease the current running frequency of the target scheduling core according to the scheduling optimization strategy to obtain a target running frequency, and drives the target scheduling core to run at the target running frequency, so as to meet the terminal resource scheduling requirements of the service environment corresponding to the target service process group.

[0093] In this embodiment, the scheduling optimization device obtains the target service process corresponding to the scheduling optimization request by responding to the scheduling optimization request; obtains the target service process group corresponding to the target service process and the number of running processes in the target service process group; and performs grouped resource scheduling according to the target service process group and the number of running processes to obtain a scheduling optimization result. It realizes grouping each target service process during the operation of the terminal, and performing unified grouped resource scheduling optimization according to the status of each target service process and the number of running processes in each target service process group, so as to reduce the probability of frame freezing and frame dropping in the running scenario corresponding to the target service process group, improve the unified allocation and scheduling of resources, and thereby reduce the system power consumption.

[0094] As Figure 3 shown, Figure 3 FIG. is a schematic flowchart of an embodiment for scheduling and updating the current operating frequency in the scheduling optimization method according to an embodiment of the present application. Specifically, in this embodiment, the scheduling optimization method further includes steps 301 to 303:

[0095] 301. Obtain the process running status of each target service process in the target service process group and the number of running processes in the target service process group;

[0096] 302. If the process running status is the first running status and the number of running processes is greater than a preset first process number threshold, determine that the scheduling optimization strategy of the target scheduling core is the first scheduling optimization strategy;

[0097] 303. If the process running status is the second running status or the number of running processes is less than a preset first process number threshold, determine that the scheduling optimization strategy of the target scheduling core is the second scheduling optimization strategy.

[0098] Based on the above embodiment, in this embodiment, after determining the target service process group to be scheduled and optimized, the scheduling optimization device further obtains the process running status of each target service process in the target service process group and the number of running processes in the target service process group.

[0099] Wherein, the process running status is a status parameter representing the process scheduling load status of the target service process. In a specific embodiment, the process running status includes a first running status indicating that the target service process is under high load and a second running status indicating that the target service process is under low load.

[0100] Specifically, after obtaining the process running status and the number of running processes of the target service process group, the scheduling optimization device also performs grouped resource scheduling based on the process running status and the number of running processes of the target service process group to obtain a scheduling optimization result. That is, the scheduling optimization device identifies the process running status and compares the number of running processes in the target service process group with a preset first process number threshold, so as to determine the scheduling optimization strategy corresponding to the target scheduling core for running the target service process group.

[0101] Optionally, if the scheduling optimization device determines that the process running status of the target service process is the first running status and the number of running processes is greater than the preset first process number threshold, the scheduling optimization device determines that the process load of the target service process group is relatively high, and it is necessary to increase the running frequency of the target scheduling core corresponding to the target service process group, and determines that the scheduling optimization strategy of the target scheduling core is the first scheduling optimization strategy;

[0102] Optionally, if the scheduling optimization device determines that the process running status of the target service process is the second running status or the number of running processes is less than the preset first process number threshold, the scheduling optimization device determines that the process load of the target service process group is relatively low, and determines that the scheduling optimization strategy of the target scheduling core is the second scheduling optimization strategy.

[0103] Specifically, after obtaining the scheduling optimization strategies of each target service process group, the scheduling optimization device determines the target scheduling core as the process scheduling core corresponding to the target service process. That is, each target service process in the target service process group runs on the target scheduling core, and adjusts the current running frequency of the process scheduling core according to the scheduling optimization strategy to obtain the corresponding target running frequency. Among them, the target running frequency is the running frequency of the task processor core that satisfies the stable operation of the service environment corresponding to the target service process group. Among them, the target running frequency is less than or equal to the maximum running frequency of the target scheduling core.

[0104] Optionally, if the scheduling optimization device determines that the scheduling optimization strategy is the first scheduling optimization strategy, it drives the internal frequency modulation interface to increase the current running frequency of the process scheduling core based on the first scheduling optimization strategy to obtain the first target running frequency, and drives the process scheduling core to run at the first target running frequency, so as to meet the terminal resource scheduling requirements of the service environment corresponding to the target service process group.

[0105] Optionally, if the scheduling optimization device determines that the scheduling optimization strategy is the second scheduling optimization strategy, it drives the internal frequency modulation interface to decrease the current running frequency of the process scheduling core based on the second scheduling optimization strategy to obtain the second target running frequency, and drives the process scheduling core to run at the second target running frequency, so as to reduce the terminal running power consumption on the premise of determining the stable operation of the target service environment.

[0106] In this embodiment, the scheduling optimization device obtains the process running status of each target service process in the target service process group and the number of running processes in the target service process group. If the process running status is the first running status and the number of running processes is greater than a preset first process number threshold, it is determined that the scheduling optimization strategy of the target scheduling core is the first scheduling optimization strategy. If the process running status is the second running status or the number of running processes is less than the preset first process number threshold, it is determined that the scheduling optimization strategy of the target scheduling core is the second scheduling optimization strategy. It realizes the grouped and unified scheduling optimization of the running processes (threads) of the same type of services according to the process running status and the number of running processes of the target service process group, so as to adjust the frequency of a certain target scheduling core in a targeted manner, realize the unified coordination of resources, and improve the running fluency of the service scenario.

[0107] As Figure 4 shown, Figure 4 FIG. is a schematic flowchart of an embodiment of process migration of running processes in a target service process group in the scheduling optimization method provided by an embodiment of the present application. Specifically, in this embodiment, the scheduling optimization method further includes steps 401 to 402:

[0108] 401. If the number of running processes is greater than the second process number threshold corresponding to the target service process group, obtain the target migration process in the target service process group;

[0109] 402. Migrate the target migration process to the target migration process group according to the process migration identifier associated with the target migration process and a preset callback function.

[0110] Specifically, in this embodiment, after obtaining the number of running processes of the target service process group, the scheduling optimization device also migrates the target service processes or running service processes in each target service process group according to the number of running processes, so as to avoid overloading in the target service process group and causing other target service process groups to not be effectively scheduled.

[0111] Specifically, in order to avoid too many running service processes in the target service process group, the scheduling optimization device also pre-sets a second process number threshold, and compares the second process number threshold with the number of running processes of the target service process group to determine whether it is necessary to migrate the running service processes in the target service process group, so as to update the number of running processes of the target service process group. Among them, the second process number threshold is greater than the first process number threshold.

[0112] Optionally, if the number of running processes is greater than the second process quantity threshold corresponding to the target service process group, it is determined that the number of running processes in the target service process group is relatively large, and it is necessary to migrate the running service processes in the target service process group, and the target migration process in the target service process group is obtained. Optionally, the scheduling optimization device can determine the running service process with a relatively high process load in the target service process group as the target migration process.

[0113] Specifically, after determining the target migration process to be scheduled, the scheduling optimization device also migrates the target migration process to the target migration process group according to the process migration identifier associated with the target migration process and a preset callback function. Wherein, the target migration process group is a newly created process group with the same process scenario identifier as the target service process group.

[0114] Specifically, after migrating the target migration process to the target migration process group, the scheduling optimization device also counts the number of updated processes in the target service process group, and performs group scheduling optimization on the target service process group according to the number of updated processes and the process running status of the target service process, so as to obtain a target scheduling optimization result.

[0115] In this embodiment, the scheduling optimization device determines that if the number of running processes is greater than the second process quantity threshold corresponding to the target service process group, then obtains the target migration process in the target service process group; and migrates the target migration process to the target migration process group according to the process migration identifier associated with the target migration process and a preset callback function. This effectively reduces the process load in the target service process group, avoids the situation where other tasks cannot be effectively scheduled due to excessive load in the target service process group, and thus reduces the probability of frame freezing and frame dropping in the running scenario corresponding to the target service process group.

[0116] To better implement the scheduling optimization method in the embodiments of the present application, based on the scheduling optimization method, an embodiment of the present application also provides a scheduling optimization device, as Figure 5 shown Figure 5 is a schematic structural diagram of an embodiment of the scheduling optimization device provided by the embodiment of the present application. Specifically, the scheduling optimization device 500 includes:

[0117] A process acquisition module 501, configured to respond to a scheduling optimization request and acquire a target service process corresponding to the scheduling optimization request;

[0118] A process grouping module 502, configured to acquire a target service process group corresponding to the target service process, and the number of running processes in the target service process group;

[0119] The scheduling optimization module 503 is configured to perform grouped resource scheduling according to the target service process group and the number of running processes, and obtain a scheduling optimization result.

[0120] In a possible implementation manner of this embodiment, before the scheduling optimization device obtains the target service process group of the target service process, it further includes:

[0121] Respond to a process grouping request, and obtain each running service process corresponding to the process grouping request;

[0122] Perform process grouping on each running service process according to the process scenario identifier of the running service process, and obtain an initial process group corresponding to the process grouping request;

[0123] Configure the initial process group according to the process control blocks corresponding to each running service process, and obtain a service process group.

[0124] In a possible implementation manner of this embodiment, when the scheduling optimization device configures the initial process group according to the process control blocks corresponding to each running service process to obtain a service process group, it includes:

[0125] Obtain the process group linked list corresponding to the initial process group;

[0126] Obtain the head of the service process linked list associated with the running service process in the process control block corresponding to the running service process;

[0127] Update the process group linked list by using the head of the service process linked list, and obtain a target service process group.

[0128] In a possible implementation manner of this embodiment, when the scheduling optimization device performs grouped resource scheduling according to the target service process group and the number of running processes to obtain a scheduling optimization result, it includes:

[0129] Obtain the target scheduling core corresponding to the target service process group, and the current operating frequency of the target scheduling core;

[0130] Determine the scheduling optimization strategy of the target scheduling core according to the process running states of the target service processes in the target service process group and the number of running processes;

[0131] Perform scheduling update on the current operating frequency according to the scheduling optimization strategy, and obtain a target operating frequency.

[0132] In a possible implementation manner of this embodiment, when the scheduling optimization device determines the scheduling optimization strategy of the target scheduling core according to the process running states of the target service processes in the target service process group and the number of running processes, it includes:

[0133] Obtain the process running status of each of the target service processes in the target service process group, and the number of running processes in the target service process group;

[0134] If the process running status is the first running status and the number of running processes is greater than a preset first process number threshold, determine that the scheduling optimization strategy of the target scheduling core is the first scheduling optimization strategy;

[0135] If the process running status is the second running status or the number of running processes is less than the preset first process number threshold, determine that the scheduling optimization strategy of the target scheduling core is the second scheduling optimization strategy.

[0136] In a possible implementation manner of this embodiment, the scheduling optimization device schedules and updates the current operating frequency according to the scheduling optimization strategy to obtain a target operating frequency, including:

[0137] Determine the target scheduling core as the process scheduling core corresponding to the target service process;

[0138] If the scheduling optimization strategy is the first scheduling optimization strategy, increase the current operating frequency of the process scheduling core based on the first scheduling optimization strategy to obtain a first target operating frequency;

[0139] If the scheduling optimization strategy is the second scheduling optimization strategy, decrease the current operating frequency of the process scheduling core based on the second scheduling optimization strategy to obtain a second target operating frequency.

[0140] In a possible implementation manner of this embodiment, after the scheduling optimization device obtains the target service process group corresponding to the target service process and the number of running processes in the target service process group, it further includes:

[0141] If the number of running processes is greater than a second process number threshold corresponding to the target service process group, obtain the target migration process in the target service process group;

[0142] Migrate the target migration process to the target migration process group according to the process migration identifier associated with the target migration process and a preset callback function.

[0143] In this embodiment, the scheduling optimization device obtains the target service process corresponding to the scheduling optimization request by responding to the scheduling optimization request; obtains the target service process group corresponding to the target service process and the number of running processes in the target service process group; performs grouped resource scheduling according to the target service process group and the number of running processes to obtain a scheduling optimization result. It realizes that during the operation of the terminal, each target service process is grouped, and grouped resource scheduling optimization is performed according to the status and number of running processes in each target service process group, so as to reduce the probability of frame freezing and frame dropping in the running scenario corresponding to the target service process group, improve the unified allocation and scheduling of resources, and further reduce the system power consumption.

[0144] An embodiment of the present invention also provides a scheduling optimization device, as Figure 6 shown, Figure 6 which is a schematic structural diagram of an embodiment of the scheduling optimization device provided in the embodiment of the present application.

[0145] The scheduling optimization device integrates any one of the scheduling optimization devices provided in the embodiments of the present invention. The scheduling optimization device includes:

[0146] One or more processors;

[0147] A memory; and

[0148] One or more application programs, where the one or more application programs are stored in the memory and are configured to be executed by the processor to perform the steps in the scheduling optimization method described in any one of the embodiments of the scheduling optimization method.

[0149] Specifically: The scheduling optimization device may include a processor 601 with one or more processing cores, a memory 602 with one or more computer-readable storage media, a power supply 603, an input unit 604, and other components. Those skilled in the art can understand that Figure 6 the structural diagram of the scheduling optimization device shown in

[0150] The processor 601 is the control center of the scheduling optimization device, connecting various parts of the entire scheduling optimization device through various interfaces and lines. By running or executing software programs and / or modules stored in the memory 602, and by invoking the data stored in the memory 602, it executes various functions of the scheduling optimization device and processes data, thereby monitoring the scheduling optimization device as a whole. Optionally, the processor 601 may include one or more processing cores; preferably, the processor 601 may integrate an application processor and a modem processor. Among them, the application processor mainly processes the operating system, user interface, application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor may not be integrated into the processor 601 either.

[0151] The memory 602 can be used to store software programs and modules. The processor 601 executes various functional applications and data processing by running the software programs and modules stored in the memory 602. The memory 602 mainly includes a program storage area and a data storage area. Among them, the program storage area can store the operating system, application programs required for at least one function (such as the sound playback function, image playback function, etc.); the data storage area can store the data created according to the use of the scheduling optimization device. In addition, the memory 602 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices. Correspondingly, the memory 602 may also include a memory controller to provide the processor 601 with access to the memory 602.

[0152] The scheduling optimization device further includes a power supply 603 for powering each component. Preferably, the power supply 603 can be logically connected to the processor 601 through a power management system, so as to realize functions such as management of charging, discharging, and power consumption management through the power management system. The power supply 603 may also include any components such as one or more DC or AC power supplies, a recharge system, a power failure detection circuit, a power converter or inverter, and a power status indicator.

[0153] The scheduling optimization device may further include an input unit 604, which can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.

[0154] Although not shown, the scheduling optimization device may further include a display unit, etc., which will not be elaborated here. Specifically, in this embodiment, the processor 601 in the scheduling optimization device will load the executable files corresponding to the processes of one or more application programs into the memory 602 according to the following instructions, and the processor 601 will run the application programs stored in the memory 602 to realize various functions as follows:

[0155] In response to a scheduling optimization request, obtain a target service process corresponding to the scheduling optimization request;

[0156] Obtain a target service process group corresponding to the target service process, and the number of running processes in the target service process group;

[0157] Perform grouped resource scheduling according to the target service process group and the number of running processes to obtain a scheduling optimization result.

[0158] In this embodiment, the scheduling optimization device obtains the target service process corresponding to the scheduling optimization request by responding to the scheduling optimization request; obtains the target service process group corresponding to the target service process, and the number of running processes in the target service process group; performs grouped resource scheduling according to the target service process group and the number of running processes to obtain a scheduling optimization result. During the operation of the terminal, each target service process is grouped, and the same grouped resource scheduling optimization is performed according to the status of each target service process and the number of running processes in each target service process group, so as to reduce the probability of frame freezing and frame dropping in the running scenario corresponding to the target service process group, improve the same resource allocation and scheduling, and thereby reduce the system power consumption.

[0159] For this reason, an embodiment of the present invention provides a computer-readable storage medium, which may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), a magnetic disk or an optical disc, etc. A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in any of the scheduling optimization methods provided by the embodiments of the present invention. For example, when the computer program is loaded by the processor, the following steps may be executed:

[0160] In response to a scheduling optimization request, obtain a target service process corresponding to the scheduling optimization request;

[0161] Obtain a target service process group corresponding to the target service process, and the number of running processes in the target service process group;

[0162] Perform grouped resource scheduling according to the target service process group and the number of running processes to obtain a scheduling optimization result.

[0163] In the above embodiments, the descriptions of the various embodiments have their own emphases. For parts not detailed in a certain embodiment, reference may be made to the detailed descriptions of other embodiments above, and details will not be repeated here.

[0164] In specific implementation, each of the above units or structures can be implemented as an independent entity, or can be arbitrarily combined and implemented as the same or several entities. For the specific implementation of each of the above units or structures, reference can be made to the foregoing method embodiments, which will not be elaborated herein.

[0165] For the specific implementation of each of the above operations, reference can be made to the foregoing embodiments, which will not be elaborated herein.

[0166] The above has introduced in detail a scheduling optimization method provided by an embodiment of the present application. In this article, specific embodiments are used to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation on the present invention.

Claims

1. A scheduling optimization method, characterized in that: The scheduling optimization method comprises: Responding to the scheduling optimization request, obtaining the target business process corresponding to the scheduling optimization request; Obtaining a target business process group corresponding to the target business process and the number of running processes in the target business process group; Group resource scheduling is performed according to the target business process group and the number of running processes to obtain a scheduling optimization result.

2. The scheduling optimization method according to claim 1, characterized in that: Before obtaining the target business process group corresponding to the target business process, the method further includes: In response to the process grouping request, each running service process corresponding to the process grouping request is obtained; Process grouping each running business process according to the process scenario identifier of the running business process to obtain an initial process group corresponding to the process grouping request; The initial process group is configured according to the process control blocks corresponding to each of the running business processes to obtain a business process group; The obtaining the target business process group corresponding to the target business process includes: A business process group including the target business process is determined as a target business process group.

3. The scheduling optimization method according to claim 2, characterized in that: The configuring the initial process group according to the process control blocks corresponding to the running business processes to obtain the business process group includes: Obtaining a process group linked list corresponding to the initial process group; Obtaining a business process linked list header associated with the running business process in a process control block corresponding to the running business process; The process group linked list is updated using the business process linked list header to obtain a business process group.

4. The scheduling optimization method according to claim 1, characterized in that: The performing group resource scheduling according to the target business process group and the number of running processes to obtain a scheduling optimization result includes: Obtaining a target scheduling core corresponding to the target business process group and a current operating frequency of the target scheduling core; Determine the scheduling optimization strategy of the target scheduling core according to the process running state of each of the target business processes in the target business process group and the number of running processes; The current operating frequency is scheduled and updated according to the scheduling optimization strategy to obtain a target operating frequency.

5. The scheduling optimization method according to claim 4, characterized in that: The scheduling optimization strategy includes a first scheduling optimization strategy and a second scheduling optimization strategy; The step of determining the scheduling optimization strategy of the target scheduling core according to the process running status of each target business process in the target business process group and the number of running processes includes: Obtaining the process running status of each of the target business processes in the target business process group and the number of running processes in the target business process group; If the process running state is the first running state and the number of running processes is greater than a preset first process number threshold, determining that the scheduling optimization strategy of the target scheduling core is the first scheduling optimization strategy; If the process running state is the second running state or the number of running processes is less than the preset first process number threshold, the scheduling optimization strategy of the target scheduling core is determined to be the second scheduling optimization strategy.

6. The scheduling optimization method according to claim 4, characterized in that: The target operating frequency includes a first target operating frequency and a second target operating frequency; The step of scheduling and updating the current operating frequency according to the scheduling optimization strategy to obtain a target operating frequency includes: Determine the target scheduling core as the process scheduling core corresponding to the target business process; If the scheduling optimization strategy is the first scheduling optimization strategy, then based on the first scheduling optimization strategy, the current operating frequency of the process scheduling core is increased to obtain a first target operating frequency; If the scheduling optimization strategy is the second scheduling optimization strategy, the current operating frequency of the process scheduling core is reduced based on the second scheduling optimization strategy to obtain a second target operating frequency.

7. The scheduling optimization method according to claim 1, characterized in that: After obtaining the target business process group corresponding to the target business process and the number of running processes in the target business process group, the method further includes: If the number of running processes is greater than a second process number threshold corresponding to the target business process group, obtaining a target migration process in the target business process group; The target migration process is migrated to a target migration process group according to a process migration identifier associated with the target migration process and a preset callback function.

8. A scheduling optimization device, characterized in that: The scheduling optimization device comprises: A process acquisition module is configured to respond to a scheduling optimization request and acquire a target business process corresponding to the scheduling optimization request; A process grouping module is configured to obtain a target business process group corresponding to the target business process and the number of running processes in the target business process group; The scheduling optimization module is configured to perform group resource scheduling according to the target business process group and the number of running processes to obtain a scheduling optimization result.

9. A scheduling optimization device, characterized in that: The scheduling optimization device comprises: one or more processors; Memory; and One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the steps of the scheduling optimization method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps of the scheduling optimization method according to any one of claims 1 to 7.