A service process control method, system, storage medium and electronic device

By monitoring the utilization of device system resources, judging and processing cross-level growth of service processes, the problems of complex process scheduling and low execution efficiency are solved, and the stable operation of the core functions of the equipment is achieved and downtime is reduced.

CN113961325BActive Publication Date: 2025-09-26SICHUAN YINGDEX TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111247348.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-26
Publication Date
2025-09-26
Estimated Expiration
2041-10-26

AI Technical Summary

Technical Problem

Existing technologies cannot effectively avoid the complexity of process scheduling and slow execution efficiency, which leads to increased load on computer system operation.

Method used

By monitoring the utilization of device system resources, determine whether it is higher than the highest watermark. If so, determine whether there are service processes that grow across levels, and sort and stop non-basic function service processes in descending order of scores to release resources to ensure the normal operation of core functions.

Benefits of technology

Timely discover and handle abnormal service processes to reduce the possibility of equipment downtime and ensure the normal operation of core functions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113961325B_ABST
    Figure CN113961325B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of system regulation, and in particular to a service process regulation method, system, storage medium and electronic device. The method comprises: obtaining service scheduling data; judging whether the initial device system resource utilization in the service scheduling data is higher than the highest watermark; if the judgment result is higher than the highest watermark, judging whether the initial device system resource utilization is continuously higher than the highest watermark during the highest watermark observation period, and generating a first judgment result; if the first judgment result is yes, judging whether there is a service process in the current device system with cross-level resource consumption growth, and generating a second judgment result; judging whether there is a non-basic function service process with cross-level growth based on the second judgment result, and generating a third judgment result, and then deciding to regulate the non-basic function service process based on the third judgment result. Also disclosed are a service process regulation system, storage medium and electronic device. The present invention can achieve the effect of timely finding abnormally operating service processes and reducing equipment downtime.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of system control, and in particular to a service process control method, system, storage medium and electronic equipment. Background Art

[0002] Currently, to ensure the orderly scheduling of service processes running on physical devices, common approaches include virtualization technology, which measures the performance of service processes by using the packing ratio, or containerization technology, which runs service processes in containers and leverages the lightweight nature of containers to achieve scalability of device resources. Existing process scheduling algorithms often schedule processes based on predefined, inherent process scheduling methods. However, the execution conditions required by different processes may change at any time during execution. Existing technologies cannot avoid the complexity of process scheduling and the slow execution efficiency, which in turn increases the operating load on computer systems. Summary of the Invention

[0003] The technical problem to be solved by the present invention is to provide a service process control method, system, storage medium and electronic equipment.

[0004] The present invention solves the above-mentioned technical problem with the following technical solution: A service process control method, comprising:

[0005] Step 1: Obtain service scheduling data;

[0006] Step 2: determining whether the initial device system resource utilization in the service scheduling data is higher than a maximum watermark; if the determination result is that the initial device system resource utilization is higher than the maximum watermark, determining whether the initial device system resource utilization is continuously higher than the maximum watermark during a maximum watermark observation period, and generating a first determination result;

[0007] Step 3: If the first judgment result is yes, determine whether there is a service process in the current device system whose resource consumption increases across levels, and generate a second judgment result;

[0008] Step 4: If the second judgment result is yes, determine whether there are non-basic function service processes that grow across levels, and generate a third judgment result. If the third judgment result is yes, sort the one or more non-basic function service processes in descending order of service process scores, and stop the non-basic function service process with the highest score among the service processes; if the second judgment result is no, generate an alarm message;

[0009] Step 5, determine whether the system resource utilization of the first device after stopping the non-basic function service process with the highest score in the service process meets the first preset condition; if it does, complete the regulation; if it does not, return to step 4 and stop the non-basic service process with the highest score in the next service process.

[0010] The beneficial effect of the present invention is that: through the above method, when it is monitored that the initial device system resource utilization is insufficient to support the continued operation of all service processes, the abnormally operating service processes can be found in time, and at the same time, the normal operation of the core functions of the device is guaranteed by service scheduling, which also reduces the possibility of device downtime.

[0011] On the basis of the above technical solution, the present invention can also be improved as follows.

[0012] Furthermore, step 2 also includes:

[0013] If the judgment result is lower than the highest water level line, then determine whether the initial device system resource utilization continues to be lower than the highest water level line during the highest water level line observation period, and generate a sixth judgment result. If the sixth judgment result is yes, then determine whether there is a stopped service process. If not, complete the self-check. If so, perform recovery processing.

[0014] Furthermore, the recovery process is: give priority to restoring the basic function service process, and among the basic function service processes, give priority to restoring the service process with the lowest service process score, and after restoring a service process, judge whether the initial device system resource utilization after restoration is lower than the lowest water level line. If the judgment result is lower than the lowest water level line, judge whether the initial device system resource utilization after restoration is continuously lower than the lowest water level line during the lowest water level line observation period, and generate a seventh judgment result. If the seventh judgment result is yes, continue the recovery process; if the seventh judgment result is no, stop the recovery process.

[0015] Furthermore, if the second judgment result is no, an alarm message is generated.

[0016] Further, if the third judgment result is no or the resource utilization rate of the first device system still does not meet the second preset condition after all the non-basic function service processes that grow across levels are closed, it is determined whether there are basic function service processes that grow across levels. If so, one or more basic function service processes are sorted in descending order of service process scores, and the basic function service process with the highest score among the service processes is stopped. It is determined whether the resource utilization rate of the second device system is lower than the lowest water level line after the basic function service process with the highest score among the service processes is stopped. If the judgment result is lower than the lowest water level line, it is determined whether the resource utilization rate of the second device system continues to be lower than the lowest water level line during the lowest water level observation period to obtain the fifth judgment result. If the fifth judgment result is yes, the regulation is completed.

[0017] Furthermore, if the system resource utilization of the first device does not meet the second preset condition and there is no non-basic function service process that grows across levels and no basic function service process that grows across levels, an alarm message is generated.

