Computing resource allocation method and device, terminal equipment and storage medium

By dynamically adjusting the computing resources of the target running program, the performance problems caused by resource competition in the smart device operating system are solved, and the system startup speed and user experience are improved.

CN118939420APending Publication Date: 2024-11-12HUIZHOU TCL MOBILE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410978658.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-19
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

In smart device operating systems, due to third-party applications competing for limited IO resources, the system's operating performance is affected, especially during the program installation and startup stages. Insufficient resources lead to slow system startup and poor user experience.

Method used

通过确定目标运行程序的初始计算资源,并在其运行过程中检测是否出现未响应,若出现未响应,增加初始计算资源以确保目标运行程序能够正常运行,降低未响应的概率。

Benefits of technology

It effectively solves the problem of program failure caused by insufficient computing resources, and improves the system startup speed and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118939420A_ABST
    Figure CN118939420A_ABST
Patent Text Reader

Abstract

The invention provides a computing resource allocation method and device, terminal equipment and a storage medium, and the method comprises the steps: determining an initial computing resource of a target running program, and enabling the target running program to run according to the initial computing resource; detecting whether a program non-response occurs in the running process of the target running program or not; and if the target running program does not respond, adding the initial computing resource to the target computing resource, so that the target running program runs according to the target computing resource. According to the method provided by the invention, the preset initial computing resource can be allocated to the target running program, and the target running program can run according to the initial computing resource. If the target running program does not respond in the running process, it is represented that the target running program cannot run normally, and at the moment, more target computing resources than the initial computing resources can be allocated to the target running program, so that the computing resources of the target running program are increased, and the probability that the target running program does not respond is reduced.
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 computing resource allocation method, apparatus, terminal device and storage medium. Background Art

[0002] In recent years, with the development of smart devices, the operating systems of smart devices, such as Android, have been open, allowing a large number of third-party applications to enter the market, enriching user choices and experience. However, this openness also brings some challenges.

[0003] One of the main challenges is resource management, especially in terms of IO resources. Numerous third-party applications compete for limited resources, which seriously affects the overall system performance. In certain cases, especially during program installation and program startup, a large number of read and write operations will consume a lot of resources, resulting in slow system startup and poor user experience.

[0004] In the prior art, in order to solve the competition among various programs for computing resources, the computing resources that can be allocated by the programs are limited. However, this results in some programs not being able to run normally due to the bottleneck of computing resources. Therefore, it is necessary to solve this problem. Summary of the invention

[0005] The present application provides a computing resource allocation method, which can effectively solve the problem of insufficient computing resources in a program.

[0006] In a first aspect, the present application provides a computing resource allocation method, the method comprising:

[0007] Determining initial computing resources of a target running program so that the target running program runs according to the initial computing resources;

[0008] Detecting whether the target running program fails to respond during its running;

[0009] If the target running program fails to respond, the initial computing resources are added to the target computing resources so that the target running program runs according to the target computing resources. In some embodiments of the present application, determining the initial computing resources of the target running program includes:

[0010] Detecting whether there is a preset computing resource allocation table, wherein the computing resource allocation table includes a target correspondence relationship between application programs and computing resource allocation;

[0011] If the computing resource allocation table exists, and the computing resource allocation table includes the target running program;

[0012] According to the corresponding relationship between the target running program and the target, initial computing resources of the target running program are determined.

[0013] In some embodiments of the present application, determining the initial computing resources of the target running program includes:

[0014] Get the list of computing resource restrictions;

[0015] If the computing resource restriction list does not include the target running program, the computing resources of the target running program are not restricted;

[0016] If the computing resource restriction list includes the target running program and the target running program is running in the foreground, the initial computing resources of the target running program are determined.

[0017] In some embodiments of the present application, determining the initial computing resources of the target running program includes:

[0018] Determine the program type and program running stage of the target running program;

[0019] If the program type is an installation type application, determining the initial computing resources of the target running program;

[0020] If the program running phase is a startup phase of the target running program, initial computing resources of the target running program are determined.

