Process scheduling method and computer storage medium

By calculating the comprehensive dependency strength indicators of process interaction, data dependence and operation context feature data, dynamically adjusting the scheduling parameters, the problems of high scheduling overhead and low resource utilization in traditional scheduling methods are solved, and system performance and stability are improved.

CN119248455AActive Publication Date: 2025-01-03CHINA SOUTHERN POWER GRID COMPANY

Patent Information

Application Number
CN202411494905.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-01-03
Estimated Expiration
2044-10-24

AI Technical Summary

Technical Problem

Traditional process scheduling methods are difficult to adapt to dynamically changing workloads and complex process dependencies, resulting in high scheduling overhead, low resource utilization, and limited optimization effect.

Method used

By obtaining the interactive feature data, data dependency feature data and operation context feature data of the target process, compute comprehensive dependency strength indicators, and dynamically adjust process scheduling parameters to optimize scheduling.

Benefits of technology

It reduces scheduling overhead, improves resource utilization and response speed, and significantly improves the overall performance and stability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119248455A_ABST
    Figure CN119248455A_ABST
Patent Text Reader

Abstract

The invention discloses a process scheduling method and a computer storage medium. The method comprises the following steps: acquiring target interaction feature data, data dependence feature data and running context feature data of a target process, and respectively determining feature dependence intensity indexes of the target interaction feature data, the data dependence feature data and the running context feature data on the target process; determining a comprehensive dependence intensity index corresponding to the target process according to the feature dependence intensity indexes corresponding to the target interaction feature data, the data dependence feature data and the operation context feature data; and obtaining a scheduling overhead proportion of the target process, and adjusting process scheduling parameters of the target process according to the scheduling overhead proportion and the comprehensive dependency intensity index, thereby solving the problems of high scheduling overhead, low resource utilization rate and limited optimization effect of a scheduling method in related technologies, improving the resource utilization rate and the response speed, and improving the user experience. And the overall performance and stability of the system are obviously improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer application technology, and in particular to a process scheduling method and a computer storage medium. Background Art

[0002] In modern multitasking operating systems, process scheduling and resource management is a complex and critical issue. Traditional process scheduling methods are often based on static priorities and time slice allocations, which are difficult to adapt to dynamically changing workloads and complex process dependencies.

[0003] In order to solve the above problems, related technologies attempt to optimize scheduling by dynamically adjusting the priority and time slice of the process. However, these methods usually only consider a single feature, such as CPU usage or memory usage, and fail to fully consider multiple factors such as the interactive characteristics of the process, data dependencies, and running context, resulting in high scheduling overhead, low resource utilization, and limited optimization effect. Summary of the invention

[0004] The present invention provides a process scheduling method and a computer storage medium to solve the problems of high scheduling overhead, low resource utilization and limited optimization effect in the scheduling method in the related art.

[0005] According to one aspect of the present invention, a process scheduling method is provided, the method comprising:

[0006] Obtain target interaction feature data, data dependency feature data, and running context feature data of a target process, and respectively determine feature dependency strength indicators of the target interaction feature data, the data dependency feature data, and the running context feature data on the target process;

[0007] Determine a comprehensive dependency strength index corresponding to the target process according to the feature dependency strength index corresponding to the target interaction feature data, the data dependency feature data, and the running context feature data;

[0008] The scheduling overhead ratio of the target process is obtained, and the process scheduling parameters of the target process are adjusted according to the scheduling overhead ratio and the comprehensive dependency strength index.

[0009] According to another aspect of the present invention, a process scheduling device is provided, the device comprising:

[0010] A feature dependency strength index determination module is used to obtain target interaction feature data, data dependency feature data and operation context feature data of a target process, and respectively determine feature dependency strength indexes of the target interaction feature data, the data dependency feature data and the operation context feature data on the target process;

[0011] A comprehensive dependency strength index determination module, configured to determine a comprehensive dependency strength index corresponding to the target process according to the target interaction feature data, the data dependency feature data and the feature dependency strength index corresponding to the running context feature data;

[0012] The process scheduling parameter adjustment module is used to obtain the scheduling overhead ratio of the target process and adjust the process scheduling parameters of the target process according to the scheduling overhead ratio and the comprehensive dependency strength index.

[0013] According to another aspect of the present invention, there is provided an electronic device, the electronic device comprising:

[0014] at least one processor; and

[0015] a memory communicatively connected to the at least one processor; wherein,

[0016] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the process scheduling method described in any embodiment of the present invention.

[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the process scheduling method described in any embodiment of the present invention when executed.

[0018] According to another aspect of the present invention, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the process scheduling method described in any embodiment of the present invention is implemented.

[0019] The technical solution of the embodiment of the present invention is as follows: first, by acquiring the target interaction feature data, data dependency feature data and running context feature data of the target process, the feature dependency strength index of the target interaction feature data, the data dependency feature data and the running context feature data on the target process is determined respectively, so that the multiple feature data of the target process can be comprehensively analyzed to accurately evaluate its dependency strength; then, the comprehensive dependency strength index corresponding to the target process is determined according to the feature dependency strength index corresponding to the target interaction feature data, the data dependency feature data and the running context feature data, and the comprehensive dependency strength index can be calculated to comprehensively reflect the multi-faceted dependency relationship of the target process and provide a data basis for optimizing scheduling parameters; finally, the scheduling overhead ratio of the target process is obtained, and the process scheduling parameters of the target process are adjusted according to the scheduling overhead ratio and the comprehensive dependency strength index. The scheduling overhead can be reduced by dynamically adjusting the process scheduling parameters, which solves the problems of high scheduling overhead, low resource utilization and limited optimization effect of the scheduling method in the related art, and can improve resource utilization and response speed, thereby significantly improving the overall performance and stability of the system.

[0020] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0022] Figure 1 is a flowchart of a process scheduling method provided according to Embodiment 1 of the present invention;

[0023] Figure 2 is a flowchart of a process scheduling method provided according to Embodiment 2 of the present invention;

[0024] Figure 3 is a schematic diagram of the structure of a process scheduling device provided according to Embodiment 3 of the present invention;

[0025] Figure 4 It is a structural schematic diagram of an electronic device for implementing the process scheduling method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0026] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described 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, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0028] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0029] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0030] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0031] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0032] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0033] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0034] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0035] Embodiment 1

[0036] Figure 1 A flowchart of a process scheduling method is provided for the first embodiment of the present invention. This embodiment can be applied to scenarios where complex process scheduling is processed to optimize resource allocation and response speed. The method can be executed by a process scheduling device, which can be implemented in the form of hardware and / or software, and optionally, by an electronic device, which can be a mobile terminal, a PC, a server, etc.

[0037] like Figure 1 As shown, the method may specifically include:

[0038] S110, obtaining target interaction feature data, data dependency feature data, and operation context feature data of a target process, and respectively determining feature dependency strength indicators of the target interaction feature data, the data dependency feature data, and the operation context feature data on the target process.