[0018] Furthermore, step 5 is specifically as follows:

[0019] Determine whether the resource utilization rate of the first device system is lower than the lowest water level line. If the judgment result is lower than the lowest water level line, then determine whether the resource utilization rate of the first device system continues to be lower than the lowest water level line during the lowest water level line observation period, and obtain a fourth judgment result. If the fourth judgment result is yes, the regulation is completed.

[0020] Another technical solution of the present invention to solve the above technical problem is as follows: a service process control system, comprising:

[0021] Acquisition module, used to obtain service scheduling data;

[0022] a first determination module, configured to determine whether the initial device system resource utilization in the service scheduling data is higher than a maximum watermark; if the determination result is that the initial device system resource utilization is higher than the maximum watermark, then determining whether the initial device system resource utilization is continuously higher than the maximum watermark during a maximum watermark observation period, and generating a first determination result;

[0023] a second judgment module configured to, if the first judgment result is yes, determine whether there is a service process in the current device system with resource consumption increasing across levels, and generate a second judgment result;

[0024] a third judgment module, configured to, if the second judgment result is yes, determine whether there are any non-basic function service processes that grow across levels, and generate a third judgment result; if the third judgment result is yes, sort the one or more non-basic function service processes in descending order of service process scores, and stop the non-basic function service process with the highest score among the service processes; and if the second judgment result is no, generate an alarm message;

[0025] The control module is used to determine whether the system resource utilization of the first device after stopping the non-basic function service process with the highest score in the service process meets the first preset condition; if so, the control is completed; if not, it returns to step 4 and stops the non-basic service process with the highest score in the next service process.

[0026] The beneficial effect of the present invention is that: through the above method, when it is monitored that the remaining system resources of the device are insufficient to support the continued operation of all service processes, the abnormally running service processes can be found in time, and at the same time, the normal operation of the core functions of the device is guaranteed by service scheduling, which also reduces the possibility of device downtime.

[0027] Furthermore, the first judgment module is further configured to:

[0028] If the judgment result is lower than the highest water level line, then determine whether the initial device system resource utilization continues to be lower than the highest water level line during the highest water level line observation period, and generate a sixth judgment result; if the sixth judgment result is yes, then determine whether there is a stopped service process, if not, complete self-check, if so, perform recovery processing; if the sixth judgment result is no, there is no need to execute regulation and wait for the next execution cycle.

[0029] Furthermore, the recovery processing is: give priority to restoring the basic function service process, and among the basic function service processes, give priority to restoring the service process with the lowest service process score, and after restoring a service process, judge whether the initial device system resource utilization after restoration is lower than the lowest water level line; if the judgment result is lower than the lowest water level line, judge whether the initial device system resource utilization after restoration is continuously lower than the lowest water level line during the lowest water level line observation period, and generate a seventh judgment result. If the seventh judgment result is yes, continue the recovery processing; if the seventh judgment result is no, stop the recovery processing; if the judgment result is not lower than the lowest water level line, no recovery processing is required.

[0030] Furthermore, the specific steps of “determining whether the system resource utilization of the first device after stopping the non-basic function service process with the highest score among the service processes meets the first preset condition, and completing the regulation if so” are:

[0031] Determine whether the resource utilization rate of the first device system is lower than the lowest water level line. If the judgment result is lower than the lowest water level line, then determine whether the resource utilization rate of the first device system continues to be lower than the lowest water level line during the lowest water level line observation period, and obtain a fourth judgment result. If the fourth judgment result is yes, the regulation is completed.

[0032] Furthermore, the third judgment module is also used for: if the result of the third judgment is no or the system resource utilization of the first device still does not meet the first preset condition after all the non-basic function service processes that grow across levels are closed, then it is judged whether there are basic function service processes that grow across levels; if so, one or more basic function service processes are sorted in descending order of service process scores, and the basic function service process with the highest score among the service processes is stopped; if not, an alarm message is generated.

[0033] Furthermore, it also includes:

[0034] The fourth judgment module is used to determine whether the system resource utilization of the second device after stopping the basic function service process with the highest score in the service process meets the second preset condition. If so, the regulation is completed; if not, it returns to step 4 and stops the non-basic service process with the highest score in the next service process.

[0035] Furthermore, the specific steps of “determining whether the system resource utilization of the second device after stopping the basic function service process with the highest score among the service processes meets the second preset condition, and completing the regulation if so” are:

[0036] Determine whether the resource utilization rate of the second device system is lower than the lowest water level line. If the judgment result is lower than the lowest water level line, then determine whether the resource utilization rate of the second device system continues to be lower than the lowest water level line during the lowest water level line observation period, and obtain the fifth judgment result. If the fifth judgment result is yes, the regulation is completed.

[0037] Another technical solution of the present invention to solve the above technical problems is as follows: a storage medium, wherein instructions are stored in the storage medium, and when a computer reads the instructions, the computer executes a service process control method as described in any one of the above items.

[0038] The beneficial effect of the present invention is that: through the above method, when it is monitored that the initial device system resource utilization is insufficient to support the continued operation of all service processes, the abnormally operating service processes can be found in time, and at the same time, the normal operation of the core functions of the device is guaranteed by service scheduling, which also reduces the possibility of device downtime.

[0039] Another technical solution of the present invention to solve the above technical problems is as follows: an electronic device, comprising a memory, a processor, and a program stored in the memory and running on the processor, wherein when the processor executes the program, a service process control method as described in any one of the above items is implemented.

[0040] The beneficial effect of the present invention is that: through the above method, when it is monitored that the initial device system resource utilization is insufficient to support the continued operation of all service processes, the abnormally operating service processes can be found in time, and at the same time, the normal operation of the core functions of the device is guaranteed by service scheduling, which also reduces the possibility of device downtime. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 A flow chart of an embodiment of a service process control method according to the present invention;