[0021] In some embodiments of the present application, after detecting whether there is a preset computing resource allocation table, the method further includes:

[0022] If the computing resource allocation table does not exist, the computing resource allocation table is obtained from the target server.

[0023] In some embodiments of the present application, the method further includes a computing resource allocation level table, and the adding of the initial computing resources to the target computing resources further includes:

[0024] Determine an initial computing resource allocation level corresponding to the initial computing resource in the computing resource allocation level table;

[0025] Acquire a target computing resource allocation level that is higher than the initial computing resource allocation level;

[0026] Determine that the computing resource corresponding to the target computing resource allocation level is the target computing resource;

[0027] The initial computing resources are increased to the target computing resources.

[0028] In some embodiments of the present application, after increasing the initial computing resources to the target computing resources, the method further includes:

[0029] Replacing the initial target computing resource of the target running program in the computing resource allocation table with the target computing resource to obtain an updated computing resource allocation table;

[0030] The updated computing resource allocation table is uploaded to the target server.

[0031] In a second aspect, the present application further provides a computing resource allocation device, the device comprising:

[0032] A processing module, configured to determine initial computing resources of a target running program, so that the target running program runs according to the initial computing resources;

[0033] The processing module is also used to detect whether the target running program fails to respond during its running;

[0034] The processing module is further used to add the initial computing resources to the target computing resources if the target running program fails to respond, so that the target running program runs according to the target computing resources.

[0035] In a third aspect, the present application also provides a terminal device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps in any one of the computing resource allocation methods.

[0036] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, and the computer program is executed by a processor to implement the steps in any one of the computing resource allocation methods.

[0037] The computing resource allocation method provided in the present application can allocate preset initial computing resources to the target running program, and enable the target running program to run according to the initial computing resources. If the target running program does not respond during the running process, it indicates that the target running program cannot run normally. At this time, more target computing resources than the initial computing resources can be allocated to the target running program, so that the computing resources of the target running program are increased, and the probability of the target running program not responding is reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0039] Figure 1 is a scenario diagram of a computing resource allocation system provided in an embodiment of the present application;

[0040] Figure 2 It is a flowchart of an embodiment of the method for allocating computing resources in the embodiment of the present application;

[0041] Figure 3 It is a functional module diagram of a computing resource allocation device in an embodiment of the present application;

[0042] Figure 4 It is a schematic diagram of the structure of the terminal device in the embodiment of the present application. DETAILED DESCRIPTION

[0043] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0044] In the description of the present application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the feature. In the description of the present application, "plurality" means two or more, unless otherwise clearly and specifically defined.

[0045] In this application, the word "exemplary" is used to mean "used as an example, illustration or description". Any embodiment described as "exemplary" in this application is not necessarily to be construed as being more preferred or advantageous than other embodiments. At the same time, it is to be understood that in the specific implementation of this application, when user information, user data and other related data are involved, when the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data shall comply with relevant laws, regulations and standards of relevant countries and regions.

[0046] In order to enable any person skilled in the art to implement and use the present application, the following description is provided. In the following description, details are listed for the purpose of explanation. It should be understood that those of ordinary skill in the art will recognize that the present application can be implemented without using these specific details. In other examples, known structures and processes will not be elaborated in detail to avoid unnecessary details that make the description of the present application obscure. Therefore, the present application is not intended to be limited to the embodiments shown, but is consistent with the widest range of principles and features disclosed in the present application.

[0047] The present application provides a computing resource allocation method, apparatus, device and storage medium, which are described in detail below.

[0048] See also Figure 1 , Figure 1 The following is a schematic diagram of a computing resource allocation system provided in an embodiment of the present application. The computing resource allocation system may include a terminal device 100 and a storage device 200. The storage device 200 may transmit data to the terminal device 100. Figure 1 The terminal device 100 in the storage device 200 can obtain the target running program stored in the storage device 200 to execute the computing resource allocation method in the present application.

[0049] In the embodiment of the present application, the terminal device 100 includes but is not limited to a desktop computer, a portable computer, a network server, a PDA (Personal Digital Assistant), a tablet computer, a wireless terminal device, an embedded device, etc.