[0039] Among them, the target process can be understood as a program or task being executed in the operating system, which is used to complete a specific function or service. The target interaction feature data can be understood as data related to the target process that can reflect the interaction behavior between the target process and other processes or system components. It can be understood that by analyzing the target interaction feature data, the interaction mode of the target process in the operating system can be understood. The data dependency feature data can be understood as the degree of dependence of the target process on external data resources during execution. It can be understood that analyzing the data dependency feature data helps to evaluate the stability of the process and the impact on other operating system components. The running context feature data can be understood as the environmental conditions in which the target process is running. It can be understood that by analyzing the running context feature data, it can be used to diagnose performance bottlenecks and optimize resource usage. The feature dependency strength index can be understood as an indicator used to measure the degree of influence of the target interaction feature, data dependency feature and running context feature on the target process.

[0040] On the basis of the above scheme, optionally, the acquiring target interaction feature data of the target process and determining the feature dependence strength index of the target interaction feature data on the target process include: acquiring the target interaction feature data of the target process; in the case where abnormal operation feature data exists in the target interaction feature data, determining the abnormality degree index corresponding to the abnormal operation feature data, and determining the feature dependence strength index of the target interaction feature data on the target process according to the abnormality degree index of the abnormal operation feature data.

[0041] Among them, the target interaction characteristic data process can be understood as the characteristic data generated when interacting with other processes, system components or external resources during operation. Exemplarily, the target interaction characteristic data may include but is not limited to at least one of the interaction characteristic data such as mouse click interval, keyboard key interval and touch screen click force. The target interaction characteristic data may include normal operation characteristic data and / or abnormal operation characteristic data. The normal operation characteristic can be understood as the characteristic exhibited by the target process under normal operation. Exemplarily, the normal operation characteristic may include the mouse click interval, keyboard key interval and touch screen click force that meet the normal operation characteristics. The abnormal operation characteristic, which is different from the normal operation characteristic, can be understood as the characteristic exhibited by the target process under abnormal operation. For example, the normal operation characteristic may include the mouse click interval not being within the preset first time range, the keyboard key interval not being within the preset second time range, the touch screen click force not being within the preset force range, the change data of the target interaction characteristic data at multiple time points within the preset time period meets the first preset condition, etc. The first preset condition may be that the proportion of the change data within the preset change range is greater than the preset proportion, etc. Exemplarily, the abnormal operation characteristics may include but are not limited to abnormal mouse click interval (too short or too long), abnormal keyboard key interval (too fast or too slow) and abnormal touch screen click strength (too light or too heavy). The abnormality degree index can be understood as an index used to measure the severity of abnormal operation characteristics. Exemplarily, when the mouse click interval is far below the normal range, or the keyboard key interval is abnormally short, it can be considered as an abnormal operation feature. The abnormality degree index can be determined by setting a threshold value. The more serious the degree of exceeding the set threshold, the higher the index value. The feature dependence strength index can be understood as an index used to measure the degree of influence of the target interaction feature data on the target process. Specifically, when a process is very sensitive to a certain target interaction feature data (such as mouse click interval, keyboard key interval or touch screen click strength, etc.), the corresponding abnormal operation feature may cause the performance of the process to degrade or fail. The feature dependence strength index can be calculated according to the abnormality degree index. The higher the abnormality degree, the higher the feature dependence strength index.

[0042] An optional implementation method is to obtain the target interactive feature data of the target process, record the timestamp of the mouse click event and calculate the mouse click interval time between two adjacent clicks, as well as the timestamp of the keyboard key event and calculate the keyboard key interval time between two adjacent keys, and store these data in the interactive feature database. According to the historical data stored in the interactive feature database, the mean and standard deviation of the mouse click interval time and the keyboard key interval time are calculated, and the mean ± 2 times the standard deviation range is set as the normal operation threshold, and stored in the threshold configuration table. The latest user operation data is read from the interactive feature database, and compared with the judgment threshold in the threshold configuration table. If a certain operation feature data exceeds the corresponding threshold range, the feature is marked as an abnormal operation feature, and the abnormal degree index (percentage of deviation from the threshold) is recorded. For the feature marked as abnormal operation, the impact weight is adjusted according to its abnormal degree. For every 10% increase in the abnormal degree, the impact weight corresponding to the feature is increased by 0.1, and the adjusted weight is updated to the weight configuration table. According to the updated weight configuration table, the feature dependency strength score of the target process is recalculated. The score calculation method is the weighted sum of each feature value multiplied by the corresponding weight, and the calculation result is used as the feature dependency strength index of the target process. The WinAPI function SetWindowsHookEx provided by the Windows system can be used to set a global hook to capture mouse click events and keyboard key events. When an event is captured, the event type and timestamp are recorded, such as the timestamp of the left mouse button click event is 1632547890. The time difference between two adjacent events is calculated, such as the interval between two mouse clicks is 500 milliseconds and the interval between two keyboard keys is 200 milliseconds. These data are stored in the interactive feature table in the SQLite database. Historical data analysis uses Python's pandas library to read the data of the last 7 days and calculate the mean and standard deviation of the mouse click interval and keyboard key interval. Assuming that the mean mouse click interval is 600 milliseconds and the standard deviation is 100 milliseconds, the normal operation threshold range is 400-800 milliseconds. The mean keyboard key interval is 250 milliseconds and the standard deviation is 50 milliseconds, so the normal operation threshold range is 150-350 milliseconds. The threshold is written to the configuration file. The latest 100 operation data are read from the database every 5 seconds and compared with the threshold in the configuration file. If the mouse click interval is found to be 900 milliseconds, which exceeds the upper threshold of 100 milliseconds, the abnormality index is recorded as 12.5%. For abnormal data, the original weight value is increased by 0.1×12.5%=0.0125. Assuming the original weight is 0.5, the updated weight is 0.5125, which is updated to the weight configuration table. Read the latest values ​​and weights of all features and perform weighted summation.For example, if the characteristic value of the mouse click interval is 900 and the weight is 0.5125, and the characteristic value of the keyboard key interval is 300 and the weight is 0.4, then the dependency strength score is 900×0.5125+300×0.4=581.25. This score is used as the feature dependency strength indicator of the process for subsequent anomaly detection and processing.

[0043] The above scheme obtains the target interaction feature data of the target process, identifies and evaluates the abnormality degree index of the abnormal operation feature, thereby determining the feature dependence strength index of the target interaction feature data on the target process, and can timely discover and handle abnormal interaction operations, optimize process scheduling parameters, reduce system overhead, improve response speed and resource utilization, and ensure system stability and performance.

[0044] On the basis of the above scheme, optionally, the data dependency characteristic data of the target process is obtained, and a characteristic dependency strength index of the data dependency characteristic data on the target process is determined, including: obtaining data dependency characteristic data of multiple data processing nodes in the target process; marking the data processing node as an abnormal processing node when the data processing node is located on the data dependency critical path and the data arrival time interval of the data processing node is greater than or equal to a preset time interval threshold; determining the node abnormality degree corresponding to the abnormal processing node, and determining the node influence weight corresponding to the abnormal processing node according to the position of the abnormal processing node in the data dependency critical path and the node abnormality degree; determining the characteristic dependency strength index of the data dependency characteristic data on the target process according to the node influence weight corresponding to the abnormal processing node in the target process.