[0042] Figure 2 This is a structural framework diagram provided for an embodiment of a service process control system of the present invention. DETAILED DESCRIPTION

[0043] The principles and features of the present invention are described below. The examples given are only used to explain the present invention and are not used to limit the scope of the present invention.

[0044] like Figure 1As shown, the present invention provides a service process control method, which is performed periodically. The service process control method specifically includes:

[0045] Step 1: Obtain service scheduling data;

[0046] Step 2: determining whether the initial device system resource utilization in the service scheduling data is higher than a maximum watermark; if the determination result is that the initial device system resource utilization is higher than the maximum watermark, determining whether the initial device system resource utilization is continuously higher than the maximum watermark during a maximum watermark observation period, and generating a first determination result;

[0047] Step 3: If the first judgment result is yes, determine whether there is a service process in the current device system whose resource consumption increases across levels, and generate a second judgment result; if the first judgment result is no, no scheduling is required and wait for the next execution cycle.

[0048] Step 4: If the second judgment result is yes, determine whether there are non-basic function service processes that grow across levels, and generate a third judgment result. If the third judgment result is yes, sort the one or more non-basic function service processes in descending order of service process scores, and stop the non-basic function service process with the highest score among the service processes; if the second judgment result is no, generate an alarm message;

[0049] Step 5, determine whether the system resource utilization of the first device after stopping the non-basic function service process with the highest score in the service process meets the first preset condition; if it does, complete the regulation; if it does not, return to step 4 and stop the non-basic service process with the highest score in the next service process.

[0050] In some possible implementations, through the above method, when it is monitored that the initial device system resource utilization is insufficient to support the continued operation of all service processes, the abnormally operating service processes can be found in a timely manner. At the same time, the normal operation of the core functions of the device can be ensured through service scheduling, and the possibility of device downtime is reduced.

[0051] It's important to note that when a device's system resource utilization exceeds the maximum watermark, it proactively checks for any running service processes other than core functions. If a service process is deemed to be operating abnormally, meaning that it's experiencing a surge in system resource consumption relative to the preset value, it scores these processes and then stops them in descending order of score, freeing up excess resources and preserving core device functionality. This, to a certain extent, reduces the likelihood of device downtime.

[0052] The highest watermark is the maximum system resource consumption allowed by the device when all service processes are fully running. The maximum system resource consumption generally refers to the maximum load that the device can bear without affecting the normal operation of the service process. This value is set according to the actual scenario. The purpose of introducing the highest watermark observation period is to prevent the system resource consumption of the device from suddenly increasing, rather than the actual consumption value of the device. During the observation period, if the system resource consumption of the device is indeed higher than the highest watermark, it is considered that the current device no longer has sufficient system resources to support all service processes. Some resources need to be released through service scheduling to ensure the normal operation of the core function service process. It should be further explained that service scheduling will only schedule service processes whose system resource consumption increases across levels.

[0053] The specific calculation formula for the cross-level growth service process score can be referred to the following formula. In actual application, it can also be adjusted appropriately according to the situation. The cross-level growth service process score = service process priority * priority ratio factor + number of cross-level service processes * level factor.

[0054] The formula for calculating the number of service processes crossing levels is: number of service processes crossing levels = (actual resource consumption of service process - preset resource consumption of service process) / 5].

[0055] Therefore, the formula for calculating the final score of the cross-level growth service process is: final score = service process priority * priority ratio factor + (actual resource consumption of service process - preset resource consumption of service process) / 5] * level factor.

[0056] The cross-level growth service process score calculation mainly depends on the service process preset priority and the cross-level growth number of the service process system resource consumption.

[0057] The principle for prioritizing service processes is as follows: Service processes are divided into basic function service processes and non-basic function service processes based on functional importance. When device system resource consumption exceeds the maximum watermark, if both types of service processes exist, non-basic function service processes are terminated first. Basic function service processes include core function and non-core function service processes. The purpose of service scheduling is to ensure the normal operation of core function service processes by scheduling other service processes besides core functions within the limited system resources of the device. Therefore, core function service processes are not involved in the entire service scheduling process. Non-basic function service processes include takeoverable and non-takeoverable service processes. Takeoverable service processes mean that in a scenario where multiple devices are running, stopping one device will not affect the overall business function. Therefore, ensuring the normal operation of at least one physical machine is sufficient to achieve this goal.

[0058] The cross-level growth number is derived from the preset system resource consumption value and the actual system resource consumption value of the service process. The specific calculation method is as follows: The preset system resource consumption value of the service process is preset in the product in advance. The preset system resource consumption value is the actual system resources required for normal operation of all service processes at the maximum system resource utilization rate that the device can support. The actual system resource consumption value is obtained when the device detects that the system resource utilization rate is above the maximum watermark. The cross-level growth number is used to calculate the system resource cross-level number based on the actual system resource consumption value and the preset system resource consumption value of the service process. If the difference between the actual system resource consumption value and the preset system resource consumption value of a service process is greater than 5, it is considered that the system resource consumption of the service process has increased across levels. The service process cross-level number is calculated based on a level of 5. The difference between the actual system resource consumption value and the preset system resource consumption value of the service process indicates the number of levels that the service process has failed. For example, if the system resource consumption of a service process can be 0-100, and the preset value of the system resource consumption of the service process is 0 and the actual value of the system resource consumption is 100, then the service process spans 20 levels.

[0059] The service scheduling process also introduces the concepts of the minimum watermark and the minimum watermark observation period. The minimum watermark is the value to which the device system resources are expected to recover after stopping a service process. To prevent a sudden drop in system resources when stopping a service process, while the device's actual system resource consumption remains unrecovered, the concept of a minimum watermark observation period is introduced. Before or after the minimum watermark observation period, if the initial device system resource utilization reaches or falls below the minimum watermark, the current device system resources are deemed sufficient to support the normal operation of the remaining service processes, and the service scheduling is terminated. Otherwise, the remaining service processes are terminated in descending order of score.