[0050] In the embodiments of the present application, the terminal device 100 and the storage device 200 can communicate with each other through any communication method, including but not limited to mobile communications based on the 3rd Generation Partnership Project (3GPP), Long Term Evolution (LTE), Worldwide Interoperability for Microwave Access (WiMAX), or computer network communications based on the TCP / IP Protocol Suite (TCP / IP), User Datagram Protocol (UDP), etc. It should be noted that the storage device 200 can also be built into the terminal device 100, and the specific embodiments of the present application are not limited thereto.

[0051] It should be noted that Figure 1The scenario diagram of the computing resource allocation system shown is only an example. The computing resource allocation system and scenario described in the embodiment of the present application are intended to more clearly illustrate the technical solution of the embodiment of the present application, and do not constitute a limitation on the technical solution provided in the embodiment of the present application. Ordinary technicians in this field can know that with the evolution of the computing resource allocation system and the emergence of new business scenarios, the technical solution provided in the embodiment of the present application is also applicable to similar technical problems.

[0052] like Figure 2 As shown, Figure 2 This is a flow chart of an embodiment of a computing resource allocation method in an embodiment of the present application. The computing resource allocation method may include the following steps 201 to 203:

[0053] 201. Determine initial computing resources of a target running program so that the target running program runs according to the initial computing resources.

[0054] In the embodiment of the present application, the target running program may be a program currently running in the system, or a program being started. The running program may be any type of program, and the embodiment of the present application does not limit the target program.

[0055] In addition, determining the initial computing resources of the target running program may include setting the upper limit of the computing resources that can be allocated to each running program in the system, that is, the initial computing resources. When the program is running, the upper limit of the computing resources of the target running program can be directly obtained from the system. Among them, the initial computing resources corresponding to each program can be the same or different, and can be specifically set according to actual conditions, and the embodiments of the present application are not limited.

[0056] At the same time, the way to control the computing resources of the application program can be to control the allocation of computing resources for running the program through a PID (Proportional Integral Derivative) control system. Of course, the allocation of computing resources can also be controlled through other methods, and the specific embodiments of the present application are not limited.

[0057] 202. Detect whether a target program fails to respond during its operation.

[0058] In the embodiment of the present application, various program crashes such as program freezing, termination of operation, etc. can be regarded as the program unresponsive state. Among them, the method of detecting whether the program is unresponsive can include detecting the running log, and through the error code of the program running in the log, if the corresponding target error code such as crash, freezing, termination of operation, etc. occurs, it can be determined that the program is unresponsive. Of course, there can be many other ways to detect whether the program is unresponsive, which are not limited by the specific embodiment of the present application.

[0059] 203. If the target running program fails to respond, add the initial computing resources to the target computing resources so that the target running program runs according to the target computing resources.

[0060] According to the above steps, if the program is not responding, it can be characterized that the current initial computing resources cannot effectively support the target program to run. At this time, more computing resources can be allocated to the target program on top of the initial computing resources, so that the target program runs with more computing resources.

[0061] The computing resource allocation method provided in the present application can allocate preset initial computing resources to the target running program, and enable the target running program to run according to the initial computing resources. If the target running program does not respond during the running process, it indicates that the target running program cannot run normally. At this time, more target computing resources than the initial computing resources can be allocated to the target running program, so that the computing resources of the target running program are increased, and the probability of the target running program not responding is reduced.

[0062] It should be noted that when the target running program is running with the target computing resources again, the target running program can continue to be detected whether the program is unresponsive. If the target running program still does not respond, then continue to allocate additional computing resources to the target running program on the basis of the target computing resources. At this point, the process can be looped until the target running program no longer fails to respond. Alternatively, if after continuously adding computing resources to the target running program, the upper limit of the computing resources that can be allocated is reached, and the target running program still does not respond, an alarm can be issued so that relevant personnel can manually check whether there are other factors that cause the program to be unresponsive. Among them, the upper limit of the computing resources that can be allocated can be a computing upper limit threshold set manually, and the specific embodiments of the present application are not limited.