[0045] Among them, the data processing node can be understood as each component or module responsible for processing data in the target process, which is used to perform specific data processing tasks. Exemplarily, the data processing tasks may include but are not limited to data reading, calculation, conversion and storage. It is understandable that the corresponding data dependency characteristic data can be obtained from the data processing node. The data dependency characteristic data includes data arrival time interval and data dependency critical path. The data arrival time interval can be understood as the time difference between data from one data processing node to the next data processing node, which is used to reflect the transmission efficiency of data between different nodes. The data dependency critical path can be understood as the path of the key nodes that the data passes through in the processing flow, and the key nodes have the greatest impact on the performance of the entire data processing process. The delay on the data dependency critical path will directly affect the processing time. The preset time interval threshold can be understood as a pre-set time value, which is used to determine whether the data arrival time interval is normal. It is understandable that when the actual data arrival time interval is greater than or equal to the time interval, the data processing node may be abnormal, and the data processing node is marked as an abnormal processing node. The abnormal processing node is used to reflect that there is a problem with the processing speed or data transmission efficiency of the data processing node. The node abnormality degree can be understood as a quantitative indicator for measuring the severity of the abnormality of the abnormal processing node, which can be determined by calculating the difference between the actual data arrival time interval and the preset time interval threshold. The node impact weight can be understood as a measure of the influence of the abnormal processing node on the entire data processing process. Exemplarily, the closer the node position of the abnormal processing node is on the data dependency critical path, the greater the impact on subsequent nodes. The feature dependency strength index can be used to measure the influence of data dependency feature data on the target process. Specifically, by analyzing the node impact weights of all abnormal processing nodes, the feature dependency strength index of the entire data dependency feature data on the target process is determined. The higher the feature dependency strength index, the greater the influence of the data dependency feature on the target process.

[0046] An optional implementation method is to obtain the data arrival timestamp of each data processing node in the target process, calculate the data arrival time interval between two adjacent data arrivals, and store the data arrival time interval in a time series database. The data dependency is identified by a dependency graph construction tool, and the dependency information is saved in the dependency database. According to the latest 1000 data points stored in the time series database, the mean and standard deviation of the data arrival time interval are calculated using the sliding window method, and the mean ±3 times the standard deviation range is set as the normal time interval threshold, that is, the preset time interval threshold, and the threshold information is written into the configuration file. The latest data arrival time interval data is read from the time series database, and compared with the preset time interval threshold in the configuration file. If the time interval of a data processing node is not less than the corresponding time interval threshold, it is marked as an abnormal processing node. The node dependency in the dependency database is analyzed using a topological sorting algorithm to determine the data dependency critical path. For the data processing nodes marked as abnormal and located on the data dependency critical path, the node abnormality degree (percentage exceeding the threshold) is calculated, and the new node influence weight is calculated using the linear interpolation method according to the node position and abnormality degree on the data dependency critical path. The weight increase of the node at the beginning of the critical path is greater. Write the updated weight value to the weight configuration table. Consider the updated weights of all abnormal nodes comprehensively, and use the weighted average method to recalculate the feature dependency strength index of the entire target process. The higher the score, the higher the sensitivity of the target process to abnormal data dependency. Use the distributed log collector Fluentd to deploy agents on each data processing node to collect data arrival timestamps. The timestamp is accurate to milliseconds, such as 1632547890123. The calculated time interval is stored in the InfluxDB time series database. The dependency graph construction tool uses the task dependency analysis function of Apache Airflow to generate a DAG graph and identify the data flow direction and critical path. The dependencies are stored in the Neo4j graph database. The sliding window method uses Python's pandas library, sets the window size to 1000, the step size to 1, and calculates the moving average and standard deviation. Assuming that the mean time interval of a node is 500 milliseconds and the standard deviation is 100 milliseconds, the normal threshold range is 200-800 milliseconds. The threshold information is written to the Redis configuration center. The latest 100 time interval data are read from InfluxDB every second and compared with the threshold in Redis. If the arrival time interval of a node data is found to be 900 milliseconds, which exceeds the upper threshold limit of 100 milliseconds, the abnormality of the node is recorded as 12.5%. The topological sorting algorithm uses the Kahn algorithm to read the dependency relationship from Neo4j and determine the critical path.The new weight is calculated by linear interpolation. Assuming that the original weight is 0.5, the node is located at the beginning of the critical path, and the node abnormality is 12.5%, the updated node influence weight is 0.5+(1-0.5)*0.125*(1-0.5)=0.53125. The updated node influence weight is written into the weight configuration index in Elasticsearch. Finally, MapReduce is used to calculate the weighted average of all node weights in Elasticsearch to obtain the feature dependency strength index score of the target process, such as 0.75, which indicates that the process is highly sensitive to abnormal data dependence.

[0047] The above scheme obtains the data dependency feature data of the target process, identifies and marks the exception processing nodes on the data dependency critical path, evaluates the node abnormality degree and node impact weight, and thus determines the feature dependency strength index of the data dependency feature on the target process. It can accurately locate and process data, optimize process scheduling parameters, reduce data processing delays, and improve the overall system performance and stability.

[0048] On the basis of the above scheme, optionally, the obtaining of the running context feature data of the target process and determining the feature dependency strength index of the running context feature data on the target process include: obtaining the running context feature data of the target process; determining the joint probability distribution of the key resource occupancy time distribution and the key function call frequency distribution of the target process, and determining the Mahalanobis distance between the joint probability distribution corresponding to the target process and a benchmark model; when the Mahalanobis distance is greater than a preset distance threshold, determining the feature dependency strength index of the running context feature data on the target process.

[0049] The running context feature data may be understood as feature data related to the running environment of the target process during its running. Exemplarily, the running context feature data may include but is not limited to the key resource occupation time distribution and the key function call frequency distribution. The key resource occupation time distribution may be understood as the time distribution of the target process occupying key resources (such as CPU, memory and disk I / O, etc.) during its running. Exemplarily, the key resource occupation time distribution may be determined by the length of time the target process occupies the CPU in different time periods. The key function call frequency distribution may be understood as the frequency distribution of the target process calling key functions (such as system calls or library functions, etc.) during its running. For example, the key function call frequency distribution may be determined by recording the number of times a process calls a certain key function in different time periods. The joint probability distribution may be understood as the probability distribution of the co-occurrence of the two features, the key resource occupation time and the key function call frequency, in the target process. The benchmark model may be understood as a model established based on a known normal or expected reference process. The benchmark model is the joint probability distribution of the key resource occupation time and the key function call frequency corresponding to the reference process. The Mahalanobis distance can be understood as an indicator for measuring the difference between the joint probability distribution of the target process and the baseline model. The preset distance threshold can be understood as being used to determine whether the Mahalanobis distance exceeds the normal distance range. Exemplarily, when the Mahalanobis distance is greater than the preset distance threshold, it is determined that the running context characteristics of the target process are significantly different from the baseline model, and there may be anomalies. The feature dependency strength index can be used to measure the degree of influence of the running context feature data on the target process. Specifically, when the Mahalanobis distance is greater than the preset distance threshold, the running context characteristics have a greater impact on the target process, and the feature dependency strength index will also be higher.