[0060] This embodiment of the application also provides a function for automatically recovering a service process after it stops. The recovery process is implemented as follows:

[0061] When system resource utilization falls below the maximum watermark, the system enters a maximum watermark observation period. If the initial device system resource utilization falls below the maximum watermark both before and after the maximum watermark observation period, the system checks whether any service processes have been stopped due to service scheduling. If so, the system restores the service processes in the reverse order in which they were stopped during service scheduling.

[0062] The reason why the embodiment of the present application introduces a maximum watermark observation period when making a service process recovery judgment is to prevent the initial device system resource utilization from dropping sharply or decreasing in a short period of time. At the same time, each time a service process is restored, a minimum watermark observation period will be entered. Only when the device system resource consumption is lower than the minimum watermark before and after the minimum watermark observation period will the next service process be restored. This not only reduces the frequency of service recovery, but also ensures that the device can carry more service processes under limited system resources, thereby ensuring the integrity of the device functions. The specific processing process can be understood by referring to Example 1.

[0063] Example 1: The system resource utilization rate described in the embodiment of the present application can be at least one of the following: the current network resource utilization rate, CPU resource utilization rate, memory resource utilization rate and hard disk resource utilization rate of the device.

[0064] The highest water mark and the highest water mark observation period described in the embodiment of the present application are the system resource utilization threshold and the observation period. The highest water mark threshold can be a threshold set according to actual needs. When the system resource utilization of the device is higher than the highest water mark, it indicates that the current remaining resources of the device can no longer continue to support all service processes to continue running. Therefore, the device releases certain resources by scheduling service processes other than core functions to ensure that the core function service processes of the device can run normally, so as not to affect the core business of the device.

[0065] In order to better understand the service process scheduling method provided in the embodiments of the present application, service processes of different priorities are selected. The steps are as follows. It should be noted here that this process is a service process scheduling process, not a complete service process control method, which does not include steps such as obtaining service scheduling data.

[0066] The first step is to determine the service scheduling conditions.

[0067] When the initial device system resource utilization is detected to be above the preset maximum watermark M1, a maximum watermark observation period is introduced to prevent a sudden or short-term increase in initial device system resource utilization. At the end of the maximum watermark observation period T1, if the system resource utilization remains high, the second step of service scheduling begins. It should be noted that after the end of the maximum watermark observation period T1, the system resource utilization at that point is the average system resource utilization during observation period T1. If this maximum watermark is not met at any point from the beginning to the end of observation period T1, the second step of service scheduling will not be performed.

[0068] Step 2: Based on the judgment in Step 1 above, if the current resource consumption of the device is indeed insufficient to support all service processes, further determine whether there are any service processes that are growing across different levels.

[0069] The criteria for determining whether a service process has experienced a cross-level increase in system resources is to determine whether the service process has experienced a cross-level increase in system resources. The cross-level increase is simply the difference between the actual system resource consumption of the service process and the preset system resource value during normal operation. This value is set based on actual conditions. The specific calculation method is as follows: The system resource consumption value for normal operation of the service process is preset in the product. The preset system resource value is the actual system resource consumption required for all service processes to operate normally, at the maximum system resource utilization the device can support. When the device detects that the system resource utilization exceeds the maximum watermark, the current system resource consumption of the service process is obtained as the actual system resource consumption. The system resource cross-level increase is calculated based on the actual system resource consumption and the preset system resource value. If the difference between the actual system resource consumption of the service process and the preset system resource value is greater than 5, the service process is considered to have experienced a cross-level increase in system resource consumption. The service process cross-level increase is calculated based on a 5-level scale. The difference between the actual system resource consumption of the service process and the preset system resource value indicates the level at which the service process has failed.

[0070] If there is no cross-level growth service process after the judgment is completed, it means that the initial increase in device system resource utilization is not caused by the service process. At this time, it is necessary to report and notify relevant personnel to investigate the specific reasons for the increase in device system resource consumption; otherwise, the device needs to perform service scheduling to release the system resources occupied by the cross-level growth service process to ensure the operation of the core functions.

[0071] The specific content of determining whether a service process currently has cross-level growth according to the embodiment of the present invention is described as follows:

[0072] When it is detected that the device already has service processes that grow across levels, the non-basic function service processes will be detected first, and then the basic function service processes will be detected according to the importance of the functions. The purpose of the above operations is to stop the non-basic function service processes first under the premise that both basic function and non-basic function service processes that grow across levels exist. The advantage of doing this is that if the device system resources have returned to normal after stopping the non-basic function service processes, the basic function service processes will no longer be scheduled, which effectively ensures that the device runs as many service processes as possible within limited resources, ensuring the functional integrity of the device and avoiding waste of resources. Specific instructions are as follows:

[0073] a) Non-basic service process scheduling begins. (This also indicates that non-basic service processes that extend across different levels already exist.)

[0074] In order to better describe the non-basic function service process scheduling method, the embodiment of the present invention assumes that there are three non-basic function service processes B1, B2, and B3 that grow across levels, among which B2 is a takeoverable service process among the non-basic function service processes, and B1 and B3 are non-takeoverable service processes. At the same time, B2 and B3 grow across two levels, while B1 only grows across one level. Since the takeoverable service process has a higher proportion factor than the non-takeoverable service process when calculating the score, when B2 and B3 grow across the same level, the score of B2 will be higher than the score of B3. Because B1 and B3 are both non-takeoverable service processes, but B3 crosses more levels than B1, the final score of B3 will be higher than the score of the B1 service process. In summary, the final scores of the B1, B2, and B3 service processes are: B2>B3>B1.

[0075] b) After stopping a non-basic function service process, it will be determined whether the current initial device system resource utilization has fallen below the minimum watermark M2.