[0063] In order to better implement the embodiment of the present application, in one embodiment of the present application, determining the initial computing resources of the target running program includes:

[0064] Check whether there is a preset computing resource allocation table, which includes the target correspondence between the application and the computing resource allocation; if there is a computing resource allocation table, and the computing resource allocation table includes the target running program; determine the initial computing resources of the target running program based on the target corresponding relationship between the target running program.

[0065] The above embodiment provides a method of setting a same initial computing resource for each program. When the program is running, the initial computing resource is directly called to provide the program with corresponding computing power support. However, in the embodiment of the present application, another method is also provided to determine the initial computing resource of the target running program.

[0066] Specifically, a computing resource allocation table can be set in the system, and the computing resource allocation table can record the different initial computing resources corresponding to each program. When a program is started in the system, the program can be searched in the computing resource allocation table, and the initial computing resources corresponding to the program can be found. Among them, the computing resource allocation table can record the name of the program and the pid corresponding to the program. When the program is running, after retrieving the matching program in the computing resource allocation table according to the program name, the pid corresponding to the matching program can be obtained, and then the initial computing resources of the target running program can be determined according to the pid.

[0067] In some embodiments of the present application, determining the initial computing resources of the target running program includes:

[0068] Obtain a computing resource restriction list; if the computing resource restriction list does not include the target running program, the computing resources of the target running program are not restricted; if the computing resource restriction list includes the target running program and the target running program is running in the foreground, determine the initial computing resources of the target running program.

[0069] The above embodiment provides a solution for setting initial computing resources for all applications in the system. However, in actual situations, some programs preferred by users need to be given priority in computing resources. For example, users do not want to limit the computing resources of commonly used programs. When these programs are running and apply for computing resources, the system needs to meet the computing resource applications of these programs.

[0070] Therefore, in an embodiment of the present application, a whitelist or blacklist can be set up so that the user can add the name of the program that needs to limit the computing resources to the whitelist or blacklist, and the user does not need to add his or her preferred program to the list. Afterwards, when a program is running, the system can first check the list to see if the name of the running program appears in the list. If it is not on the list, the computing resources of the program are not restricted; if it appears in the list and the running program is in the foreground, the computing resources of the program are restricted. It should be noted that if the program appears in the list, but the running program is in the background, the computing resources of the program may not be restricted. The specific reason is that the program is usually in a dormant state in the background, at which time the computing resources consumed are relatively small and there is no need to limit the computing resources.

[0071] In order to better implement the embodiment of the present application, in one embodiment of the present application, determining the initial computing resources of the target running program includes:

[0072] Determine the program type and program running stage of the target running program; if the program type is an installation type application, determine the initial computing resources of the target running program; if the program running stage is the startup stage of the target running program, determine the initial computing resources of the target running program.

[0073] The above embodiment provides a solution for limiting program computing resources. The embodiment of the present application also provides a solution for limiting program computing resources.

[0074] Specifically, when the target running program is an installation program, there is no need to consider whether the program is in the above list, but the computing resources are directly limited. Also, if the program is in the program startup phase, there is no need to consider whether the program is in the above list, and the computing resources are also directly limited. The reason is that more computing resources will be consumed during the installation program and the program startup phase. Therefore, in order to prevent the program or system from crashing due to a surge in demand for computing resources, it is necessary to limit computing resources in these two situations. Therefore, in combination with the above embodiments, if the program running phase is not the startup phase of the target running program and is not an installation type application, then obtain the computing resource restriction list and detect whether the program is in the computing resource restriction list.

[0075] In order to better implement the embodiment of the present application, in one embodiment of the present application, after detecting whether there is a preset computing resource allocation table, the method further includes:

[0076] If the computing resource allocation table does not exist, obtain the computing resource allocation table from the target server.

[0077] The above embodiment provides a computing device that locally stores a computing resource allocation table set by a user or relevant technical personnel, so that the limitation of computing resources can be achieved. However, in some scenarios, when the user or relevant technical personnel does not set the computing resource allocation table, the local computing device can communicate with the set target server that stores the computing resource allocation table, thereby obtaining the computing resource allocation table from the target server. Among them, the target server can be built by the manufacturer of the computing device, and the target server can be any type of server, which is not limited in the specific embodiments of this application.