[0050] An optional implementation method obtains the running context feature data of the target process, records the occupied time of key resources (such as CPU, memory and disk IO, etc.), and inserts counters at the entrance and exit of key functions through binary interpolation technology to obtain the distribution of key resource occupied time, capture the distribution of key function call frequency, and store these data in a time series database. According to the historical data stored in the time series database, the joint probability distribution of key resource occupied time and key function call frequency is calculated using a multidimensional kernel density estimation algorithm, and the joint probability distribution is used as a benchmark model of the normal running context and saved in a feature vector database. The latest running context feature data is read from the feature vector database, and its Mahalanobis distance with the benchmark model is calculated. If the Mahalanobis distance exceeds the preset distance threshold, the running context at this time point is marked as abnormal. For the running context marked as abnormal, a new impact weight is calculated based on its Mahalanobis distance value and a preset sigmoid weight adjustment function. The sigmoid function ensures that the weight changes smoothly and has upper and lower limits, and the updated weight value is written into the weight configuration table. Taking into account the updated weights of all abnormal features, the feature dependency strength index of the entire process is recalculated using the weighted average method. The higher the score, the more sensitive the process is to abnormal runtime context. The Mahalanobis distance is calculated using the linear algebra function of the numpy library, with a preset threshold of 3.0. The Sigmoid weight adjustment function is f(x) = 1 / (1+e^(-0.1*(x-3))), where x is the Mahalanobis distance value. The weight configuration table is stored in MySQL, and a table structure containing feature names, original weights, and adjusted weights is created. The weighted average calculation uses the dot() function of numpy to multiply the feature vector by the weight vector to get the final score. The process is scheduled by Airflow, which triggers the DAG once a minute to achieve automated operation. The anomaly detection results are sent as alerts through the Prometheus push gateway and integrated into the detection system. Finally, the feature dependency strength index score is provided to the upper-layer application through the RESTful API. The API is implemented using the Flask framework and returns JSON format data, including timestamps, score values, and major abnormal features.

[0051] The above scheme obtains the running context feature data of the target process, calculates the joint probability distribution of its key resource occupancy time distribution and key function call frequency distribution, and compares it with the benchmark model to determine the Mahalanobis distance. When the Mahalanobis distance is greater than the preset distance threshold, the impact of the running context features on the target process is evaluated, thereby accurately adjusting the process scheduling parameters, reducing scheduling overhead, improving resource utilization and response speed, and ensuring system stability and performance optimization.

[0052] S120. Determine a comprehensive dependency strength index corresponding to the target process according to the feature dependency strength index corresponding to the target interaction feature data, the data dependency feature data, and the execution context feature data.

[0053] The comprehensive dependency strength index can be understood as an index used to measure the overall impact of target interaction feature data, data dependency feature data, and running context feature data on the target process. The comprehensive dependency strength index is calculated by integrating various feature dependency strength indicators, and can more comprehensively reflect the dependency relationship and performance status of the target process.

[0054] S130. Obtain a scheduling overhead ratio of the target process, and adjust a process scheduling parameter of the target process according to the scheduling overhead ratio and the comprehensive dependency strength index.

[0055] Among them, the scheduling overhead ratio can be understood as the ratio of the time and resources consumed by the operating system when scheduling the target process to the total execution time. The scheduling overhead ratio can be determined based on the average context switching time, the number of context switches, and the waiting time of input / output. It can be understood that the higher the scheduling overhead ratio, the greater the impact of scheduling on process performance. The process scheduling parameters can be understood as the parameters used by the operating system to control and manage process scheduling. The process scheduling parameters may include but are not limited to process priority, time slice length, process scheduling frequency, time slice length, etc.

[0056] On the basis of the above scheme, optionally, obtaining the scheduling overhead ratio of the target process includes: determining the number of context switches and the running time with the target process according to the input / output operations of the target process, and determining the average context switching time of the target process according to the number of context switches and the running time; multiplying the number of context switches by the average context switching time plus the waiting time of the input / output operation, and dividing the result by the total running time of the target process to obtain the scheduling overhead ratio of the target process.

[0057] Among them, input / output (I / O) operations can be understood as input and output operations performed by the target process during operation, such as reading files, writing files or network communications, etc., which usually involve interactions with external devices and may cause the process to be blocked or wait. The context switch can be understood as the process in which the operating system switches the CPU from one process to another, and each switch consumes certain operating system resources. The number of context switches can be understood as the number of context switches between the target process and other processes during operation. The average context switch time can be understood as the average time consumed by each context switch, which can be determined by dividing the total context switch time by the number of context switches.

[0058] An optional implementation method uses the sar command in the sysstat toolkit to obtain the average CPU load, average memory usage, I / O scheduling times, and resource utilization information of the target process, and uses the strace tool to track the I / O operation of the target process, record the number of context switches and running time, and store these data in a performance indicator database. According to the historical data stored in the performance indicator database within the past 24 hours, the average value of each indicator is calculated using a simple moving average algorithm, and the calculation result is stored in a benchmark configuration table as a benchmark value. The latest system status data is read from the performance indicator database, and the scheduling overhead ratio of the current process is calculated. The specific calculation method is scheduling overhead ratio = (number of context switches * average switching time + I / O waiting time) / total running time.

[0059] The above scheme can more accurately evaluate the scheduling overhead ratio of the target process, thereby providing a basis for optimizing process scheduling parameters and improving operating system performance.

[0060] On the basis of the above scheme, optionally, the process scheduling method further includes: when the scheduling overhead ratio of the target process is higher than a preset overhead threshold, reducing the scheduling frequency of the target process and adjusting the time slice length of the target process through a backoff algorithm.

[0061] The preset overhead threshold can be understood as a threshold set for judging whether the scheduling overhead ratio exceeds a normal range. Exemplarily, when the scheduling overhead ratio is greater than the preset overhead threshold, it means that the scheduling overhead of the process is too high and may need to be optimized. The optimization method includes but is not limited to reducing the scheduling frequency of the target process and adjusting the time slice length of the target process through a backoff algorithm. The scheduling frequency can be understood as the frequency at which the target process is scheduled for execution. It is understandable that a high scheduling frequency means that the target process is frequently scheduled, which increases the context switching overhead. The backoff algorithm can be understood as an algorithm for adjusting the time slice length of the process. Specifically, the backoff algorithm can reduce conflicts and improve resource utilization by dynamically adjusting the time slice length. In process scheduling, the backoff algorithm can dynamically adjust the time slice length according to the current state and historical performance of the process, thereby optimizing the scheduling performance. The time slice length can be understood as the CPU execution time allocated to each target process by the operating system. Exemplarily, the shorter the time slice length, the higher the frequency of target process switching, but the execution time of each target process is shorter.