[0076] If the current initial device system resource utilization is already below the minimum watermark M2, the reduction in device system resources is likely due to the cessation of a service process. However, to prevent a brief or sudden drop in device system resources to the minimum watermark, a minimum watermark observation period is introduced. At the end of the minimum watermark observation period T2, if the system resource utilization remains below the minimum watermark M2, the device system resource reduction is considered to have been caused by the cessation of a service process. At this point, the device is able to support the remaining service processes, and subsequent service scheduling is discontinued, waiting for the next execution cycle.

[0077] It's important to note that the introduction of the concepts of the minimum watermark and the minimum watermark observation period ensures the reliability and accuracy of service scheduling to a certain extent. If only one service process is scheduled at a time, but the device resources are insufficient to support the remaining service processes after scheduling, not only will the frequency of service scheduling increase, but it will also not guarantee the timely release of device system resources.

[0078] If the detection determines that there are no non-basic function service processes that are growing across different levels, and the device system resources are insufficient to support the normal operation of the core function service processes, the basic function service processes will be checked. If there are basic function service processes that are growing across different levels, the basic function service processes will be scheduled. Otherwise, an alarm will be generated and reported to the relevant personnel to investigate the cause of the initial insufficient device system resource utilization.

[0079] The basic functional service process described in this embodiment of the present invention only describes the cross-level impact. The functional importance of the service process itself is no longer divided. Other influencing factors, such as the resource consumption and actual consumption of the process itself, are not described one by one. However, any modifications, equivalent replacements, and improvements made within the scope of this application are included in the scope of protection of this application.

[0080] c) Basic function service process scheduling begins. (This also indicates that a basic function service process that grows across levels already exists.)

[0081] To better describe the basic function service process scheduling method, the embodiment of the present invention assumes that there are three basic function service processes A1, A2, and A3 that grow across levels. Since the core functions in the basic function service processes do not participate in service scheduling, A1, A2, and A3 are all non-core function service processes. Among them, A2 and A3 grow across two levels, while A1 only grows across one level. For service processes across the same level, although the final scores will be the same, the embodiment of the present invention does not divide the basic function service processes based on other factors. Therefore, if the scores are the same, which one is scheduled first will not have a substantial impact. Therefore, when A2 and A3 have the same scores, for convenience of description, A3 is placed before A2. Because A2 crosses more levels than A1, the final score of A2 will be higher than the score of the A1 service process. In summary, the final scores of the A1, A2, and A3 service processes are: A3>A2>A1.

[0082] d) After stopping a basic function service process, it is still necessary to determine whether the current initial device system resource utilization rate has fallen below the minimum watermark M2.

[0083] If the current initial device system resource utilization is already below the minimum watermark M2, the minimum watermark observation period T2 will begin. Only if the initial device system resource utilization is below the minimum watermark both before and after the minimum watermark observation period T2 is it considered that the device system resource utilization was caused by stopping a service process. Only then is the device able to support the remaining service processes and will it stop executing subsequent service scheduling.

[0084] If, after steps a) through d) are completed, the initial device system resource utilization is still insufficient to support the normal operation of the core functional service process, this should be reported and the relevant personnel should be notified to investigate the cause of the initial insufficient device system resource utilization.

[0085] However, in addition to providing self-monitoring of service processes, embodiments of the present invention also provide a self-recovery function. When the device system resource usage is detected to be below the maximum watermark, the system will proactively detect whether there are any service processes that have been stopped due to scheduling. If so, the system will recover the service processes in the reverse order in which they were stopped.

[0086] Step 3: Determine the service scheduling recovery conditions.

[0087] If the initial device system resource utilization is detected to be lower than the preset maximum watermark M1, the system will enter the maximum watermark observation period T1 to prevent a sudden or short-term decrease in initial device system resource utilization. Only if the initial device system resource utilization is lower than the maximum watermark before and after the maximum watermark observation period T1 will the system determine whether any service processes are currently stopped due to scheduling. If not, the device is currently operating normally. Otherwise, the system will enter the service process recovery process.

[0088] The specific contents of the service process recovery process in the embodiment of the present invention are as follows:

[0089] At this time, the device system resources are sufficient to support more service processes, but there are service processes that have been stopped due to scheduling. Therefore, an attempt will be made to restore the service processes that have been stopped due to scheduling. In order to better describe the service process recovery process, the embodiment of the present invention assumes that the A1, A2, B1, and B2 services are stopped due to scheduling, where A1 and A2 are basic function service processes, and B1 and B2 are non-basic function service processes. Since the basic function service processes are stopped later, when the service processes are restored, the basic function service processes will be restored first. At the same time, when A1, A2, B1, and B2 are scheduled, A2 stops before A1, and B2 stops before B1, so A1 is restored before A2, and B1 is restored before B2. In summary, the order of recovery of the A1, A2, B1, and B2 service processes is: A1>A2>B1>B2.

[0090] Step 4: After a service process is restored, it is determined whether the current initial device system resource utilization is still lower than the minimum watermark M2.

[0091] If the current initial device system resource utilization is still below the minimum watermark M2, the device system resources are considered to be able to support the operation of more service processes. However, to prevent the device system resources from temporarily falling below the minimum watermark, a minimum watermark observation period T2 will be entered. Only if the initial device system resource utilization is below the minimum watermark before and after the minimum watermark observation period T2 is the next service process restored. Otherwise, it is considered that after restoring a service process, the device may not be able to support the operation of more service processes, and the service process will not be restored this time.

[0092] It's important to note that the concepts of the high-watermark observation period, the low-watermark, and the low-watermark observation period are still used in the service process recovery process, ensuring the reliability and accuracy of service recovery to a certain extent. If the device's system resources simply drop below the high-watermark, service process recovery should obviously not be performed. Restoration would only increase the device's system resource consumption. Furthermore, if the low-watermark and low-watermark observation period were omitted from the service process recovery process, only one service process would be restored at a time, even though the device can support more. This would not only increase the frequency of service process restoration but also fail to ensure timely utilization of device system resources. More importantly, it would fail to guarantee the integrity of device functionality.