[0078] It should be noted that the target server can store computing resource allocation tables corresponding to computing devices of different models. When a computing device needs to download a computing resource allocation table, it can first select the device model and then download the computing resource allocation table corresponding to the same model.

[0079] In order to better implement the embodiment of the present application, in one embodiment of the present application, the method further includes calculating a resource allocation level table, adding the initial computing resources to the target computing resources, and the method further includes:

[0080] Determine the initial computing resource allocation level corresponding to the initial computing resource in the computing resource allocation level table; obtain a target computing resource allocation level higher than the initial computing resource allocation level; determine the computing resource corresponding to the target computing resource allocation level as the target computing resource; and increase the initial computing resource to the target computing resource.

[0081] The above embodiment provides a solution for increasing the computing resources of the target running program when the initial computing resources allocated to the target running program are insufficient. The embodiment of the present application also provides a solution for changing the computing resource allocation in combination with the computing resource allocation level table.

[0082] Specifically, a variety of computing resource allocation levels can be set in the computing resource allocation level table, such as level one, level two, level three, and so on. Each computing resource allocation level can be set with a corresponding upper limit of the read and write speed. For example: a Cgroup directory (computing resource allocation level table) can be preset, and the Cgroup directory can include Cgroup1's IO read and write speed set to 1M; Cgroup2's IO read and write speed set to 2M; Cgroup3's IO read and write speed set to 4M; Cgroup4's IO read and write speed set to 8M; Cgroup5's IO read and write speed set to 16M; Cgroup5's IO read and write speed set to 32M, and so on. Among them, the number of levels and the corresponding gear read and write speeds can be actually adjusted according to the hardware performance.

[0083] In addition, whenever the computing resources of the target program are restricted, the corresponding level can be found in the computing resource allocation level table according to the initial computing resources that are specifically restricted for the target program. For example: Assuming that the initial computing resources that are restricted for the target program are 1M, then according to the computing resource allocation level table, it can be determined that the current restriction level of the target program is level one. When it is determined that the restriction level currently corresponding to the target program is level one, it can be determined that the levels above level one are all target computing resource allocation levels. At this time, the computing resources increased by the target program are gradually increased. For example: Level two, which is one level higher than level one, can be selected as the target computing resource allocation level, and the target computing allocation corresponding to the target computing resource allocation level can be used as the currently allocated computing resources of the target program.

[0084] It should be noted that after the initial computing resources are added to the target computing resources, the system can continue to monitor whether the target running program is still unresponsive. If it is still unresponsive, the target computing resources can be regarded as the initial computing resources, and the above steps can be continued to be executed, and the computing resources of the target running program can be gradually improved.

[0085] In some embodiments of the present application, after increasing the initial computing resources to the target computing resources, the method further includes:

[0086] The initial target computing resources of the target running program in the computing resource allocation table are replaced with the target computing resources to obtain an updated computing resource allocation table; and the updated computing resource allocation table is uploaded to the target server.

[0087] The above embodiment provides a solution in which a computing device can obtain a computing resource allocation table through a server. If the computing resource allocation table in the server is not updated in real time, it will cause the computing devices of the same model to need to perform an operation of increasing computing resources once when running the same program. In order to avoid the need for other computing devices of the same model in the network to perform the operation of increasing computing resources again, when a target computing device in the network has a program that does not respond and computing resources are added, the target computing device can upload the updated result to the server, that is, upload the updated computing resource allocation table to the server. In this way, when other computing devices of the same model in the network download the computing resource allocation table, they can directly allocate the increased computing resources to the target running program.

[0088] In order to better implement the computing resource allocation method in the embodiment of the present application, in addition to the computing resource allocation method, the embodiment of the present application also provides a computing resource allocation device, such as Figure 3 As shown, the device 300 includes:

[0089] The processing module 301 is used to determine the initial computing resources of the target running program so that the target running program runs according to the initial computing resources;

