An intelligent hardware adjustment method and system for program execution process analysis
By determining the priority weight of hardware resources based on preset priority weight tables and API information, and using the real-time hardware resource occupation box for dynamic provisioning, the problem of unreasonable allocation of traditional resources is solved and the program execution efficiency and response capabilities are improved.
Patent Information
- Application Number
- CN202411278951.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2044-09-12
AI Technical Summary
Traditional hardware resource allocation methods cannot fully consider the priority of the program and the user's operational needs, resulting in unreasonable resource allocation, affecting the execution efficiency and real-time nature of the program.
By obtaining the computer program process list, based on the preset program process priority weight table and system API interface information, determine the hardware resource priority weight of different programs, and establish a real-time hardware resource occupation box for dynamic resource application simulation operations, select the optimal policy pair Hardware resources are allocated.
It realizes reasonable allocation of hardware resources, improves program execution efficiency and real-time response capabilities, and ensures that resource allocation matches user needs.
Smart Images

Figure CN118796483B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of hardware performance adjustment, and in particular to an intelligent hardware adjustment method and system for program execution process analysis. Background Art
[0002] In modern computer systems, the efficiency and real-time performance of program execution are crucial to user experience and system performance. However, with the popularity of multi-program concurrent execution environments, the reasonable allocation of hardware resources has become a technical problem that needs to be solved urgently. Traditional resource allocation methods often fail to fully consider the priority of the program itself and the user's current operating requirements, resulting in unreasonable resource allocation, which in turn affects the execution efficiency of the program. Summary of the invention
[0003] The purpose of the present invention is to provide an intelligent hardware adjustment method and system capable of reasonably configuring hardware resources.
[0004] In order to achieve the above object, the present invention adopts the following technical solutions:
[0005] An intelligent hardware adjustment method for program execution process analysis, comprising:
[0006] Obtain a computer program process list, and determine first hardware resource priority weights of different programs based on a preset program process priority weight table;
[0007] Calling the system's API interface information, and based on the system's API interface information, determining the user's currently operating programs, as well as the user's operation characteristics and the data characteristics analyzed by the program, and configuring a second hardware resource priority weight for the corresponding program based on the determined user's currently operating programs;
[0008] Based on the user's operation characteristics and the data characteristics analyzed by the program, the hardware resource consumption parameters required to complete the total progress of each program are determined. Based on the hardware resource consumption parameters corresponding to each program, a resource consumption particle group is set. The resource consumption particle group includes a number of resource consumption particles, and the number of resource consumption particles is determined according to the hardware resource consumption parameters.
[0009] A real-time hardware resource occupancy frame is established. The real-time hardware resource occupancy frame is used to express the maximum carrying capacity of the system hardware resources. The real-time hardware resource occupancy frame is used to perform real-time dynamic resource application simulation operations. Each dynamic resource application simulation operation includes configuring resource consumption particles in the real-time hardware resource occupancy frame based on the first hardware resource priority weight and the second resource hardware priority weight, and calculating the cumulative hardware resource consumption parameters after a preset time period, and selecting the resource application simulation strategy with the highest cumulative hardware resource consumption parameters to allocate hardware resources.
[0010] In some embodiments disclosed in the present invention, the method for performing real-time dynamic resource application simulation calculation using the real-time hardware resource occupation frame also includes:
[0011] The real-time hardware resource occupation frame is allocated with resource consumption particles frame by frame, each frame corresponds to a preset unit time segment, a number of parallel thread slots are set in the real-time hardware resource occupation frame, and based on the number of threads that each program can occupy, the maximum upper limit of the parallel thread slots that can be occupied by the resource consumption particles corresponding to the program is determined at the same time;
[0012] Based on the hardware performance occupancy index corresponding to each resource consumption particle in the real-time hardware resource occupancy frame, the total amount of the hardware performance occupancy index corresponding to each frame of the real-time hardware occupancy frame is determined. If a certain hardware performance occupancy index reaches a preset value, the resource consumption particle configuration for the real-time hardware resource occupancy frame is stopped, and the resource consumption particle configuration for the real-time hardware resource occupancy frame of the next frame is performed.
[0013] In some embodiments disclosed in the present invention, the hardware performance occupancy index includes CPU usage, memory occupancy, disk I / O, and network bandwidth occupancy.
[0014] In some embodiments disclosed in the present invention, based on the user's operation characteristics and the data characteristics analyzed by the program, the method for determining the hardware resource consumption parameters required to complete the total progress of each program includes:
[0015] Analyze the data characteristics to determine the data types contained in the data and the data volume of each data type; analyze the user's operation characteristics to determine the specific data objects that the program needs to process and the processing methods; and build a specific data processing object sequence based on the order of the specific data objects that need to be processed, and associate the processing method with the specific data objects in each order;
[0016] Analyze the data type and data volume corresponding to each specific data processing object in the specific data processing object sequence, determine the hardware resource consumption parameter of the data processing object retrieved from the data, and determine the unit hardware resource consumption parameter for the specific data processing object based on the data type and processing method corresponding to the specific data processing object;
[0017] For the data volume of the specific data processing object at each order in the specific data processing object sequence and the determined unit hardware resource consumption parameters, the hardware resource consumption parameters of the specific data processing object at the corresponding order are determined, and the sum of the hardware resource consumption parameters corresponding to all orders of the specific data processing object sequence is calculated.
[0018] In some embodiments disclosed in the present invention, a method for determining hardware resource consumption parameters of a data processing object detected and selected from data includes:
[0019] A search difficulty coefficient is set for different data types, and based on the data volume corresponding to the data type, the hardware resource consumption parameter of the unit data of the data processing object retrieved from the data type is determined;
[0020] Based on the data volume of the data processing object and the hardware resource consumption parameters per unit data of the data processing object, it is determined to retrieve the hardware resource consumption parameters of the data processing object from the data.
[0021] In some embodiments disclosed in the present invention, the expression for determining the hardware resource consumption parameter of the data processing object retrieved from the data is:
[0022] ;
[0023] in, To retrieve the hardware resource consumption parameters of the data processing object from the data, L is the retrieval difficulty coefficient corresponding to the data type, is the data volume corresponding to the data type, is the data volume of the data processing object, l is the data volume impact adjustment coefficient of the data processing object, The adjustment constant is affected by the data volume of the data processing object. It is the hardware resource consumption parameter of unit data of the data processing object.
[0024] In some embodiments disclosed in the present invention, a method for determining a hardware resource consumption parameter per unit data of a data processing object includes:
[0025] Determine a number of hardware performance occupancy indicators that are to be occupied by unit data of the data processing object, and determine the performance occupancy ratio of each hardware performance occupancy indicator to its own total hardware performance indicator, and sort the hardware performance occupancy indicators according to the size relationship of the performance occupancy ratios, identify the hardware performance indicator with the first order as a constituent element of the main hardware resource consumption sub-parameter, and the hardware performance indicators with other orders are identified as constituent elements of the secondary hardware resource consumption sub-parameters in turn;
[0026] Based on the performance occupancy ratio, a weight adjustment operator is configured for each hardware performance occupancy indicator, and the hardware resource consumption parameters per unit data of the data processing object are obtained by comprehensive calculation;
[0027] The expression for calculating the hardware resource consumption parameter per unit data of the data processing object is:
[0028] ;
[0029] in, It is the hardware resource consumption parameter of unit data of the data processing object. The conversion adjustment coefficient for the main hardware resource consumption sub-parameter, The conversion adjustment coefficient for other secondary hardware resource consumption sub-parameters, The influence adjustment coefficient of the performance occupancy ratio corresponding to the main hardware resource consumption sub-parameter, c is the adjustment constant of the performance occupancy ratio corresponding to the main hardware resource consumption sub-parameter, The total hardware performance index corresponding to the main hardware resource consumption sub-parameter, is the ith secondary hardware performance occupancy index, is the total performance index of the ith secondary hardware, n is the total number of secondary hardware performance indicators, The hardware performance occupancy index corresponding to the main hardware resource consumption sub-parameter, It is the hardware performance occupancy index corresponding to the i-th secondary hardware resource consumption sub-parameter.
[0030] In some embodiments disclosed in the present invention, based on the first hardware resource priority weight and the second hardware resource priority weight, a method for configuring resource-consuming particles in a real-time hardware resource occupation frame includes:
[0031] The sum of the first hardware resource priority weight and the second hardware resource priority weight corresponding to each program is calculated to obtain a comprehensive resource priority weight, and based on the comprehensive resource priority weight corresponding to each program, the proportion of different resource consumption particles configured in the real-time hardware resource occupation frame is determined.
[0032] In some embodiments disclosed in the present invention, there is also disclosed an intelligent hardware adjustment system for analyzing program execution, including:
[0033] The first module is used to obtain a computer program process list and determine the first hardware resource priority weights of different programs based on a preset program process priority weight table;
[0034] The second module is used to call the system API interface information, and based on the system API interface information, determine the programs that the user is currently operating at the same time, as well as the user's operation characteristics and the data characteristics analyzed by the program, and based on the determined programs that the user is currently operating at the same time, configure a second hardware resource priority weight for the corresponding program;
[0035] The third module is used to determine the hardware resource consumption parameters required to complete the total progress of each program based on the user's operation characteristics and the data characteristics analyzed by the program, and to set a resource consumption particle group based on the hardware resource consumption parameters corresponding to each program. The resource consumption particle group includes a number of resource consumption particles, and the number of resource consumption particles is determined according to the hardware resource consumption parameters;
[0036] The fourth module is used to establish a real-time hardware resource occupancy frame, which is used to express the maximum carrying capacity of the system hardware resources. The real-time hardware resource occupancy frame is used to perform real-time dynamic resource application simulation operations. Each dynamic resource application simulation operation includes configuring resource consumption particles in the real-time hardware resource occupancy frame based on the first hardware resource priority weight and the second resource hardware priority weight, and calculating the cumulative hardware resource consumption parameters after a preset time period, and selecting the resource application simulation strategy with the highest cumulative hardware resource consumption parameters to allocate hardware resources.
[0037] The present invention discloses an intelligent hardware adjustment method and system for program execution process analysis, relates to the technical field of hardware performance allocation, and discloses a method and system for allocating a first hardware resource priority weight to different programs based on a preset program process priority weight table; determining a user's current operation program and operation characteristics by calling system API interface information, and configuring a second hardware resource priority weight for the corresponding program; determining hardware resource consumption parameters required for program completion progress according to user operation characteristics and program data characteristics, and setting a resource consumption particle group; establishing a real-time hardware resource occupancy frame, performing dynamic resource application simulation calculations, and selecting an optimal strategy to allocate hardware resources; the present invention realizes reasonable allocation of hardware resources through the above technical scheme, and improves the execution efficiency and real-time response capability of the program relative to user needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 A method step diagram of an intelligent hardware adjustment method for program process analysis disclosed in an embodiment of the present invention. DETAILED DESCRIPTION
[0039] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.
[0040] The purpose of the present invention is to provide an intelligent hardware adjustment method and system capable of reasonably configuring hardware resources.
[0041] In order to achieve the above object, the present invention adopts the following technical solutions:
[0042] See also Figure 1, an intelligent hardware adjustment method for program execution process analysis, comprising:
[0043] Step S100, obtaining a computer program process list, and determining first hardware resource priority weights of different programs based on a preset program process priority weight table.
[0044] This step is to determine the basic hardware resource priority weights of different programs. The system first obtains a list of all program processes currently running on the computer, in order to fully understand the current operating status of the system. Then, the system assigns a first hardware resource priority weight to each program according to the preset program process priority weight table. This weight is set based on the importance of the program in the system and its regular demand for hardware resources, ensuring that key programs can obtain sufficient hardware resource support.
[0045] Step S200, calling the system's API interface information, and based on the system's API interface information, determining the programs that the user is currently operating simultaneously, as well as the user's operation characteristics and the data characteristics analyzed by the program, and based on the determined programs that the user is currently operating simultaneously, configuring a second hardware resource priority weight for the corresponding program.
[0046] This step further refines the allocation of hardware resources, taking into account the user's current operations and the data characteristics of the program. The system obtains information about all programs that the user is currently operating at the same time, as well as the user's operation characteristics and the data types processed by the program by calling the system's API interface information. The system configures the second hardware resource priority weight for the programs currently operating at the same time. This weight reflects the specific hardware resource requirements of the user's current behavior, making the allocation of hardware resources more in line with the user's actual operations.
[0047] Step S300, based on the user's operation characteristics and the data characteristics analyzed by the program, determine the hardware resource consumption parameters required to complete the total progress of each program, and based on the hardware resource consumption parameters corresponding to each program, set a resource consumption particle group, the resource consumption particle group includes a number of resource consumption particles, and the number of resource consumption particles is determined according to the hardware resource consumption parameters.
[0048] This step sets the resource-consuming particle group by predicting the amount of hardware resources each program needs to consume to complete its task. The system calculates the amount of hardware resources that each program may consume when completing its total progress based on the user's operating characteristics and the data characteristics analyzed by the program. This prediction takes into account the complexity of program operation and the scale of data processing. Then, the system creates a resource-consuming particle group for each program, where the number of particles is proportional to the program's hardware resource consumption parameters. It is used to simulate and optimize the allocation of hardware resources.
[0049] In some embodiments disclosed in the present invention, based on the user's operation characteristics and the data characteristics analyzed by the program, the method for determining the hardware resource consumption parameters required to complete the total progress of each program includes:
[0050] Step S301, analyze the data features to determine the data types contained in the data and the data volume of each data type, analyze the user's operation characteristics to determine the specific data objects that the program needs to process and the processing methods, and build a specific data processing object sequence based on the sequence relationship of the specific data objects that need to be processed, and associate the processing method with the specific data objects in each sequence.
[0051] This step mainly conducts a detailed analysis of the data and user operations. First, the system analyzes the data features to clarify the various types of data contained in the data and the amount of data of each type. At the same time, the system also analyzes the user's operation characteristics to determine the specific data objects that the program needs to process and how to process them. Based on the processing sequence between these data objects, the system constructs a specific sequence of data processing objects and associates the corresponding processing method for each data object in the sequence. In this way, the system can clearly understand the objects that the program needs to face when processing data and how to process them.
[0052] Step S302, analyze the data type and data volume corresponding to each specific data processing object in the sequence of specific data processing objects, determine the hardware resource consumption parameters of the data processing object retrieved from the data, and based on the data type and processing method corresponding to the specific data processing object, determine the unit hardware resource consumption parameters for the specific data processing object.
[0053] In this step, the system further analyzes each data object in the specific data processing object sequence. It examines the data type and data volume of each data object to determine the hardware resource consumption parameters required to retrieve these processing objects from the data. At the same time, the system also calculates the unit hardware resource consumption parameters for each data object based on the data type and processing method of the data object. In this way, the system can more accurately estimate the amount of hardware resources required to process different data objects.
[0054] Step S303, for the data volume of the specific data processing object at each order in the specific data processing object sequence and the determined unit hardware resource consumption parameters, determine the hardware resource consumption parameters of the specific data processing object at the corresponding order, and calculate the sum of the hardware resource consumption parameters corresponding to all orders of the specific data processing object sequence.
[0055] This step is a summary and application of the previous analysis. The system calculates the hardware resource consumption parameters required for processing each data object based on the data volume and unit hardware resource consumption parameters of each data object in the specific data processing object sequence. Then, it accumulates the hardware resource consumption parameters of all data objects in the sequence to obtain the sum of the hardware resource consumption parameters required for the program to complete the total progress. In this way, the system can fully understand the amount of hardware resources required by the program when processing data, providing an accurate basis for subsequent hardware resource allocation.
[0056] In some embodiments disclosed in the present invention, a method for determining hardware resource consumption parameters of a data processing object detected and selected from data includes:
[0057] Step S3031, setting a retrieval difficulty coefficient for different data types, and determining the hardware resource consumption parameter of unit data of the data processing object retrieved from the data type based on the data volume corresponding to the data type.
[0058] This step focuses on the impact of data types on hardware resource consumption. The system first sets a retrieval difficulty coefficient for different types of data, which reflects the amount of hardware resources required to retrieve the processing object from that type of data. Then, based on the data volume corresponding to each data type, the system calculates the hardware resource consumption parameters required to retrieve a unit of data (such as a data record or data block) from that type of data. In this way, the system can understand the demand for hardware resources for retrieval operations when processing different types of data.
[0059] Step S3032, based on the data volume of the data processing object and the hardware resource consumption parameters per unit data of the data processing object, determine the hardware resource consumption parameters of the data processing object retrieved from the data.
[0060] In this step, the system uses the hardware resource consumption parameters of the unit data calculated previously to determine the hardware resource consumption parameters required to retrieve the data processing object from the entire data. It performs multiplication operations based on the data volume of the data processing object and the hardware resource consumption parameters of the unit data to obtain the total hardware resource consumption parameters. In this way, the system can accurately estimate the amount of hardware resources required when retrieving a specific processing object from the data. This estimation result provides an important reference for subsequent hardware resource allocation and program performance optimization.
[0061] In some embodiments disclosed in the present invention, the expression for determining the hardware resource consumption parameter of the data processing object retrieved from the data is:
[0062] .
[0063] in, To retrieve the hardware resource consumption parameters of the data processing object from the data, L is the retrieval difficulty coefficient corresponding to the data type, is the data volume corresponding to the data type, is the data volume of the data processing object, l is the data volume impact adjustment coefficient of the data processing object, The adjustment constant is affected by the data volume of the data processing object. It is the hardware resource consumption parameter of unit data of the data processing object.
[0064] Among them, the retrieval difficulty coefficient L represents the difficulty of retrieving information or data objects from a specific type of data. It is an empirical value that varies based on the data type and retrieval technology. The higher the retrieval difficulty coefficient, the more hardware resources (such as CPU time, memory usage, etc.) are required to retrieve information from this type of data. In practical applications, the retrieval difficulty coefficient can be determined through expert evaluation.
[0065] The data volume impact adjustment coefficient l of the data processing object is used to adjust the impact of the data volume of the data processing object on the hardware resource consumption. It is an empirical value used to magnify or reduce the importance of the data volume of the data processing object in the calculation of hardware resource consumption. By adjusting this coefficient, the impact of the data volume of the data processing object on the hardware resource consumption can be more finely controlled, thereby better reflecting the resource consumption in the actual application scenario.
[0066] The data volume of the data processing object affects the adjustment constant k, which is a constant term used to further adjust the calculation of the hardware resource consumption parameters. It can be set based on empirical data or system characteristics to ensure that the calculation of the hardware resource consumption parameters is more accurate. In actual applications, this number may need to be adjusted according to the specific system environment or business requirements to achieve the best computing effect.
[0067] In some embodiments disclosed in the present invention, a method for determining a hardware resource consumption parameter per unit data of a data processing object includes:
[0068] Step S30321, determine the number of hardware performance occupancy indicators that the unit data of the data processing object will occupy, and judge the performance occupancy ratio of each hardware performance occupancy indicator to its own total hardware performance indicator, and sort the hardware performance occupancy indicators according to the size relationship of the performance occupancy ratios, and identify the hardware performance indicator with the first rank as the constituent element of the main hardware resource consumption sub-parameter, and the hardware performance indicators of other ranks are identified as the constituent elements of the secondary hardware resource consumption sub-parameters in turn.
[0069] Step S30322: Based on the performance occupancy ratio, a weight adjustment operator is configured for each hardware performance occupancy indicator, and a hardware resource consumption parameter per unit data of the data processing object is obtained by comprehensive calculation.
[0070] The expression for calculating the hardware resource consumption parameter per unit data of the data processing object is:
[0071] ;
[0072] in, It is the hardware resource consumption parameter of unit data of the data processing object. The conversion adjustment coefficient for the main hardware resource consumption sub-parameter, The conversion adjustment coefficient for other secondary hardware resource consumption sub-parameters, The influence adjustment coefficient of the performance occupancy ratio corresponding to the main hardware resource consumption sub-parameter, c is the adjustment constant of the performance occupancy ratio corresponding to the main hardware resource consumption sub-parameter, The total hardware performance index corresponding to the main hardware resource consumption sub-parameter, is the ith secondary hardware performance occupancy index, is the total performance index of the ith secondary hardware, n is the total number of secondary hardware performance indicators, The hardware performance occupancy index corresponding to the main hardware resource consumption sub-parameter, It is the hardware performance occupancy index corresponding to the i-th secondary hardware resource consumption sub-parameter.
[0073] The conversion adjustment coefficient of the main hardware resource consumption sub-parameter is used to adjust the contribution of the main hardware resource consumption sub-parameter in calculating the overall hardware resource consumption. By changing this coefficient, the impact of the main hardware resource consumption sub-parameter on the final hardware resource consumption parameter can be magnified or reduced.
[0074] Conversion adjustment coefficients for other secondary hardware resource consumption sub-parameters. These coefficients are used to adjust the contribution of each secondary hardware resource consumption sub-parameter in calculating the overall hardware resource consumption. Different secondary hardware resource consumption sub-parameters may have different conversion adjustment coefficients to reflect their different importance in the overall hardware resource consumption.
[0075] The influence adjustment coefficient of the performance occupancy ratio corresponding to the main hardware resource consumption sub-parameter is used to further adjust the influence of the performance occupancy ratio corresponding to the main hardware resource consumption sub-parameter when calculating the hardware resource consumption. By changing this coefficient, the contribution of the main hardware resource consumption sub-parameter to the final hardware resource consumption parameter can be more finely controlled.
[0076] The adjustment constant of the performance occupancy ratio corresponding to the main hardware resource consumption sub-parameter. This is a constant item used to fine-tune the performance occupancy ratio corresponding to the main hardware resource consumption sub-parameter. In actual applications, this constant item may need to be adjusted according to the specific system environment or business requirements to achieve the best computing effect.
[0077] Step S400, establish a real-time hardware resource occupancy frame, the real-time hardware resource occupancy frame is used to express the maximum carrying capacity of the system hardware resources, and use the real-time hardware resource occupancy frame to perform real-time dynamic resource application simulation operations. Each dynamic resource application simulation operation includes configuring resource consumption particles in the real-time hardware resource occupancy frame based on the first hardware resource priority weight and the second resource hardware priority weight, and calculating the cumulative hardware resource consumption parameters after a preset time period, and selecting the resource application simulation strategy with the highest cumulative hardware resource consumption parameters to allocate hardware resources.
[0078] This step selects the optimal hardware resource allocation strategy through simulation calculation. The system first establishes a real-time hardware resource occupancy frame, which represents the maximum carrying capacity of the system hardware resources. Then, the system performs dynamic resource application simulation calculations within this frame. Each simulation calculation considers the first hardware resource priority weight and the second hardware resource priority weight, configures the resource consumption particles into the real-time hardware resource occupancy frame, and calculates the cumulative hardware resource consumption parameters after the preset time period. By comparing the cumulative hardware resource consumption parameters under different simulation strategies, the system selects the optimal resource application strategy and actually allocates hardware resources according to this strategy. In this way, the system can dynamically optimize the allocation of hardware resources according to the importance of the program and the actual needs of the user, and improve the overall performance and response speed of the system.
[0079] In some embodiments disclosed in the present invention, the method for performing real-time dynamic resource application simulation calculation using the real-time hardware resource occupation frame also includes:
[0080] Step S401, allocates resource-consuming particles to the real-time hardware resource occupancy frame frame by frame, each frame corresponds to a preset unit time segment, a number of parallel thread slots are set in the real-time hardware resource occupancy frame, and based on the number of threads that each program can occupy, determines the maximum upper limit of the parallel thread slots that can be simultaneously occupied by the resource-consuming particles corresponding to the program.
[0081] This step involves detailed time slicing and resource allocation simulation of the real-time hardware resource occupation frame. The system configures resource-consuming particles in the real-time hardware resource occupation frame frame by frame, and each frame represents a preset unit time segment. Several parallel thread slots are set in the real-time hardware resource occupation frame, and these thread slots represent the number of threads that the system can process simultaneously. Based on the number of threads that each program can occupy, the system determines the upper limit of the parallel thread slots that the resource-consuming particles corresponding to the program can occupy at the same time. In this way, the system can simulate the occupation of hardware resources by each program at different time points, as well as the thread competition relationship between them.
[0082] Step S402, based on the hardware performance occupancy index corresponding to each resource consumption particle in the real-time hardware resource occupancy frame, determine the total amount of hardware performance occupancy index corresponding to each frame of the real-time hardware resource occupancy frame; if a certain hardware performance occupancy index reaches a preset value, stop configuring resource consumption particles for the real-time hardware resource occupancy frame, and configure resource consumption particles for the real-time hardware resource occupancy frame of the next frame.
[0083] This step is to ensure the accuracy and effectiveness of the simulation operation. The system calculates the total amount of hardware performance occupancy indicators corresponding to each frame of the real-time hardware resource occupancy box based on the hardware performance occupancy indicator corresponding to each resource-consuming particle in the real-time hardware resource occupancy box. This total amount reflects the overall occupancy of the system hardware resources at the current time point. If a hardware performance occupancy indicator reaches the preset threshold, it means that the system hardware resources are close to or have reached saturation. At this time, the system will stop configuring more resource-consuming particles for the real-time hardware resource occupancy box of the current frame, and instead configure resource-consuming particles for the real-time hardware resource occupancy box of the next frame. In this way, the system can simulate the running status and performance of the program under different hardware resource occupancy conditions, thereby providing an accurate basis for the optimal allocation of hardware resources.
[0084] In some embodiments disclosed in the present invention, the hardware performance occupancy index includes CPU usage, memory occupancy, disk I / O, and network bandwidth occupancy.
[0085] In some embodiments disclosed in the present invention, based on the first hardware resource priority weight and the second hardware resource priority weight, a method for configuring resource-consuming particles in a real-time hardware resource occupation frame includes:
[0086] Step S403, calculate the sum of the first hardware resource priority weight and the second hardware resource priority weight corresponding to each program to obtain a comprehensive resource priority weight, and determine the proportion of different resource consumption particles configured in the real-time hardware resource occupation frame based on the comprehensive resource priority weight corresponding to each program.
[0087] In some embodiments disclosed in the present invention, there is also disclosed an intelligent hardware adjustment system for analyzing program execution, including:
[0088] The first module is used to obtain a computer program process list and determine the first hardware resource priority weights of different programs based on a preset program process priority weight table;
[0089] The second module is used to call the system API interface information, and based on the system API interface information, determine the programs that the user is currently operating at the same time, as well as the user's operation characteristics and the data characteristics analyzed by the program, and based on the determined programs that the user is currently operating at the same time, configure a second hardware resource priority weight for the corresponding program;
[0090] The third module is used to determine the hardware resource consumption parameters required to complete the total progress of each program based on the user's operation characteristics and the data characteristics analyzed by the program, and to set a resource consumption particle group based on the hardware resource consumption parameters corresponding to each program. The resource consumption particle group includes a number of resource consumption particles, and the number of resource consumption particles is determined according to the hardware resource consumption parameters;
[0091] The fourth module is used to establish a real-time hardware resource occupancy frame, which is used to express the maximum carrying capacity of the system hardware resources. The real-time hardware resource occupancy frame is used to perform real-time dynamic resource application simulation operations. Each dynamic resource application simulation operation includes configuring resource consumption particles in the real-time hardware resource occupancy frame based on the first hardware resource priority weight and the second resource hardware priority weight, and calculating the cumulative hardware resource consumption parameters after a preset time period, and selecting the resource application simulation strategy with the highest cumulative hardware resource consumption parameters to allocate hardware resources.
[0092] The present invention discloses an intelligent hardware adjustment method and system for program execution process analysis, relates to the technical field of hardware performance allocation, and discloses a method and system for allocating a first hardware resource priority weight to different programs based on a preset program process priority weight table; determining a user's current operation program and operation characteristics by calling system API interface information, and configuring a second hardware resource priority weight for the corresponding program; determining hardware resource consumption parameters required for program completion progress according to user operation characteristics and program data characteristics, and setting a resource consumption particle group; establishing a real-time hardware resource occupancy frame, performing dynamic resource application simulation calculations, and selecting an optimal strategy to allocate hardware resources; the present invention realizes reasonable allocation of hardware resources through the above technical scheme, and improves the execution efficiency and real-time response capability of the program relative to user needs.
[0093] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. An intelligent hardware adjustment method for program execution process analysis, characterized in that: include: Obtain a computer program process list, and determine first hardware resource priority weights of different programs based on a preset program process priority weight table; Calling the system's API interface information, and based on the system's API interface information, determining the user's currently operating programs, as well as the user's operation characteristics and the data characteristics analyzed by the program, and configuring a second hardware resource priority weight for the corresponding program based on the determined user's currently operating programs; Based on the user's operation characteristics and the data characteristics analyzed by the program, the hardware resource consumption parameters required to complete the total progress of each program are determined. Based on the hardware resource consumption parameters corresponding to each program, a resource consumption particle group is set. The resource consumption particle group includes a number of resource consumption particles. The number of resource consumption particles is determined according to the hardware resource consumption parameters, wherein the number of resource consumption particles is proportional to the hardware resource consumption parameters of the program, and is used to simulate and optimize the allocation of hardware resources; Establish a real-time hardware resource occupancy frame, which is used to express the maximum carrying capacity of system hardware resources. Use the real-time hardware resource occupancy frame to perform real-time dynamic resource application simulation operations. Each dynamic resource application simulation operation includes configuring resource consumption particles in the real-time hardware resource occupancy frame based on the first hardware resource priority weight and the second resource hardware priority weight, and calculating the cumulative hardware resource consumption parameters after a preset time period, and selecting the resource application simulation strategy with the highest cumulative hardware resource consumption parameter to allocate hardware resources; The method of using the real-time hardware resource occupation frame to perform real-time dynamic resource application simulation calculation also includes: The real-time hardware resource occupation frame is allocated with resource consumption particles frame by frame, each frame corresponds to a preset unit time segment, a number of parallel thread slots are set in the real-time hardware resource occupation frame, and based on the number of threads that each program can occupy, the maximum upper limit of the parallel thread slots that can be occupied by the resource consumption particles corresponding to the program is determined at the same time; Based on the hardware performance occupancy index corresponding to each resource consumption particle in the real-time hardware resource occupancy frame, the total amount of the hardware performance occupancy index corresponding to each frame of the real-time hardware occupancy frame is determined. If a certain hardware performance occupancy index reaches a preset value, the resource consumption particle configuration for the real-time hardware resource occupancy frame is stopped, and the resource consumption particle configuration for the real-time hardware resource occupancy frame of the next frame is performed.
2. The intelligent hardware adjustment method for program execution process analysis according to claim 1, characterized in that: Hardware performance usage indicators include CPU usage, memory usage, disk I / O, and network bandwidth usage.
3. The intelligent hardware adjustment method for program execution process analysis according to claim 1, characterized in that: Based on the user's operation characteristics and the data characteristics analyzed by the program, the method for determining the hardware resource consumption parameters required to complete the total progress of each program includes: Analyze the data characteristics to determine the data types contained in the data and the data volume of each data type; analyze the user's operation characteristics to determine the specific data objects that the program needs to process and the processing methods; and build a specific data processing object sequence based on the order of the specific data objects that need to be processed, and associate the processing method with the specific data objects in each order; Analyze the data type and data volume corresponding to each specific data processing object in the specific data processing object sequence, determine the hardware resource consumption parameter of the data processing object retrieved from the data, and determine the unit hardware resource consumption parameter for the specific data processing object based on the data type and processing method corresponding to the specific data processing object; For the data volume of the specific data processing object at each order in the specific data processing object sequence and the determined unit hardware resource consumption parameters, the hardware resource consumption parameters of the specific data processing object at the corresponding order are determined, and the sum of the hardware resource consumption parameters corresponding to all orders of the specific data processing object sequence is calculated.
4. The intelligent hardware adjustment method for program execution process analysis according to claim 3, characterized in that: The method for determining the hardware resource consumption parameters for detecting and selecting the data processing object from the data includes: A search difficulty coefficient is set for different data types, and based on the data volume corresponding to the data type, the hardware resource consumption parameter of the unit data of the data processing object retrieved from the data type is determined; Based on the data volume of the data processing object and the hardware resource consumption parameters per unit data of the data processing object, it is determined to retrieve the hardware resource consumption parameters of the data processing object from the data.
5. The intelligent hardware adjustment method for program execution process analysis according to claim 4, characterized in that: The expression for determining the hardware resource consumption parameter for retrieving the data processing object from the data is: ; in, To retrieve the hardware resource consumption parameters of the data processing object from the data, is the retrieval difficulty coefficient corresponding to the data type, is the data volume corresponding to the data type, is the data volume of the data processing object, l is the data volume impact adjustment coefficient of the data processing object, The adjustment constant is affected by the data volume of the data processing object. It is the hardware resource consumption parameter of unit data of the data processing object.
6. The intelligent hardware adjustment method for program execution process analysis according to claim 1, characterized in that: The method for determining the hardware resource consumption parameter of unit data of the data processing object includes: Determine a number of hardware performance occupancy indicators that are to be occupied by unit data of the data processing object, and determine the performance occupancy ratio of each hardware performance occupancy indicator to its own total hardware performance indicator, and sort the hardware performance occupancy indicators according to the size relationship of the performance occupancy ratios, identify the hardware performance indicator with the first order as a constituent element of the main hardware resource consumption sub-parameter, and the hardware performance indicators with other orders are identified as constituent elements of the secondary hardware resource consumption sub-parameters in turn; Based on the performance occupancy ratio, a weight adjustment operator is configured for each hardware performance occupancy indicator, and the hardware resource consumption parameters per unit data of the data processing object are obtained by comprehensive calculation; The expression for calculating the hardware resource consumption parameter per unit data of the data processing object is: ; in, It is the hardware resource consumption parameter of unit data of the data processing object. The conversion adjustment coefficient for the main hardware resource consumption sub-parameter, The conversion adjustment coefficient for other secondary hardware resource consumption sub-parameters, The influence adjustment coefficient of the performance occupancy ratio corresponding to the main hardware resource consumption sub-parameter, c is the adjustment constant of the performance occupancy ratio corresponding to the main hardware resource consumption sub-parameter, The total hardware performance index corresponding to the main hardware resource consumption sub-parameter, is the ith secondary hardware performance occupancy index, is the total performance index of the ith secondary hardware, n is the total number of secondary hardware performance indicators, The hardware performance occupancy index corresponding to the main hardware resource consumption sub-parameter, It is the hardware performance occupancy index corresponding to the i-th secondary hardware resource consumption sub-parameter.
7. The intelligent hardware adjustment method for program execution process analysis according to claim 1, characterized in that: The method for configuring resource consumption particles in a real-time hardware resource occupation frame based on a first hardware resource priority weight and a second hardware resource priority weight includes: The sum of the first hardware resource priority weight and the second hardware resource priority weight corresponding to each program is calculated to obtain a comprehensive resource priority weight, and based on the comprehensive resource priority weight corresponding to each program, the proportion of different resource consumption particles configured in the real-time hardware resource occupation frame is determined.
8. An intelligent hardware adjustment system for program execution process analysis, characterized in that: The intelligent hardware adjustment method described in claim 1 is applied, comprising: The first module is used to obtain a computer program process list and determine the first hardware resource priority weights of different programs based on a preset program process priority weight table; The second module is used to call the system API interface information, and based on the system API interface information, determine the programs that the user is currently operating at the same time, as well as the user's operation characteristics and the data characteristics analyzed by the program, and based on the determined programs that the user is currently operating at the same time, configure a second hardware resource priority weight for the corresponding program; The third module is used to determine the hardware resource consumption parameters required to complete the total progress of each program based on the user's operation characteristics and the data characteristics analyzed by the program, and to set a resource consumption particle group based on the hardware resource consumption parameters corresponding to each program. The resource consumption particle group includes a number of resource consumption particles, and the number of resource consumption particles is determined according to the hardware resource consumption parameters; The fourth module is used to establish a real-time hardware resource occupancy frame, which is used to express the maximum carrying capacity of the system hardware resources. The real-time hardware resource occupancy frame is used to perform real-time dynamic resource application simulation operations. Each dynamic resource application simulation operation includes configuring resource consumption particles in the real-time hardware resource occupancy frame based on the first hardware resource priority weight and the second resource hardware priority weight, and calculating the cumulative hardware resource consumption parameters after a preset time period, and selecting the resource application simulation strategy with the highest cumulative hardware resource consumption parameters to allocate hardware resources.