[0093] Preferably, in any of the above embodiments, step 2 further includes:

[0094] If the judgment result is lower than the highest water level line, then determine whether the initial device system resource utilization continues to be lower than the highest water level line during the highest water level line observation period, and generate a sixth judgment result; if the sixth judgment result is yes, then determine whether there is a stopped service process, if not, complete self-check, if so, perform recovery processing; if the sixth judgment result is no, there is no need to execute regulation and wait for the next execution cycle.

[0095] It should be noted that the recovery process mainly involves recovering the suspended service process. The specific recovery process flow can be referred to Example 1.

[0096] Preferably, in any of the above embodiments, the recovery processing is: give priority to restoring the basic function service process, and among the basic function service processes, give priority to restoring the service process with the lowest service process score, and after restoring a service process, judge whether the initial device system resource utilization after restoration is lower than the lowest water level line; if the judgment result is lower than the lowest water level line, judge whether the initial device system resource utilization after restoration is continuously lower than the lowest water level line during the lowest water level line observation period, and generate a seventh judgment result. If the seventh judgment result is yes, continue the recovery processing; if the seventh judgment result is no, stop the recovery processing; if the judgment result is not lower than the lowest water level line, no recovery processing is required.

[0097] Preferably, in any of the above embodiments, the specific steps of "determining whether the system resource utilization of the first device after stopping the non-basic function service process with the highest score in the service process meets the first preset condition, and completing the regulation if so" in step 5 are:

[0098] Determine whether the resource utilization rate of the first device system is lower than the minimum watermark. If the judgment result is lower than the minimum watermark, determine whether the resource utilization rate of the first device system is continuously lower than the minimum watermark during the minimum watermark observation period, and obtain a fourth judgment result. If the fourth judgment result is yes, complete the regulation; if the fourth judgment result is no, return to continue to determine whether the resource utilization rate of the first device system is lower than the minimum watermark and stop the next non-basic function service process with the highest score. If the judgment result is not lower than the minimum watermark, return to continue to determine whether the resource utilization rate of the first device system is lower than the minimum watermark and stop the next non-basic function service process with the highest score.

[0099] Preferably, in any of the above embodiments, step 4 also includes: if the third judgment result is no or the system resource utilization of the first device still does not meet the first preset condition after all the non-basic function service processes that grow across levels are closed, then it is determined whether there are basic function service processes that grow across levels; if so, one or more basic function service processes are sorted in descending order of service process scores, and the basic function service process with the highest score among the service processes is stopped; if not, an alarm message is generated.

[0100] Preferably, in any of the above embodiments, the method further comprises:

[0101] Determine whether the system resource utilization of the second device after stopping the basic function service process with the highest score in the service process meets the second preset condition. If so, complete the regulation; if not, return to step 4 and stop the non-basic service process with the highest score in the next service process.

[0102] Preferably, in any of the above embodiments, the specific steps of “determining whether the system resource utilization of the second device after stopping the basic function service process with the highest score among the service processes meets the second preset condition, and completing the regulation if so” are:

[0103] Determine whether the resource utilization rate of the second device system is below the minimum watermark. If the determination result is below the minimum watermark, determine whether the resource utilization rate of the second device system is continuously below the minimum watermark during the minimum watermark observation period to obtain a fifth determination result. If the fifth determination result is yes, complete the control. If the fifth determination result is no, return to continue determining whether the resource utilization rate of the second device system is below the minimum watermark and stop the next basic function service process with the highest score. If the determination result is not below the minimum watermark, return to continue determining whether the resource utilization rate of the second device system is below the minimum watermark and stop the next basic function service process with the highest score.

[0104] It should be noted that the minimum water mark and the minimum water mark observation period are data obtained based on actual conditions and experience, and the specific values ​​are not fixed. The beneficial technical effects that can be achieved by the service process control method provided by the present invention are as follows:

[0105] 1. The present invention monitors the utilization rate of device system resources in real time, and protects the normal operation of the device core function service process as much as possible when the service process competes for limited device system resources.

[0106] 2. The present invention can monitor in real time the increase in initial device system resource utilization caused by abnormal service process operation. The abnormal service process can be promptly dispatched to avoid the continued increase in device system resources and even system downtime caused by continued operation.

[0107] 3. The present invention introduces a maximum watermark and a maximum watermark observation period when judging service scheduling conditions, which not only accurately grasps the actual utilization rate of the current monitoring equipment system resources, but also provides a strong guarantee for triggering service scheduling.

[0108] 4. The present invention introduces a minimum watermark and a minimum watermark observation period into the service scheduling process, which not only allows real-time monitoring of the actual utilization of monitoring equipment system resources, but also reduces the frequency of service scheduling.

[0109] 5. The present invention uses the highest watermark observation period when judging the service process recovery conditions, thus ensuring the reliability and accuracy of service process recovery.

[0110] 6. The present invention applies the use of the lowest water mark and the lowest water mark observation period in the service process recovery process, which reduces the frequency of service process recovery, while also ensuring that the device system resources can be used in a timely manner, and more importantly, ensures the integrity of the device functions.

[0111] like Figure 2 As shown, the present invention provides a service process control system, including:

[0112] Acquisition module 100, used to acquire service scheduling data;

[0113] A first determination module 200 is configured to determine whether the initial device system resource utilization in the service scheduling data is higher than a maximum watermark, and if so, to determine whether the initial device system resource utilization is continuously higher than the maximum watermark during a maximum watermark observation period, thereby generating a first determination result.

[0114] The second judgment module 300 is configured to, if the first judgment result is yes, determine whether there is a service process in the current device system with resource consumption increasing across levels, and generate a second judgment result;