[0062] An optional implementation method is to compare the calculated scheduling overhead ratio with a preset threshold (such as 20%), and check whether the I / O scheduling frequency exceeds the preset threshold (such as 1000 times per second). If one of the two conditions is met, the scheduling overhead of the current process is determined to be too high, and the determination result is written into the scheduling exception log. For processes determined to have too high scheduling overhead, detailed performance indicators are recorded, including CPU usage, memory usage, I / O operation type and frequency, and stored in the performance analysis database. For identified high-overhead processes, the token bucket algorithm is used to limit their scheduling frequency, and the backoff algorithm is used to dynamically adjust their time slice length to achieve precise control of high-overhead processes.

[0063] The above technical solution reduces the scheduling overhead ratio by reducing the scheduling frequency and adjusting the time slice length, thereby improving the execution efficiency of the target process and the overall performance of the operating system.

[0064] The technical solution of the embodiment of the present invention is as follows: first, by acquiring the target interaction feature data, data dependency feature data and running context feature data of the target process, the feature dependency strength index of the target interaction feature data, the data dependency feature data and the running context feature data on the target process is determined respectively, so that the multiple feature data of the target process can be comprehensively analyzed to accurately evaluate its dependency strength; then, the comprehensive dependency strength index corresponding to the target process is determined according to the feature dependency strength index corresponding to the target interaction feature data, the data dependency feature data and the running context feature data, and the comprehensive dependency strength index can be calculated to comprehensively reflect the multi-faceted dependency relationship of the target process and provide a data basis for optimizing scheduling parameters; finally, the scheduling overhead ratio of the target process is obtained, and the process scheduling parameters of the target process are adjusted according to the scheduling overhead ratio and the comprehensive dependency strength index. The scheduling overhead can be reduced by dynamically adjusting the process scheduling parameters, which solves the problems of high scheduling overhead, low resource utilization and limited optimization effect of the scheduling method in the related art, and can improve resource utilization and response speed, thereby significantly improving the overall performance and stability of the system.

[0065] Embodiment 2

[0066] Figure 2A flowchart of a process scheduling method provided for the second embodiment of the present invention, this embodiment is based on the above embodiment, and further refines how to adjust the process scheduling parameters of the target process according to the scheduling overhead ratio and the comprehensive dependency strength index. Optionally, it is characterized in that the process scheduling parameters of the target process are adjusted according to the scheduling overhead ratio and the comprehensive dependency strength index, including: adjusting the process priority and time slice allocation ratio of the target process according to the scheduling overhead ratio and the comprehensive dependency strength index, and updating the process scheduling parameters of the target process according to the adjusted process priority and time slice allocation ratio, wherein the process scheduling parameters include at least one of process priority, time slice length, process scheduling frequency and time slice length. The specific implementation method can be found in the description of this embodiment. Among them, the technical features that are the same or similar to those of the above embodiments are not repeated here.

[0067] like Figure 2 As shown, the method may specifically include:

[0068] S210, obtaining target interaction feature data, data dependency feature data, and operation context feature data of a target process, and respectively determining feature dependency strength indicators of the target interaction feature data, the data dependency feature data, and the operation context feature data on the target process.

[0069] S220. Determine a comprehensive dependency strength index corresponding to the target process according to the feature dependency strength index corresponding to the target interaction feature data, the data dependency feature data, and the execution context feature data.

[0070] S230. Obtain the scheduling overhead ratio of the target process, adjust the process priority and time slice allocation ratio of the target process according to the scheduling overhead ratio and the comprehensive dependency strength index, and update the process scheduling parameters of the target process according to the adjusted process priority and time slice allocation ratio.

[0071] Among them, the process priority can be understood as the priority assigned to the process by the operating system during scheduling, which is used to characterize the scheduling order of the target process. It is understandable that processes with high priorities will be scheduled and executed first. Specifically, by adjusting the process priority, the scheduling order and scheduling frequency of the target process can be affected. The time slice allocation ratio can be understood as the ratio of CPU execution time allocated by the operating system to each target process. It is understandable that the time slice allocation ratio determines the CPU time that the target process can obtain within a scheduling cycle. Specifically, by adjusting the time slice allocation ratio, the execution efficiency and response time of the target process can be affected. Among them, the process scheduling parameters can be understood as the parameters used by the operating system to control and manage process scheduling. The process scheduling parameters may include but are not limited to process priority, time slice length, process scheduling frequency and time slice length.

[0072] On the basis of the above scheme, optionally, adjusting the process priority and time slice allocation ratio of the target process according to the scheduling overhead ratio and the comprehensive dependency strength index includes: determining the changing trend of the comprehensive dependency strength index by the time window method according to the scheduling overhead ratio and the comprehensive dependency strength value; when the comprehensive dependency strength index exceeds the preset strength index threshold and shows the growth trend, determining the arrangement position of the target process in the scheduling queue according to the growth rate of the comprehensive dependency strength index; according to the arrangement position of the target process, determining the time slice length of the target process by an exponential backoff algorithm, and updating the time slice allocation table corresponding to the target process according to the time slice length; and updating the scheduling queue using a red-black tree data structure to obtain the adjusted process priority and time slice length corresponding to the target process.

[0073] Among them, the time window method can be understood as a data analysis method, which can be used to determine the change trend of the comprehensive dependency strength index. The change trend can be understood as the change of the comprehensive dependency strength index over time. The change trend may include but is not limited to the growth trend. The preset strength index threshold can be understood as a preset threshold used to determine whether the comprehensive dependency strength index exceeds the normal range. Exemplarily, when the comprehensive dependency strength index exceeds the preset strength index threshold, it is determined that the degree of dependence of the target process is high and may need to be optimized. The growth rate can be understood as the growth amount of the comprehensive dependency strength index within a certain time window. Exemplarily, the larger the growth rate, the faster the degree of dependence of the target process increases. The arrangement position can be understood as the position of the target process in the scheduling queue. Specifically, according to the growth rate of the comprehensive dependency strength index, the arrangement position of the target process in the scheduling queue can be determined. The exponential backoff algorithm can be understood as an algorithm for adjusting the time slice length. The time slice length can be understood as the CPU execution time allocated to each target process by the operating system. The time slice allocation table can be understood as a data structure for recording the time slice length of each process. The time slice allocation of the target process can be dynamically adjusted by updating the time slice allocation table. The red-black tree data structure can be understood as a self-balancing binary search tree for realizing efficient insertion, deletion and search operations, and can be used to update the scheduling queue to ensure efficient management and maintenance of the scheduling queue.