[0090] The processing module 301 is also used to detect whether the target running program fails to respond during its running process;

[0091] The processing module 301 is also used to add initial computing resources to the target computing resources if the target running program fails to respond, so that the target running program runs according to the target computing resources.

[0092] The computing resource allocation device provided by the present application, the processing module 301 can allocate preset initial computing resources to the target running program, and enable the target running program to run according to the initial computing resources. If the target running program does not respond during the running process, it indicates that the target running program cannot run normally. At this time, more target computing resources than the initial computing resources can be allocated to the target running program, so that the computing resources of the target running program are increased, and the probability of the target running program not responding is reduced.

[0093] In some embodiments of the present application, the processing module 301 is specifically used to:

[0094] Detecting whether there is a preset computing resource allocation table, the computing resource allocation table including a corresponding relationship between application programs and computing resource allocation targets;

[0095] If there is a computing resource allocation table, and the computing resource allocation table includes the target running program;

[0096] According to the corresponding relationship between the target running program and the target, the initial computing resources of the target running program are determined.

[0097] In some embodiments of the present application, the processing module 301 is further used to:

[0098] Get the list of computing resource restrictions;

[0099] If the target program is not included in the computing resource restriction list, the computing resources of the target program are not restricted;

[0100] If the computing resource restriction list includes the target running program and the target running program is running in the foreground, the initial computing resources of the target running program are determined.

[0101] In some embodiments of the present application, the processing module 301 is further used to:

[0102] Determine the program type and program running stage of the target running program;

[0103] If the program type is an installation type application, determining the initial computing resources of the target running program;

[0104] If the program running phase is the startup phase of the target running program, the initial computing resources of the target running program are determined.

[0105] In some embodiments of the present application, the processing module 301 is further used to:

[0106] If the computing resource allocation table does not exist, obtain the computing resource allocation table from the target server.

[0107] In some embodiments of the present application, the apparatus 300 further includes a calculation resource allocation level table, and the processing module 301 is further specifically configured to:

[0108] Determine an initial computing resource allocation level corresponding to the initial computing resource in the computing resource allocation level table;

[0109] Obtaining a target computing resource allocation level that is higher than the initial computing resource allocation level;

[0110] Determine the computing resource corresponding to the target computing resource allocation level as the target computing resource;

[0111] Increase the initial computing resources to the target computing resources.

[0112] In some embodiments of the present application, the processing module 301 is further used to:

[0113] Replacing the initial target computing resource of the target running program in the computing resource allocation table with the target computing resource to obtain an updated computing resource allocation table;

[0114] Upload the updated computing resource allocation table to the target server.

[0115] The present application also provides a terminal device, which includes a processor, a memory, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the steps in any one of the computing resource allocation methods in the present application. The terminal device integrates any one of the computing resource allocation methods provided in the present application. Figure 4 As shown, it shows a schematic diagram of the structure of the terminal device involved in the embodiment of the present application, specifically:

[0116] The terminal device may include one or more processing core processors 401, one or more computer-readable storage media memories 402, a power supply 403, an input unit 404 and other components. Those skilled in the art will appreciate that Figure 4 The terminal device structure shown in the figure does not constitute a limitation on the terminal device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. Among them:

[0117] The processor 401 is the control center of the terminal device, and uses various interfaces and lines to connect various parts of the entire terminal device. By running or executing software programs and / or modules stored in the memory 402, and calling data stored in the memory 402, the processor 401 executes various functions of the terminal device and processes data, thereby monitoring the terminal device as a whole. Optionally, the processor 401 may include one or more processing cores; the processor 401 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. Preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, the user interface and the application program, etc., and the modem processor mainly processes wireless communication. It is understandable that the above-mentioned modem processor may not be integrated into the processor 401.

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

[0119] The terminal device also includes a power supply 403 for supplying power to each component. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, so as to manage charging, discharging, power consumption management and other functions through the power management system. The power supply 403 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.