[0115] The third judgment module 400 is configured to, if the second judgment result is yes, determine whether there are any non-basic function service processes that grow across levels, and generate a third judgment result. If the third judgment result is yes, sort the one or more non-basic function service processes in descending order of service process scores, and stop the non-basic function service process with the highest score among the service processes; if the second judgment result is no, generate an alarm message;

[0116] The control module 500 is used to determine whether the system resource utilization of the first device after stopping the non-basic function service process with the highest score in the service process meets the first preset condition; if so, the control is completed; if not, it returns to step 4 and stops the non-basic service process with the highest score in the next service process.

[0117] In some possible implementations, through the above method, when it is monitored that the initial device system resource utilization is insufficient to support the continued operation of all service processes, the abnormally operating service processes can be found in a timely manner. At the same time, the normal operation of the core functions of the device can be ensured through service scheduling, and the possibility of device downtime is reduced.

[0118] Preferably, in any of the above embodiments, the first judgment module is further configured to:

[0119] If the judgment result is lower than the highest water level line, then determine whether the initial device system resource utilization continues to be lower than the highest water level line during the highest water level line observation period, and generate a sixth judgment result; if the sixth judgment result is yes, then determine whether there is a stopped service process, if not, complete self-check, if so, perform recovery processing; if the sixth judgment result is no, there is no need to execute regulation and wait for the next execution cycle.

[0120] Preferably, in any of the above embodiments, the recovery processing is: give priority to restoring the basic function service process, and among the basic function service processes, give priority to restoring the service process with the lowest service process score, and after restoring a service process, judge whether the initial device system resource utilization after restoration is lower than the lowest water level line; if the judgment result is lower than the lowest water level line, judge whether the initial device system resource utilization after restoration is continuously lower than the lowest water level line during the lowest water level line observation period, and generate a seventh judgment result. If the seventh judgment result is yes, continue the recovery processing; if the seventh judgment result is no, stop the recovery processing; if the judgment result is not lower than the lowest water level line, no recovery processing is required.

[0121] Preferably, in any of the above embodiments, the specific steps of “determining whether the system resource utilization of the first device after stopping the non-basic function service process with the highest score among the service processes meets the first preset condition, and completing the regulation if so” are:

[0122] Determine whether the resource utilization rate of the first device system is lower than the minimum watermark. If the judgment result is lower than the minimum watermark, determine whether the resource utilization rate of the first device system is continuously lower than the minimum watermark during the minimum watermark observation period, and obtain a fourth judgment result. If the fourth judgment result is yes, complete the regulation; if the fourth judgment result is no, return to continue to determine whether the resource utilization rate of the first device system is lower than the minimum watermark and stop the next non-basic function service process with the highest score. If the judgment result is not lower than the minimum watermark, return to continue to determine whether the resource utilization rate of the first device system is lower than the minimum watermark and stop the next non-basic function service process with the highest score.

[0123] Preferably, in any of the above embodiments, the third judgment module is also used for: if the third judgment result is no or the system resource utilization of the first device still does not meet the first preset condition after all the non-basic function service processes that grow across levels are closed, then it is judged whether there are basic function service processes that grow across levels; if so, one or more basic function service processes are sorted in descending order of service process scores, and the basic function service process with the highest score among the service processes is stopped; if not, an alarm message is generated.

[0124] Preferably, in any of the above embodiments, the method further comprises:

[0125] The fourth judgment module is used to determine whether the system resource utilization of the second device after stopping the basic function service process with the highest score in the service process meets the second preset condition. If so, the regulation is completed; if not, it returns to step 4 and stops the non-basic service process with the highest score in the next service process.

[0126] Preferably, in any of the above embodiments, the specific steps of “determining whether the system resource utilization of the second device after stopping the basic function service process with the highest score among the service processes meets the second preset condition, and completing the regulation if so” are:

[0127] Determine whether the resource utilization rate of the second device system is below the minimum watermark. If the determination result is below the minimum watermark, determine whether the resource utilization rate of the second device system is continuously below the minimum watermark during the minimum watermark observation period to obtain a fifth determination result. If the fifth determination result is yes, complete the control. If the fifth determination result is no, return to continue determining whether the resource utilization rate of the second device system is below the minimum watermark and stop the next basic function service process with the highest score. If the determination result is not below the minimum watermark, return to continue determining whether the resource utilization rate of the second device system is below the minimum watermark and stop the next basic function service process with the highest score.

[0128] Another technical solution of the present invention to solve the above technical problems is as follows: a storage medium, wherein instructions are stored in the storage medium, and when a computer reads the instructions, the computer executes a service process control method as described in any one of the above items.

[0129] In some possible implementations, through the above method, when it is monitored that the initial device system resource utilization is insufficient to support the continued operation of all service processes, the abnormally operating service processes can be found in a timely manner. At the same time, the normal operation of the core functions of the device can be ensured through service scheduling, and the possibility of device downtime is reduced.

[0130] Another technical solution of the present invention to solve the above technical problems is as follows: an electronic device, comprising a memory, a processor, and a program stored in the memory and running on the processor, wherein when the processor executes the program, a service process control method as described in any one of the above items is implemented.

[0131] In some possible implementations, through the above method, when it is monitored that the initial device system resource utilization is insufficient to support the continued operation of all service processes, the abnormally operating service processes can be found in a timely manner. At the same time, the normal operation of the core functions of the device can be ensured through service scheduling, and the possibility of device downtime is reduced.

[0132] The reader should understand that in the description of this specification, reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine different embodiments or examples described in this specification and features of different embodiments or examples without contradiction.

[0133] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method can be implemented in other ways. For example, the method embodiments described above are merely illustrative. For example, the division of steps is merely a logical function division. In actual implementation, other division methods may be used. For example, multiple steps may be combined or integrated into another step, or some features may be ignored or not performed.

[0134] If the above method is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program code.

[0135] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and such modifications or substitutions are intended to be within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.

Claims