[0074] An optional implementation method obtains the scheduling overhead ratio and comprehensive dependency strength value of the current process from the performance detection database, reads the preset strength index threshold in the target process configuration file, uses the time window method to calculate the change trend of the comprehensive dependency strength, and judges whether it exceeds the preset strength index threshold at the same time and is growing. If the judgment result is true, the multi-level feedback queue algorithm based on the priority queue is activated, and the arrangement position of the process in the queue is dynamically adjusted according to the growth rate of the comprehensive dependency strength, and the adjustment result is written into the process control block. According to the new arrangement position, the time slice length of the process is recalculated using the exponential backoff algorithm, and the time slice allocation table of the scheduler is updated considering the historical behavior of the process and the current system load. The queue is reorganized using the red-black tree data structure to ensure that the time complexity of the scheduling operation is O (logn), and the updated process priority and time slice length are applied to the next scheduling cycle, and the adjustment result is recorded in the target process log. A feedback control loop is implemented to regularly evaluate the effect of the scheduling strategy, automatically fine-tune the relevant parameters according to the performance indicators, and optimize the overall scheduling performance. Specifically, the InfluxDB performance detection database records that the scheduling overhead ratio of process ID 1234 is 0.25 and the comprehensive dependency strength is 0.8. The preset thresholds in the system configuration file are 0.2 and 0.7 respectively. The time window method uses the data of the past 10 minutes to calculate the growth rate of the comprehensive dependency strength as 5% / minute. The multi-level feedback queue algorithm downgrades the process from the second-level queue to the third-level queue, and the priority value is reduced from 50 to 40. The exponential backoff algorithm reduces the time slice from 100ms to 75ms based on the new priority and the historical CPU usage of 80%. The red-black tree uses the process priority as the key and the process control block pointer as the value to reorganize the ready queue containing 1000 processes, and the insertion operation takes 0.5ms. The system log records the adjustment time as 2023-06-01, 14:30:00, the process ID, the new priority and the time slice information. The feedback control loop is executed every 5 minutes to monitor indicators such as CPU utilization and average response time. If the CPU utilization exceeds 90%, the number of levels of the multi-level feedback queue is increased from 3 to 4, and the time slice base is reduced from 50ms to 40ms. These parameters are stored in Redis with the key "scheduler_params". The entire scheduling process is implemented by the Completely Fair Scheduler (CFS) scheduler of the Linux kernel, and the scheduling policy is dynamically adjusted by modifying the / proc / sys / kernel / sched_* related files. The adjustment results are recorded by the ftrace tool for kernel scheduling events for subsequent analysis and optimization.

[0075] The above scheme, by adopting the time window method and exponential backoff algorithm, dynamically adjusts the priority and time slice length of the target process, which can effectively cope with the growth trend of the comprehensive dependency intensity index, reduce scheduling overhead, and improve the execution efficiency and response speed of the target process, thereby optimizing the overall performance of the operating system, and uses the red-black tree data structure to update the scheduling queue, ensuring the efficiency and stability of the scheduling.

[0076] On the basis of the above scheme, optionally, the updating of the process scheduling parameters of the target process according to the adjusted process priority and the time slice allocation ratio includes: obtaining the resource usage information of the target process, and obtaining the process scheduling frequency and time slice length of the target process by a multi-objective optimization algorithm according to the adjusted process priority, the time slice allocation ratio and the resource usage information; generating a process scheduling sequence that satisfies the inter-process dependency relationship by using an ant colony algorithm for the process scheduling frequency and the time slice length, and updating the process scheduling parameters of the target process according to the scheduling sequence.

[0077] Among them, the resource usage information can be understood as information about the actual consumption of computing resources (such as CPU usage or memory occupancy, etc.) in the target process, which can be used to evaluate the resource requirements of the target process and optimize the process scheduling strategy, etc. Exemplarily, the resource usage information may include but is not limited to processor usage and memory occupancy, etc. The multi-objective optimization algorithm can be understood as an algorithm used when there are multiple conflicting target processes in the problem faced, aiming to find a solution that can enable all target processes to achieve the optimal solution as much as possible. The ant colony algorithm can be understood as a heuristic search algorithm that simulates the behavior of ant colonies in finding food paths. In this embodiment, the ant colony algorithm is used to generate a process scheduling sequence that satisfies the dependencies between processes, that is, how to reasonably arrange the execution order of each process so that the operating efficiency of the entire system is optimized.

[0078] An optional implementation method reads the adjusted target process priority and time slice allocation ratio, uses the cgroup mechanism of the Linux kernel to obtain the process resource usage, including CPU usage, memory usage and other information, and inputs these data into the scheduling parameter calculation module. NSGA-II (non-dominated sorting genetic algorithm II) is used for multi-objective optimization, and the objective function includes minimizing response time and maximizing resource utilization. The process scheduling frequency and time slice length of the new target process are calculated, and the calculation results are stored in the scheduling parameter cache. According to the data in the scheduling parameter cache, the ant colony algorithm is used to generate a nearly optimal process scheduling sequence, while considering the dependencies between processes to ensure that the process dependency strength constraints are met. The generated scheduling sequence is applied to the scheduler, and the process scheduling parameters of the process are updated, including priority, time slice length and scheduling interval. At the same time, the perf subsystem of the Linux kernel is used to monitor the performance counters of high-overhead processes in real time, such as cache miss rate, context switch times, etc. For the identified high-overhead processes, the token bucket algorithm is used to limit their scheduling frequency, and the backoff algorithm is used to dynamically adjust their time slice length to achieve precise control of high-overhead processes. Specifically, the cgroup mechanism obtains the CPU usage of process ID 1234 through the / sys / fs / cgroup / cpu interface, which is 80% and the memory usage is 2GB. The process control block shows that its priority is 10 and the time slice is 10ms. The NSGA-II algorithm uses 100 individuals, evolves for 50 generations, has a crossover probability of 0.9, and a mutation probability of 0.1 to obtain the Pareto optimal solution set. Select the solution that reduces the response time by 20% and improves the resource utilization by 15%, reduces the scheduling frequency from 100 to 80 times per second, and increases the time slice length from 10ms to 12ms. The ant colony algorithm uses 20 ants, iterates 100 times, and the pheromone evaporation coefficient is 0.5 to obtain an approximate optimal scheduling sequence. The perf subsystem detection shows that the cache miss rate of the process is 5%, and the number of context switches is 1000 times per second. The token bucket algorithm sets the bucket capacity to 10, the token generation rate to 5 per second, and limits the maximum scheduling frequency of high-overhead processes to 50 times per second. The initial time slice of the backoff algorithm is 12ms, and it increases by 25% for each unfinished task, with a maximum of 20ms. Finally, the process scheduling parameters of the process are updated to priority 12, time slice 15ms, and scheduling interval 20ms. It is executed by the Completely Fair Scheduler (CFS) of the Linux kernel, and the scheduling policy is dynamically adjusted by modifying the / proc / sys / kernel / sched_* related files. The adjustment results are recorded by the ftrace tool for kernel scheduling events for subsequent analysis and optimization.

[0079] The above scheme can generate an efficient process scheduling sequence by dynamically adjusting the process priority and time slice allocation ratio, and combining the multi-objective optimization algorithm and the ant colony algorithm, thereby effectively improving the system resource utilization and process response speed.

