A computer resource allocation control method and system
By dynamically adjusting process priority and thread processing order, the problem of inaccurate process priority arrangement in existing technologies is solved, thereby improving the processing efficiency of computer systems and the smoothness of games.
Patent Information
- Application Number
- CN202511439502.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-10
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2045-10-10
AI Technical Summary
Existing computer resource allocation schemes have low accuracy in prioritizing processes, which can easily lead to process blocking issues such as game lag.
By determining the frequency of process triggering, static priority value, and resources called, the priority value of processes is dynamically adjusted, and critical threads are prioritized based on thread processing time and the number of resource duplications, thus achieving precise allocation of computing resources.
It improves the processing efficiency of processes in the computer system, ensures smooth gameplay and fast response of security components, and reduces the risk of process blocking.
Smart Images

Figure CN120929270B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electronic digital data processing technology, and specifically to a computer resource allocation control method and system. Background Technology
[0002] Prioritizing different processes can significantly improve the intelligence of system resource allocation. By dynamically adjusting process priorities, the system can ensure that critical tasks (such as game rendering threads and anti-cheat daemons) receive sufficient CPU (Central Processing Unit) time slices, avoiding frame rate fluctuations or input lag caused by background processes competing for resources. In game scenarios, prioritizing physics engine calculations and network synchronization threads can reduce operational latency during multiplayer battles, while placing the anti-cheat module with high priority can block cheat injection in real time. This fine-grained scheduling can also optimize the execution efficiency of temporary processes such as hot updates, reduce player-perceived lag, ultimately achieving a significant improvement in the response speed of critical processes, ensuring a zero-miss rate for security components, and optimizing overall system performance.
[0003] Traditional methods dynamically adjust priority values based on the current process's trigger frequency and poll threads within the process using dynamic priority values. This results in low accuracy in prioritizing processes, making it prone to issues like game lag and process blocking. Summary of the Invention
[0004] To address the technical problem of low accuracy in prioritizing processes in existing computer resource allocation schemes, the present invention aims to provide a computer resource allocation control method and system, the specific technical solution of which is as follows:
[0005] This invention provides a computer resource allocation control method, the method comprising:
[0006] Determine the frequency of triggering of the target process in the current game within a preset monitoring period;
[0007] The dynamic priority value of the target process at the current moment is determined by utilizing the triggering frequency, static priority value, and target resource calls of the target process.
[0008] Determine the target processing time of the first thread currently waiting to be processed in the target process, as well as the number of resource call overlaps between the target process and the currently processed thread of the central processing unit;
[0009] Using the dynamic priority value, the target processing time, and the number of repeated resource calls, the degree of preference for the first thread currently waiting to be processed in the target process is determined.
[0010] Using the bias level and the remaining waiting threads of the target process, the target priority of the first thread currently waiting to be processed in the target process is determined; the target priority is used to allocate computing resources.
[0011] Furthermore, determining the trigger frequency of the target process in the current game within a preset monitoring period includes:
[0012] Determine the number of times the target process in the current game is triggered within a preset monitoring period and the first time interval between each adjacent trigger;
[0013] By using the number of triggers and each first time interval, the trigger frequency of the target process within the preset monitoring period is determined.
[0014] Furthermore, determining the trigger frequency of the target process within a preset monitoring period using the number of triggers and each first time interval includes:
[0015] The time intervals of each first time interval are sorted in chronological order to obtain the time sequence of adjacent triggers;
[0016] Determine the differences between adjacent time intervals in the time interval sequence and the total number of differences between adjacent time intervals;
[0017] The frequency of triggering of the target process within a preset monitoring period is calculated by using the number of triggers, the difference between adjacent time intervals, and the total number of differences between adjacent time intervals.
[0018] Furthermore, determining the dynamic priority value of the target process at the current moment by utilizing the triggering frequency, static priority value, and target resource calls of the target process includes:
[0019] Determine the second time interval between the most recent trigger time of the target process and the current time.
[0020] The dynamic priority value of the target process at the current moment is determined by using the trigger frequency, static priority value, target resource call, and second time interval of the target process.
[0021] Furthermore, determining the dynamic priority value of the target process at the current moment by utilizing the triggering frequency, static priority value, target resource call, and second time interval of the target process includes:
[0022] The target resource for the target process is determined to be the same as the number of other processes required by other processes.
[0023] By utilizing the triggering frequency of the target process, its static priority value, the number of other processes, and the second time interval, the dynamic priority value of the target process at the current moment is determined.
[0024] Furthermore, determining the dynamic priority value of the target process at the current moment by utilizing the triggering frequency of the target process, its static priority value, the number of other processes, and the second time interval includes:
[0025] By utilizing the triggering frequency of the target process, its static priority value, the number of other processes, and the second time interval, the degree of decrease in the dynamic priority value of the target process at the current moment is calculated.
[0026] The dynamic priority value of the target process at the current moment is calculated by using the decrease in static priority value and dynamic priority value.
[0027] Furthermore, by utilizing the dynamic priority value, the target processing time, and the number of repeated resource calls, the degree of preference for prioritizing the first thread currently waiting to be processed in the target process is determined, including:
[0028] Determine the difference in processing time between the target processing time of the first thread currently waiting to be processed in the target process and the other processing times of the first thread currently waiting to be processed in other processes.
[0029] By using the dynamic priority value, the processing time difference, and the number of repeated resource calls, the degree of preference for the first thread currently waiting to be processed in the target process is calculated.
[0030] Furthermore, using the aforementioned bias degree and the remaining waiting threads of the target process, the target priority of the first thread currently waiting to be processed in the target process is determined, including:
[0031] Determine the remaining number of waiting threads and the total processing time of the remaining threads for the target process;
[0032] Using the bias level, the number of remaining threads, and the total processing time of the remaining threads, the target priority of the first thread currently waiting to be processed in the target process is calculated.
[0033] Furthermore, using the aforementioned bias level and the remaining waiting threads of the target process, the target priority of the first thread currently waiting to be processed in the target process is determined, followed by:
[0034] The dynamic priority values of each target process are stored in the database, and SQL statements are used to retrieve the dynamic priority values from the database and output them visually.
[0035] The present invention also provides a computer resource allocation and control system, the system being used to implement the computer resource allocation and control method as described in any of the preceding claims; the system comprising:
[0036] The process monitoring module is used to determine the frequency of triggering of the target process in the current game within a preset monitoring period;
[0037] The process analysis module is used to determine the dynamic priority value of the target process at the current moment by utilizing the triggering frequency, static priority value, and target resource calls of the target process.
[0038] The thread analysis module is used to determine the target processing time of the first thread currently waiting to be processed in the target process and the number of resource calls duplicated with the currently processed thread of the central processing unit; using the dynamic priority value, the target processing time, and the number of resource calls duplicated, it determines the degree of priority of the first thread currently waiting to be processed in the target process; using the degree of priority and the remaining waiting threads in the target process, it determines the target priority of the first thread currently waiting to be processed in the target process; the target priority is used to allocate computing resources.
[0039] The present invention has the following beneficial effects:
[0040] Traditional methods only dynamically adjust priority values based on the current process's triggering frequency and poll threads within the process using dynamic priority values. This approach does not take into account the processing time and resource usage of threads in different processes, resulting in inaccurate priority scheduling for processes.
[0041] This invention dynamically adjusts the priority of different processes based on their static priority, the frequency of process triggering in the current time period, and the similarity of resources between different processes. It prioritizes CPU processing of threads within different processes based on their priority, the processing time of currently waiting threads, and thread resource allocation. Specifically, this invention determines the triggering frequency of a process based on the number of times the same process triggers within a certain time period and the variation in the duration of different triggers; it dynamically adjusts the priority of different processes based on the similarity of resource allocation between processes currently being processed, as well as the triggering time and frequency; and it polls the threads within different processes based on the current thread size and priority of each process. Finally, it adjusts the priority of different threads based on the remaining processing time of each process. This makes process processing in the computer system more efficient, the scheduling more precise and realistic, and ensures a smoother gaming experience. Attached Figure Description
[0042] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art 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 effort.
[0043] Figure 1 A flowchart illustrating the steps of a computer resource allocation control method according to an embodiment of the present invention;
[0044] Figure 2 This is a detailed flowchart of step S1 in a computer resource allocation control method provided in an embodiment of the present invention;
[0045] Figure 3 This is a detailed flowchart of step S2 in a computer resource allocation control method provided in an embodiment of the present invention;
[0046] Figure 4 This is a detailed flowchart of step S22 in a computer resource allocation control method provided in an embodiment of the present invention;
[0047] Figure 5 This is a detailed flowchart of step S4 in a computer resource allocation control method provided in an embodiment of the present invention;
[0048] Figure 6 This is a detailed flowchart of step S5 in a computer resource allocation control method provided in an embodiment of the present invention;
[0049] Figure 7 This is a schematic diagram of the hardware operating environment of the computer resource allocation control device involved in the embodiments of the present invention;
[0050] Figure 8 This is a schematic diagram of the framework structure of the computer resource allocation control system involved in the embodiments of the present invention. Detailed Implementation
[0051] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of a computer resource allocation control method proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0052] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0053] The specific scheme of a computer resource allocation and control method provided by the present invention will be described in detail below with reference to the accompanying drawings.
[0054] Example 1:
[0055] For a computer resource allocation control method provided by this invention, please refer to [link / reference]. Figure 1 The diagram illustrates a flowchart of a computer resource allocation control method according to an embodiment of the present invention.
[0056] The computer resource allocation control method includes:
[0057] Step S1: Determine the trigger frequency of the target process in the current game within the preset monitoring period;
[0058] In this embodiment, the process information of each target process in the current game must first be obtained. For example, the game system's underlying activities are recorded using WPR kernel (Windows Performance Toolkit) event tracing (ETW), accurately capturing process creation / destruction events (Process / Start and Process / Stop), including timestamps (100 nanosecond precision), process ID (PID), parent process ID (PPID), and command-line arguments. Events such as thread scheduling, context switching, and DLL (Dynamic-Link Library Loading) loading / unloading are recorded to construct a complete process behavior chain, thereby obtaining the process information of each target process. The process of obtaining the current game or other program process information can also be achieved through other existing methods, which will not be elaborated upon here.
[0059] It should be noted that the target process here refers to any process in the computer system.
[0060] Specifically, please refer to Figure 2 Step S1 includes:
[0061] Step S11: Determine the number of times the target process in the current game is triggered within the preset monitoring period and the first time interval between each adjacent trigger;
[0062] Step S12: Using the number of triggers and each first time interval, determine the frequency of triggering of the target process within the preset monitoring period.
[0063] Specifically, step S12 includes:
[0064] The time intervals of each first time interval are sorted in chronological order to obtain the time sequence of adjacent triggers;
[0065] Determine the differences between adjacent time intervals in the time interval sequence and the total number of differences between adjacent time intervals;
[0066] The frequency of triggering of the target process within a preset monitoring period is calculated by using the number of triggers, the difference between adjacent time intervals, and the total number of differences between adjacent time intervals.
[0067] In this embodiment, during gameplay, when a player performs a task, the more frequently the corresponding process is triggered, the higher the CPU's processing priority for that process should be to ensure smooth gameplay. The frequency of process triggering can be represented by the number of times the process is triggered within a certain period of time and the shortening of the interval between multiple triggers.
[0068] Get the number of times a single process j (as the target process) is triggered within a preset monitoring period T (set to 6 hours, adjustable). And the time interval between adjacent triggers at time i-1. To distinguish it from the time intervals mentioned below, this is referred to here as the first time interval. .
[0069] Multiple first time intervals acquired within the preset monitoring period T The time intervals between adjacent triggers are obtained by sorting them from earliest to latest according to their corresponding earliest trigger times. Adjacent time intervals are then grouped into a time series. Subtract the later ones from the earlier ones to get the difference between adjacent time intervals. .calculate 0 The number (which can be denoted as the decrease in the time interval) obtained in the time interval sequence The ratio of the total number (total number of differences between adjacent time intervals) And obtain the interval between the two most recent triggers of target process j at the current time. .
[0070] When the ratio The larger, The smaller the number of triggers, the more likely it is to trigger. The larger the value, the more frequently the player triggers the target process j. To ensure smooth game feedback, the target process j should be given a higher processing priority. This allows us to determine the trigger frequency of the target process j. for:
[0071] ;
[0072] In the formula, This represents the ratio of the decrease in the time interval to the total difference between adjacent time intervals. Indicates the number of times the event was triggered; This indicates the interval between the two most recent triggers of target process j at the current time.
[0073] The triggering frequency of each target process is calculated by performing the above process.
[0074] Step S2: Determine the dynamic priority value of the target process at the current moment by using the triggering frequency, static priority value, and target call resources of the target process.
[0075] Specifically, please refer to Figure 3 Step S2 includes:
[0076] Step S21: Determine the second time interval between the most recent trigger time of the target process and the current time.
[0077] Step S22: Determine the dynamic priority value of the target process at the current moment by using the triggering frequency of the target process, the static priority value, the target call resources, and the second time interval.
[0078] Please refer to Figure 4 Step S22 specifically includes:
[0079] Step S221: Determine that the target resource for the target process is also the number of other processes required by other processes;
[0080] Step S222: Determine the dynamic priority value of the target process at the current moment by using the triggering frequency of the target process, the static priority value, the number of other processes, and the second time interval.
[0081] More specifically, step S222 includes:
[0082] By utilizing the triggering frequency of the target process, its static priority value, the number of other processes, and the second time interval, the degree of decrease in the dynamic priority value of the target process at the current moment is calculated.
[0083] The dynamic priority value of the target process at the current moment is calculated by using the decrease in static priority value and dynamic priority value.
[0084] In this embodiment, when processes call similar resources, multiple processes can reduce memory usage by sharing physical memory pages (such as shared libraries or read-only data), avoid repeatedly copying the same data, thereby significantly improving memory utilization, increasing the CPU's processing speed for processes, and effectively preventing game lag.
[0085] For all processes currently running on the CPU that require processing and have a static priority value less than 0 (corresponding to a priority range of -20 to 19, with a smaller priority value indicating a higher priority) (which can also be referred to as the priority target processes), calculate the number of other processes that the target process j also needs to access the resource k (as the target resource, i.e., any resource) from. .
[0086] Get the time interval between the most recent trigger time of the target process j and the current time c. To distinguish it from the time interval mentioned above, this will be referred to as the second time interval. The sum of the number of times all resources called by the target process j appear in other processes (i.e., the sum of the number of other processes). ( The larger the total number of resources (i.e., all resources called) required to process target process j, the larger the second time interval between the most recent trigger time of target process j and the current time c. The larger the value, the higher the static priority value. The smaller the value, and the more frequently it is triggered at the current moment. The higher the priority, the longer the process has been triggered and the greater the urgency of processing it should be. Therefore, a higher priority should be assigned, corresponding to a smaller priority value.
[0087] This allows us to determine the degree to which the dynamic priority value of target process j decreases at the current moment. for:
[0088] ;
[0089] In the formula, Indicates the frequency of triggering; Indicates the second time interval; This represents the static priority value of the target process j; This indicates the number of other processes.
[0090] Then, using the maximum-minimum normalization pair After normalization, we get Its range is [0, 0.5].
[0091] The degree to which the normalized dynamic priority value decreases The larger the value of c, the more the dynamic priority value of target process j should decrease. Therefore, the dynamic priority value of target process j at the current time c can be obtained. for:
[0092] ;
[0093] In the formula, This represents the static priority value of the target process j; This indicates the degree to which the dynamic priority value decreases after normalization.
[0094] The above implementation process is used to obtain the dynamic priority value for all target processes whose static priority value is less than 0.
[0095] Step S3: Determine the target processing time of the first thread currently waiting to be processed in the target process and the number of resource calls that are repeated between it and the current thread being processed by the central processing unit;
[0096] Step S4: Using the dynamic priority value, the target processing time, and the number of repeated resource calls, determine the degree of preference for the first thread currently waiting to be processed in the target process to be processed first.
[0097] Specifically, please refer to Figure 5 Step S4 includes:
[0098] Step S41: Determine the difference in processing time between the target processing time of the first thread currently waiting to be processed in the target process and the other processing times of the first thread currently waiting to be processed in other processes.
[0099] Step S42: Using the dynamic priority value, the processing time difference, and the number of repeated resource calls, calculate the degree of preference for the first thread currently waiting to be processed in the target process.
[0100] In this embodiment, to ensure that multiple high-priority processes are processed in a timely manner and to guarantee smooth gameplay, different processes can be polled. Depending on the process's characteristics, different time slices are allocated for each poll, allowing processing of one or more threads within a process. Different threads often have different processing times. To ensure more accurate thread selection during polling, the dynamic priority of the process containing each thread, its own processing time, and resource availability with the previous CPU thread should be considered.
[0101] Get the target processing time of the first thread currently waiting to be processed in the target process j whose dynamic priority value is less than 0. .
[0102] Obtain the number of duplicate resources required by the first thread currently waiting to be processed in the target process j, and the number of times the CPU resources currently being used by the processing thread overlap. That is, the number of times resources are called repeatedly. .
[0103] Calculate the difference between the target processing time of the first thread currently waiting to be processed in target process j and the other processing times of the first thread currently waiting to be processed in other processes p with dynamic priority values less than 0. (That is, handle the difference in duration, distinguish between positive and negative), and sum the obtained multiple differences. ( (This is the number of other processes whose dynamic priority value is less than 0 at the current time c).
[0104] when The smaller the value, the fewer the number of times resources are called repeatedly. The larger the value, the higher the dynamic priority value of the target process j at the current moment. The smaller the value, the more similar the resource of the first thread currently waiting to be processed in the target process j is to the thread currently being processed by the CPU. This can greatly reduce the time of resource calls. In addition, the higher the dynamic priority of the target process j (the smaller the corresponding dynamic priority value), the more likely the first thread currently waiting to be processed in the target process should be processed in the next polling process.
[0105] This allows us to determine the degree of preference for prioritizing the first thread currently waiting to be processed in the target process j. for:
[0106] ;
[0107] In the formula, Indicates the number of times the resource is called repeatedly; Indicates the difference in processing time; This indicates the number of other processes whose dynamic priority value is less than 0 at the current time c; This represents the dynamic priority value of target process j at the current moment.
[0108] The above analysis was performed on all target processes j with dynamic priority values less than 0 to obtain the degree of thread priority processing bias in different processes.
[0109] Step S5: Using the bias degree and the remaining waiting threads of the target process, determine the target priority of the first thread currently waiting to be processed in the target process; the target priority is used to allocate computing resources.
[0110] Specifically, please refer to Figure 6 Step S5 includes:
[0111] Step S51: Determine the number of remaining threads and the total processing time of the remaining threads in the target process.
[0112] Step S52: Calculate the target priority of the first thread currently waiting to be processed in the target process using the bias degree, the number of remaining threads, and the total processing time of the remaining threads.
[0113] In this embodiment, different processes have different processing times. Selecting threads solely based on the above implementation processes may result in longer thread processing intervals within processes with longer processing times, excessively increasing the total processing time of the process (including waiting time). To avoid this, the number of remaining threads and processing times for different processes should be considered.
[0114] Get the number of remaining threads waiting to be processed for all target processes j with dynamic priority values less than 0 at the current moment. (Number of remaining threads) and total remaining processing time for each thread. (Total processing time for remaining threads).
[0115] The degree of preference when the first waiting thread of target process j (the first thread currently waiting to be processed) is prioritized. The larger the number of remaining threads The larger the value, the longer the total processing time of the remaining threads. The larger the value, the longer the processing time for the target process j will be. To avoid the total processing time (including waiting time) for the target process j becoming too long and affecting the smoothness of the game, the first waiting thread of the target process j should be processed first.
[0116] This allows us to determine the target priority of the first waiting thread in target process j. for:
[0117] ;
[0118] In the formula, Indicates the degree of bias; This indicates the number of remaining threads; This indicates the total processing time of the remaining threads.
[0119] The above analysis was performed on all target processes j with dynamic priority values less than 0 to obtain the thread processing priority in different processes. Priority was then determined through comparison. The largest process (the corresponding process can be adjusted to the highest dynamic priority, which is also the lowest dynamic priority value) and thread are given priority processing and allocated more computing resources.
[0120] In one embodiment, after step S5, the method further includes:
[0121] The dynamic priority values of each target process are stored in the database, and SQL statements are used to retrieve the dynamic priority values from the database and output them visually.
[0122] In this embodiment, the dynamic priority values of different processes and the target priority of threads at different times are dynamically obtained through the above implementation process, and the processing threads are determined. The obtained dynamic priority values of different processes at different times and the corresponding processing threads are stored in the database.
[0123] The dynamic priority values of different processes at different times are obtained using SQL queries and then visualized in a table, as shown in Table 1 below:
[0124] Table 1
[0125] time Process ID (PID) Priority value 2025-07-17 11:30:45.12387 1524 -12 2025-07-17 11:30:45.12427 5874 -8
[0126] This invention dynamically adjusts the priority of different processes based on their static priority, the frequency of process triggering in the current time period, and the similarity of resources between different processes. It prioritizes CPU processing of threads within different processes based on their priority, the processing time of currently waiting threads, and thread resource allocation. Specifically, this invention determines the frequency of process triggering based on the number of times the same process triggers within a certain time period and the variation in the interval between different triggers; it dynamically adjusts the priority of different processes based on the similarity of resource allocation between currently processing processes, as well as the triggering time and frequency; and it polls the threads within different processes based on the current thread size and priority of each process. Finally, it adjusts the priority of different threads based on the remaining processing time of each process. This makes process processing in the computer system more efficient, the scheduling more precise and realistic, and ensures a smoother gaming experience.
[0127] Example 2:
[0128] This invention also proposes a computer resource allocation control device. The device can be a personal computer, workstation, server, or other computer equipment.
[0129] like Figure 7 As shown, Figure 7 This is a schematic diagram of the hardware operating environment of the computer resource allocation control device involved in the embodiments of the present invention.
[0130] like Figure 7As shown, the computer resource allocation control device may include: a processor 1001, such as a CPU; a network interface 1004; a user interface 1003; a memory 1005; and a communication bus 1002. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display or an input unit such as a control panel; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be high-speed RAM or non-volatile memory, such as a disk drive. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001. The memory 1005, as a computer storage medium, may include a computer resource allocation control program.
[0131] Those skilled in the art will understand that Figure 7 The hardware structure shown does not constitute a limitation on the device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0132] Continue to refer to Figure 7 , Figure 7 The memory 1005, which is a computer-readable storage medium, may include an operating system, a user interface module, a network communication module, and a computer resource allocation control program.
[0133] exist Figure 7 In this embodiment, the network communication module is mainly used to connect to the server and can communicate with the server for data; while the processor 1001 can call the computer resource allocation control program stored in the memory 1005 and execute the steps in the above embodiments.
[0134] Based on the hardware structure of the computer resource allocation control device described above, various embodiments of the computer resource allocation control method of the present invention are implemented.
[0135] In addition, the present invention also provides a computer resource allocation and control system, please refer to... Figure 8 The computer resource allocation control system includes:
[0136] The process monitoring module A10 is used to determine the frequency of triggering of the target process in the current game within a preset monitoring period;
[0137] The process analysis module A20 is used to determine the dynamic priority value of the target process at the current moment by utilizing the triggering frequency, static priority value, and target call resources of the target process.
[0138] The thread analysis module A30 is used to determine the target processing time of the first thread currently waiting to be processed in the target process and the number of resource calls duplicated with the currently processed thread of the central processing unit; using the dynamic priority value, the target processing time, and the number of resource calls duplicated, it determines the degree of priority of the first thread currently waiting to be processed in the target process; using the degree of priority and the remaining waiting threads of the target process, it determines the target priority of the first thread currently waiting to be processed in the target process; the target priority is used to allocate computing resources.
[0139] Furthermore, the process monitoring module A10 is also used for:
[0140] Determine the number of times the target process in the current game is triggered within a preset monitoring period and the first time interval between each adjacent trigger;
[0141] By using the number of triggers and each first time interval, the trigger frequency of the target process within the preset monitoring period is determined.
[0142] Furthermore, the process monitoring module A10 is also used for:
[0143] The time intervals of each first time interval are sorted in chronological order to obtain the time sequence of adjacent triggers;
[0144] Determine the differences between adjacent time intervals in the time interval sequence and the total number of differences between adjacent time intervals;
[0145] The frequency of triggering of the target process within a preset monitoring period is calculated by using the number of triggers, the difference between adjacent time intervals, and the total number of differences between adjacent time intervals.
[0146] Furthermore, the process analysis module A20 is also used for:
[0147] Determine the second time interval between the most recent trigger time of the target process and the current time.
[0148] The dynamic priority value of the target process at the current moment is determined by using the trigger frequency, static priority value, target resource call, and second time interval of the target process.
[0149] Furthermore, the process analysis module A20 is also used for:
[0150] The target resource for the target process is determined to be the same as the number of other processes required by other processes.
[0151] By utilizing the triggering frequency of the target process, its static priority value, the number of other processes, and the second time interval, the dynamic priority value of the target process at the current moment is determined.
[0152] Furthermore, the process analysis module A20 is also used for:
[0153] By utilizing the triggering frequency of the target process, its static priority value, the number of other processes, and the second time interval, the degree of decrease in the dynamic priority value of the target process at the current moment is calculated.
[0154] The dynamic priority value of the target process at the current moment is calculated by using the decrease in static priority value and dynamic priority value.
[0155] Furthermore, the thread analysis module A30 is also used for:
[0156] Determine the difference in processing time between the target processing time of the first thread currently waiting to be processed in the target process and the other processing times of the first thread currently waiting to be processed in other processes.
[0157] By using the dynamic priority value, the processing time difference, and the number of repeated resource calls, the degree of preference for the first thread currently waiting to be processed in the target process is calculated.
[0158] Furthermore, the thread analysis module A30 is also used for:
[0159] Determine the remaining number of waiting threads and the total processing time of the remaining threads for the target process;
[0160] Using the bias level, the number of remaining threads, and the total processing time of the remaining threads, the target priority of the first thread currently waiting to be processed in the target process is calculated.
[0161] Furthermore, the thread analysis module A30 is also used for:
[0162] The dynamic priority values of each target process are stored in the database, and SQL statements are used to retrieve the dynamic priority values from the database and output them visually.
[0163] The specific implementation of the computer resource allocation control system of the present invention is basically the same as the embodiments of the computer resource allocation control method described above, and will not be repeated here.
[0164] Furthermore, the present invention also provides a computer-readable storage medium. The computer-readable storage medium of the present invention stores a computer resource allocation control program, wherein, when executed by a processor, the computer resource allocation control program implements the steps of the computer resource allocation control method as described above.
[0165] The method implemented when the computer resource allocation control program is executed can be referred to in various embodiments of the computer resource allocation control method of the present invention, and will not be repeated here.
[0166] It should be noted that the order of the above embodiments of the present invention is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0167] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.
[0168] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0169] The above description is only a preferred embodiment of the present invention and does not limit the scope of protection of the present invention. All equivalent structural / method transformations made under the inventive concept of the present invention using the contents of the present invention specification and drawings, or direct / indirect applications in other related technical fields, are included within the scope of protection of the present invention.
Claims
1. A computer resource allocation control method characterized by comprising: The method comprises the following steps: determining the triggering frequency of the target process in the preset monitoring period in the current game; determining the dynamic priority value of the target process at the current moment by using the triggering frequency of the target process, the static priority value and the target calling resource; the target calling resource is the resource required to be called by the target process; determining the target processing duration of the first thread currently waiting for processing of the target process and the calling resource repetition number between the current processing thread of the central processing unit; determining the bias degree of the first thread currently waiting for processing of the target process being preferentially processed by using the dynamic priority value, the target processing duration and the calling resource repetition number; determining the target priority degree of the first thread currently waiting for processing of the target process by using the bias degree and the remaining threads waiting for processing of the target process; the target priority degree is used for allocating computing resources; The method comprises the following steps: determining the triggering frequency of the target process in the preset monitoring period in the current game; determining the triggering frequency of the target process in the preset monitoring period in the current game; The method comprises the following steps: sorting the first time intervals according to the time sequence to obtain the time interval sequence of adjacent triggering; determining the adjacent time interval difference and the total number of adjacent time interval differences in the time interval sequence; calculating the triggering frequency of the target process in the preset monitoring period by using the triggering number, the adjacent time interval difference and the total number of adjacent time interval differences; The method comprises the following steps: determining the second time interval between the latest triggering time of the target process and the current moment; determining the dynamic priority value of the target process at the current moment by using the triggering frequency of the target process, the static priority value, the target calling resource and the second time interval; The method comprises the following steps: determining the target calling resource of the target process is also required by other processes; calculating the dynamic priority value reduction degree of the target process at the current moment by using the triggering frequency of the target process, the static priority value, the number of other processes and the second time interval; calculating the dynamic priority value of the target process at the current moment by using the static priority value and the dynamic priority value reduction degree; The method comprises the following steps: determining a processing time difference between the target processing time of the first thread currently waiting for processing of the target process and other processing times of first threads currently waiting for processing of other processes; calculating a bias degree of the first thread currently waiting for processing of the target process being processed preferentially by using the dynamic priority value, the processing time difference, and the repeated number of calling resources; determining a target priority degree of the first thread currently waiting for processing of the target process by using the bias degree and the remaining threads of the target process, including: determining a remaining thread number and a total processing time of the remaining threads of the target process; calculating the target priority degree of the first thread currently waiting for processing of the target process by using the bias degree, the remaining thread number, and the total processing time of the remaining threads.
2. The computer resource allocation control method of claim 1, wherein determining a target priority degree of the first thread currently waiting for processing of the target process by using the bias degree and the remaining threads of the target process, and then including: storing the dynamic priority values of the target processes in a database, and obtaining the dynamic priority values in the database by using SQL statements and outputting the dynamic priority values visually.
3. A computer resource allocation control system, characterized by, The system is used to implement the computer resource allocation control method according to any one of claims 1-2, and includes: a process monitoring module configured to determine a triggering frequency of a target process in a preset monitoring period in a current game; a process analysis module configured to determine a dynamic priority value of the target process at a current time by using the triggering frequency of the target process, a static priority value, and a target calling resource; a thread analysis module configured to determine a target processing time of a first thread currently waiting for processing of the target process and a repeated number of calling resources between the first thread and a thread currently processed by a central processing unit, determine a bias degree of the first thread currently waiting for processing of the target process being processed preferentially by using the dynamic priority value, the target processing time, and the repeated number of calling resources, and determine a target priority degree of the first thread currently waiting for processing of the target process by using the bias degree and the remaining threads of the target process, the target priority degree being used to allocate a computing resource.
Citation Information
Patent Citations
Task scheduling method and device of intelligent camera system, camera and storage medium
CN116483549A
System resource regulation and control method and device, medium and equipment
CN119166341A