1. A service process control method, characterized in that: include: Step 1: Obtain service scheduling data; Step 2: determining whether the initial device system resource utilization in the service scheduling data is higher than a maximum watermark; if the determination result is that the initial device system resource utilization is higher than the maximum watermark, determining whether the initial device system resource utilization is continuously higher than the maximum watermark during a maximum watermark observation period, and generating a first determination result; The highest watermark is the maximum system resource consumption of the device when all service processes are fully running. Maximum system resource consumption refers to the maximum load that the device can bear without affecting the normal operation of the service process; Step 3: If the first judgment result is yes, determine whether there is a service process in the current device system whose resource consumption increases across levels, and generate a second judgment result; Step 4: If the second judgment result is yes, determine whether there are non-basic function service processes that grow across levels, and generate a third judgment result. If the third judgment result is yes, sort the one or more non-basic function service processes in descending order of service process scores, and stop the non-basic function service process with the highest score among the service processes; if the second judgment result is no, generate an alarm message; Step 5: Determine whether the system resource utilization of the first device after stopping the non-basic function service process with the highest score among the service processes meets a first preset condition; If the conditions are met, the control is completed. If not, the process returns to step 4 and stops the non-basic service process with the highest score in the next service process. It also includes: when the system resource utilization of the device exceeds the maximum watermark, detecting the running service processes other than the core functions; When it is determined that a service process is not operating normally, scores are calculated for the service processes that grow across levels, and the service processes are stopped in descending order of scores.

2. A service process control method according to claim 1, characterized in that: Step 2 also includes: If the judgment result is lower than the highest water level line, then determine whether the initial device system resource utilization continues to be lower than the highest water level line during the highest water level line observation period, and generate a sixth judgment result; if the sixth judgment result is yes, then determine whether there is a stopped service process, if not, complete self-check, if so, perform recovery processing; if the sixth judgment result is no, there is no need to execute regulation and wait for the next execution cycle.

3. A service process control method according to claim 2, characterized in that: The recovery process is as follows: prioritizing the recovery of basic function service processes, and among the basic function service processes, prioritizing the recovery of the service process with the lowest service process score, and after recovering a service process, determining whether the initial device system resource utilization rate after recovery is lower than the lowest watermark; if the determination result is lower than the lowest watermark, determining whether the initial device system resource utilization rate after recovery continues to be lower than the lowest watermark during the lowest watermark observation period, generating a seventh determination result, and if the seventh determination result is yes, continuing the recovery process; if the seventh determination result is no, stopping the recovery process; If the judgment result is not lower than the lowest water level, no recovery process is required.

4. A service process control method according to claim 1, characterized in that: The specific steps of "determining whether the system resource utilization of the first device after stopping the non-basic function service process with the highest score in the service process meets the first preset condition, and completing the regulation if so" in step 5 are: Determine whether the resource utilization rate of the first device system is lower than the lowest water level line. If the judgment result is lower than the lowest water level line, then determine whether the resource utilization rate of the first device system continues to be lower than the lowest water level line during the lowest water level line observation period, and obtain a fourth judgment result. If the fourth judgment result is yes, the regulation is completed.

5. A service process control method according to claim 1, characterized in that: The step 4 also includes: if the third judgment result is no or the system resource utilization of the first device still does not meet the first preset condition after all the non-basic function service processes that grow across levels are closed, then it is determined whether there are basic function service processes that grow across levels; if so, one or more basic function service processes are sorted in descending order of service process scores, and the basic function service process with the highest score among the service processes is stopped; if not, an alarm message is generated.

6. A service process control method according to claim 5, characterized in that: Also includes: Determine whether the system resource utilization of the second device after stopping the basic function service process with the highest score in the service process meets the second preset condition. If so, complete the regulation; if not, return to step 4 and stop the non-basic service process with the highest score in the next service process.

7. A service process control method according to claim 6, characterized in that: The specific steps of "determining whether the system resource utilization of the second device after stopping the basic function service process with the highest score among the service processes meets the second preset condition, and completing the regulation if so" are: Determine whether the resource utilization rate of the second device system is lower than the lowest water level line. If the judgment result is lower than the lowest water level line, then determine whether the resource utilization rate of the second device system continues to be lower than the lowest water level line during the lowest water level line observation period, and obtain the fifth judgment result. If the fifth judgment result is yes, the regulation is completed.

8. A service process control system, using a service process control method according to claim 1, characterized in that: The system comprises: Acquisition module, used to obtain service scheduling data; a first determination module, configured to determine whether the initial device system resource utilization in the service scheduling data is higher than a maximum watermark; if the determination result is that the initial device system resource utilization is higher than the maximum watermark, then determining whether the initial device system resource utilization is continuously higher than the maximum watermark during a maximum watermark observation period, and generating a first determination result; a second judgment module configured to, if the first judgment result is yes, determine whether there is a service process in the current device system with resource consumption increasing across levels, and generate a second judgment result; a third judgment module, configured to, if the second judgment result is yes, determine whether there are any non-basic function service processes that grow across levels, and generate a third judgment result; if the third judgment result is yes, sort the one or more non-basic function service processes in descending order of service process scores, and stop the non-basic function service process with the highest score among the service processes; and if the second judgment result is no, generate an alarm message; The control module is used to determine whether the system resource utilization of the first device after stopping the non-basic function service process with the highest score in the service process meets the second preset condition. If so, the control is completed; if not, it returns to the third judgment module and stops the non-basic service process with the highest score in the next service process.

9. A storage medium, characterized in that: The storage medium stores instructions, and when a computer reads the instructions, the computer is caused to execute a service process control method according to any one of claims 1 to 7.

10. An electronic device comprising a memory, a processor, and a program stored in the memory and running on the processor, characterized in that: When the processor executes the program, a service process control method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Method, equipment and system for virtualization platform thread control

    CN105094945A

  • Server downtime supervision method and system, terminal and storage medium

    CN110851320A