[0080] The technical solution of the embodiment of the present invention adopts the time window method to determine the changing trend of the comprehensive dependency strength index. When the index exceeds the preset strength index threshold and shows an increasing trend, the arrangement position of the process in the scheduling queue is adjusted according to the growth rate, and the exponential backoff algorithm is used to determine the time slice length, and the scheduling queue is updated through the red-black tree data structure. Furthermore, combined with the resource usage information of the target process, a multi-objective optimization algorithm and an ant colony algorithm are used to generate a scheduling sequence that satisfies the dependency relationship between processes, and the process scheduling parameters are updated. This can effectively reduce the scheduling overhead, improve resource utilization and response speed, and significantly improve the overall performance and stability of the system.

[0081] Embodiment 3

[0082] Figure 3 This is a schematic diagram of the structure of a process scheduling device provided by Embodiment 3 of the present invention. Figure 3 As shown, the device includes: a feature dependency strength index determination module 310, a comprehensive dependency strength index determination module 320, and a process scheduling parameter adjustment module 330.

[0083] Among them, the feature dependency strength index determination module 310 is used to obtain the target interaction feature data, data dependency feature data and operation context feature data of the target process, and respectively determine the feature dependency strength index of the target interaction feature data, the data dependency feature data and the operation context feature data on the target process; the comprehensive dependency strength index determination module 320 is used to determine the comprehensive dependency strength index corresponding to the target process according to the feature dependency strength index corresponding to the target interaction feature data, the data dependency feature data and the operation context feature data; the process scheduling parameter adjustment module 330 is used to obtain the scheduling overhead ratio of the target process, and adjust the process scheduling parameters of the target process according to the scheduling overhead ratio and the comprehensive dependency strength index.

[0084] The technical solution of the embodiment of the present invention is as follows: first, the target interaction feature data, data dependency feature data and running context feature data of the target process are obtained through the feature dependency strength index determination module 310, and the feature dependency strength index of the target interaction feature data, the data dependency feature data and the running context feature data on the target process is determined respectively, so that the various feature data of the target process can be comprehensively analyzed to accurately evaluate its dependency strength; then, the comprehensive dependency strength index determination module 320 determines the comprehensive dependency strength index corresponding to the target process according to the feature dependency strength index corresponding to the target interaction feature data, the data dependency feature data and the running context feature data, and the comprehensive dependency strength index can be calculated to comprehensively reflect the multi-faceted dependency relationship of the target process and provide a data basis for optimizing scheduling parameters; finally, the scheduling overhead ratio of the target process is obtained through the process scheduling parameter adjustment module 330, and the process scheduling parameters of the target process are adjusted according to the scheduling overhead ratio and the comprehensive dependency strength index. The scheduling overhead can be reduced by dynamically adjusting the process scheduling parameters, which solves the problems of high scheduling overhead, low resource utilization and limited optimization effect of the scheduling method in the related art, and can improve resource utilization and response speed, thereby significantly improving the overall performance and stability of the system.

[0085] On the basis of the above scheme, optionally, the feature dependency strength index determination module includes: a first feature dependency strength index determination submodule. The first feature dependency strength index determination submodule is used to obtain target interaction feature data of the target process, wherein the target interaction feature data includes at least one of the mouse click interval, keyboard key interval and touch screen click strength; in the case where the target interaction feature data has abnormal operation feature data, determine the abnormality degree index corresponding to the abnormal operation feature data, and determine the feature dependency strength index of the target interaction feature data on the target process according to the abnormality degree index of the abnormal operation feature data.

[0086] On the basis of the above scheme, optionally, the feature dependency strength index determination module includes: a second feature dependency strength index determination submodule. The second feature dependency strength index determination submodule is used to obtain data dependency feature data of multiple data processing nodes in the target process, wherein the data dependency feature data includes data arrival time interval and data dependency critical path; when the data processing node is located on the data dependency critical path and the data arrival time interval of the data processing node is greater than or equal to a preset time interval threshold, the data processing node is marked as an abnormal processing node; the node abnormality degree corresponding to the abnormal processing node is determined, and the node influence weight corresponding to the abnormal processing node is determined according to the position of the abnormal processing node in the data dependency critical path and the node abnormality degree; the feature dependency strength index of the target process on the data dependency feature data is determined according to the node influence weight corresponding to the abnormal processing node in the target process.

[0087] On the basis of the above scheme, optionally, the feature dependency strength index determination module includes: a third feature dependency strength index determination submodule. The third feature dependency strength index determination submodule is used to obtain the running context feature data of the target process, wherein the running context feature data includes the key resource occupation time distribution and the key function call frequency distribution; determine the joint probability distribution of the key resource occupation time distribution and the key function call frequency distribution of the target process, and determine the Mahalanobis distance between the joint probability distribution corresponding to the target process and the benchmark model; wherein the benchmark model is the joint probability distribution of the key resource occupation time and the key function call frequency corresponding to the reference process; when the Mahalanobis distance is greater than the preset distance threshold, determine the feature dependency strength index of the running context feature data on the target process.

[0088] On the basis of the above scheme, the process scheduling parameter adjustment module optionally includes: a context average switching time determination submodule and a scheduling overhead ratio determination submodule. The context average switching time determination submodule is used to determine the number of context switches and the running time with the target process according to the input / output operation of the target process, and determine the context average switching time of the target process according to the context switching number and the running time; the scheduling overhead ratio determination submodule is used to multiply the number of context switches by the context average switching time plus the waiting time of the input / output operation, and then divide it by the total running time of the target process to obtain the scheduling overhead ratio of the target process.

[0089] Based on the above solution, optionally, the process scheduling parameter adjustment module includes: a process scheduling parameter update submodule. The process scheduling parameter update submodule is used to adjust the process priority and time slice allocation ratio of the target process according to the scheduling overhead ratio and the comprehensive dependency strength index, and update the process scheduling parameters of the target process according to the adjusted process priority and time slice allocation ratio, wherein the process scheduling parameters include at least one of process priority, time slice length, process scheduling frequency and time slice length.

[0090] On the basis of the above scheme, optionally, the process scheduling parameter update submodule includes: a change trend determination unit, an arrangement position determination unit, a time slice allocation table update unit, and a scheduling queue update unit. The change trend determination unit is used to determine the change trend of the comprehensive dependency strength index by using the time window method according to the scheduling overhead ratio and the comprehensive dependency strength value, wherein the change trend includes a growth trend; the arrangement position determination unit is used to determine the arrangement position of the target process in the scheduling queue according to the growth amplitude of the comprehensive dependency strength index when the comprehensive dependency strength index exceeds the preset strength index threshold and shows the growth trend; the time slice allocation table update unit is used to determine the time slice length of the target process according to the arrangement position of the target process by using the exponential backoff algorithm, and update the time slice allocation table corresponding to the target process according to the time slice length; the scheduling queue update unit is used to update the scheduling queue using the red-black tree data structure to obtain the process priority and time slice length corresponding to the adjusted target process.