[0120] The terminal device may further include an input unit 404, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0121] Although not shown, the terminal device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 401 in the terminal device will load the executable files corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 401 will run the application programs stored in the memory 402, thereby realizing various functions, such as:

[0122] Determining initial computing resources of the target running program so that the target running program runs according to the initial computing resources;

[0123] Detect whether the target program fails to respond during its operation;

[0124] If the target running program fails to respond, the initial computing resources are added to the target computing resources so that the target running program runs according to the target computing resources.

[0125] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0126] To this end, an embodiment of the present application provides a computer-readable storage medium, which may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc. A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in any one of the computing resource allocation methods provided in the embodiments of the present application. For example, the computer program is loaded by a processor to execute the following steps:

[0127] Determining initial computing resources of the target running program so that the target running program runs according to the initial computing resources;

[0128] Detect whether the target program fails to respond during its operation;

[0129] If the target running program fails to respond, the initial computing resources are added to the target computing resources so that the target running program runs according to the target computing resources.

[0130] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the detailed description of other embodiments above, and will not be repeated here.

[0131] In specific implementation, the above units or structures can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units or structures can refer to the previous method embodiments, which will not be repeated here.

[0132] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0133] The above is a detailed introduction to a computing resource allocation method and device provided in an embodiment of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A computing resource allocation method, characterized in that: The method comprises: Determining initial computing resources of a target running program so that the target running program runs according to the initial computing resources; Detecting whether the target running program fails to respond during its running; If the target running program fails to respond, the initial computing resources are added to the target computing resources so that the target running program runs according to the target computing resources.

2. The computing resource allocation method according to claim 1, characterized in that: The determining of the initial computing resources of the target running program includes: Detecting whether there is a preset computing resource allocation table, wherein the computing resource allocation table includes a target correspondence relationship between application programs and computing resource allocation; If the computing resource allocation table exists, and the computing resource allocation table includes the target running program; According to the corresponding relationship between the target running program and the target, initial computing resources of the target running program are determined.

3. The computing resource allocation method according to claim 1, characterized in that: The determining of the initial computing resources of the target running program includes: Get the list of computing resource restrictions; If the computing resource restriction list does not include the target running program, the computing resources of the target running program are not restricted; If the computing resource restriction list includes the target running program and the target running program is running in the foreground, the initial computing resources of the target running program are determined.

4. The computing resource allocation method according to claim 1, characterized in that: The determining of the initial computing resources of the target running program includes: Determine the program type and program running stage of the target running program; If the program type is an installation type application, determining the initial computing resources of the target running program; If the program running phase is a startup phase of the target running program, initial computing resources of the target running program are determined.

5. The computing resource allocation method according to claim 2, characterized in that: After detecting whether there is a preset computing resource allocation table, the method further includes: If the computing resource allocation table does not exist, the computing resource allocation table is obtained from the target server.

6. The computing resource allocation method according to claim 2, characterized in that: The method further comprises calculating a resource allocation tier table; The adding of the initial computing resources to the target computing resources comprises: Determine an initial computing resource allocation level corresponding to the initial computing resource in the computing resource allocation level table; Acquire a target computing resource allocation level that is higher than the initial computing resource allocation level; Determine that the computing resource corresponding to the target computing resource allocation level is the target computing resource; The initial computing resources are increased to the target computing resources.

7. The computing resource allocation method according to claim 6, characterized in that: After the initial computing resources are added to the target computing resources, the method further includes: Replacing the initial target computing resource of the target running program in the computing resource allocation table with the target computing resource to obtain an updated computing resource allocation table; The updated computing resource allocation table is uploaded to the target server.

8. A computing resource allocation device, characterized in that: The device comprises: A processing module, configured to determine initial computing resources of a target running program, so that the target running program runs according to the initial computing resources; The processing module is also used to detect whether the target running program fails to respond during its running; The processing module is further used to add the initial computing resources to the target computing resources if the target running program fails to respond, so that the target running program runs according to the target computing resources.

9. A terminal device, characterized in that: The terminal device includes a processor, a memory, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the steps in the computing resource allocation method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps in the computing resource allocation method according to any one of claims 1 to 7.