[0091] On the basis of the above scheme, optionally, the process scheduling parameter updating submodule includes: a time slice length determining unit and a process scheduling parameter updating unit. The time slice length determining unit is used to obtain the resource usage information of the target process, and adopt a multi-objective optimization algorithm according to the adjusted process priority, the time slice allocation ratio and the resource usage information to obtain the process scheduling frequency and time slice length of the target process; wherein the resource usage information includes processor usage and memory occupancy; the process scheduling parameter updating unit is used to generate a process scheduling sequence that satisfies the inter-process dependency relationship according to the process scheduling frequency and the time slice length by using an ant colony algorithm, and update the process scheduling parameters of the target process according to the scheduling sequence.

[0092] Based on the above solution, optionally, the process scheduling device further includes: a time slice length adjustment module. The time slice length adjustment module is used to reduce the scheduling frequency of the target process and adjust the time slice length of the target process through a backoff algorithm when the scheduling overhead ratio of the target process is higher than a preset overhead threshold.

[0093] The process scheduling device provided in the embodiment of the present invention can execute the process scheduling method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0094] Embodiment 4

[0095] Figure 4 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0096] like Figure 4 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0097] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0098] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a schedule scheduling method.

[0099] In some embodiments, a scheduling method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of a scheduling method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform a scheduling method in any other appropriate manner (e.g., by means of firmware).

[0100] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0101] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0102] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0103] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0104] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0105] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0106] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0107] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A process scheduling method, characterized in that: include: Obtain target interaction feature data, data dependency feature data, and running context feature data of a target process, and respectively determine feature dependency strength indicators of the target interaction feature data, the data dependency feature data, and the running context feature data on the target process; Determine a comprehensive dependency strength index corresponding to the target process according to the feature dependency strength index corresponding to the target interaction feature data, the data dependency feature data, and the running context feature data; The scheduling overhead ratio of the target process is obtained, and the process scheduling parameters of the target process are adjusted according to the scheduling overhead ratio and the comprehensive dependency strength index.

2. The method according to claim 1, characterized in that The acquiring target interaction feature data of the target process and determining a feature dependency strength index of the target interaction feature data on the target process includes: Acquire target interaction characteristic data of the target process, wherein the target interaction characteristic data includes at least one of a mouse click interval, a keyboard key interval, and a touch screen click force; In the case that abnormal operation characteristic data exists in the target interaction characteristic data, an abnormality degree index corresponding to the abnormal operation characteristic data is determined, and a characteristic dependence strength index of the target interaction characteristic data on the target process is determined according to the abnormality degree index of the abnormal operation characteristic data.

3. The method according to claim 1, characterized in that: The step of obtaining data dependency characteristic data of the target process and determining a characteristic dependency strength index of the data dependency characteristic data on the target process includes: Acquire data dependency characteristic data of a plurality of data processing nodes in the target process, wherein the data dependency characteristic data includes a data arrival time interval and a data dependency critical path; When the data processing node is located on the data-dependent critical path and the data arrival time interval of the data processing node is greater than or equal to a preset time interval threshold, marking the data processing node as an abnormal processing node; Determine the node abnormality degree corresponding to the abnormal processing node, and determine the node influence weight corresponding to the abnormal processing node according to the position of the abnormal processing node in the data-dependent critical path and the node abnormality degree; A characteristic dependency strength index of the data dependency characteristic data on the target process is determined according to a node influence weight corresponding to the exception handling node in the target process.

4. The method according to claim 1, characterized in that The acquiring the running context feature data of the target process and determining the feature dependency strength index of the running context feature data on the target process includes: Acquire the running context characteristic data of the target process, wherein the running context characteristic data includes the key resource occupation time distribution and the key function call frequency distribution; Determine the joint probability distribution of the key resource occupation time distribution and the key function call frequency distribution of the target process, and determine the Mahalanobis distance between the joint probability distribution corresponding to the target process and a benchmark model; wherein the benchmark model is the joint probability distribution of the key resource occupation time and the key function call frequency corresponding to a reference process; When the Mahalanobis distance is greater than a preset distance threshold, a feature dependency strength index of the running context feature data on the target process is determined.

5. The method according to claim 1, characterized in that The obtaining the scheduling overhead ratio of the target process includes: Determine the number of context switches and the running time with the target process according to the input / output operation of the target process, and determine the average context switch time of the target process according to the number of context switches and the running time; The number of context switches is multiplied by the average context switch time plus the waiting time of the input / output operation, and the result is divided by the total running time of the target process to obtain the scheduling overhead ratio of the target process.

6. The method according to claim 1, characterized in that The adjusting the process scheduling parameters of the target process according to the scheduling overhead ratio and the comprehensive dependency strength index includes: The process priority and the time slice allocation ratio of the target process are adjusted according to the scheduling overhead ratio and the comprehensive dependency strength index, and the process scheduling parameters of the target process are updated according to the adjusted process priority and the time slice allocation ratio, wherein the process scheduling parameters include at least one of process priority, time slice length, process scheduling frequency and time slice length.

7. The method according to claim 6, characterized in that The adjusting the process priority and the time slice allocation ratio of the target process according to the scheduling overhead ratio and the comprehensive dependency strength index includes: According to the scheduling overhead ratio and the comprehensive dependency strength value, a time window method is used to determine a change trend of the comprehensive dependency strength indicator, wherein the change trend includes a growth trend; When the comprehensive dependency strength index exceeds the preset strength index threshold and shows the growth trend, determining the arrangement position of the target process in the scheduling queue according to the growth amplitude of the comprehensive dependency strength index; According to the arrangement position of the target process, an exponential backoff algorithm is used to determine the time slice length of the target process, and a time slice allocation table corresponding to the target process is updated according to the time slice length; The scheduling queue is updated using a red-black tree data structure to obtain the adjusted process priority and time slice length corresponding to the target process.

8. The method according to claim 6, characterized in that The updating of the process scheduling parameters of the target process according to the adjusted process priority and the time slice allocation ratio includes: Obtain resource usage information of the target process, and adopt a multi-objective optimization algorithm according to the adjusted process priority, the time slice allocation ratio and the resource usage information to obtain the process scheduling frequency and time slice length of the target process; wherein the resource usage information includes processor usage and memory occupancy; According to the process scheduling frequency and the time slice length, an ant colony algorithm is used to generate a process scheduling sequence that satisfies the inter-process dependency relationship, and the process scheduling parameters of the target process are updated according to the scheduling sequence.

9. The method according to claim 1, characterized in that: Also includes: When the scheduling overhead ratio of the target process is higher than a preset overhead threshold, the scheduling frequency of the target process is reduced, and the time slice length of the target process is adjusted through a backoff algorithm.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the process scheduling method according to any one of claims 1 to 9 when executed.

Citation Information

Patent Citations

  • Process scheduling method and device, equipment and storage medium

    CN117420806A

  • Process scheduling method and device, electronic equipment and storage medium

    CN117519940A

  • Task scheduling method and device, electronic equipment and readable storage medium

    CN118567800A

  • Method, apparatus, device, storage medium and computer program product for labeling data

    US20210406220A1

Cited By

  • User portrait generation method, system and equipment based on industrial Internet of Things

    CN119831645A